From 2112d06162050c1b09a2b821d0763c33784a6dda Mon Sep 17 00:00:00 2001 From: games647 Date: Mon, 15 Jan 2024 16:37:48 +0100 Subject: [PATCH] Increase encryption key size for Spigot protocol 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. --- .../fastlogin/bukkit/listener/protocollib/EncryptionUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java index 72209f2f..81f4993c 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java @@ -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;