Skip to content

Commit

Permalink
Increase encryption key size for Spigot protocol
Browse files Browse the repository at this point in the history
1024 bits are very weak keys. This size equals vanillas implementation.
Therefore, 2048 goes out of spec, but works and requires only minimal
additional performance for improved security.

The consequence will be during the login and playing in onlinemode.
First for authenticating and second for the encryption of all following
packets.
  • Loading branch information
games647 committed Jan 15, 2024
1 parent aece7f8 commit 2112d06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ final class EncryptionUtil {
public static final int VERIFY_TOKEN_LENGTH = 4;
public static final String KEY_PAIR_ALGORITHM = "RSA";

private static final int RSA_LENGTH = 1_024;
private static final int RSA_LENGTH = 2_048;

private static final PublicKey MOJANG_SESSION_KEY;
private static final int LINE_LENGTH = 76;
Expand Down

0 comments on commit 2112d06

Please sign in to comment.