feat: upgrade stream cipher from XOR to AES-128-CTR

Replace the XOR obfuscation cipher with AES-128-CTR using the Windows
BCrypt API. Key material grows from 16 to 32 bytes (16 AES key + 16 IV).
All callers auto-adjust via StreamCipher::KEY_SIZE. No handshake or
protocol changes needed beyond the larger MC|CKey payload.
This commit is contained in:
itsRevela
2026-03-28 21:03:45 -05:00
parent 1036c360dc
commit 245da783b3
6 changed files with 211 additions and 59 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ public:
static const wstring SET_ITEM_NAME_PACKET;
// Security: stream cipher handshake channels
static const wstring CIPHER_KEY_CHANNEL; // server->client: carries 16-byte key
static const wstring CIPHER_KEY_CHANNEL; // server->client: carries 32-byte key (16 AES key + 16 IV)
static const wstring CIPHER_ACK_CHANNEL; // client->server: ack (empty payload)
static const wstring CIPHER_ON_CHANNEL; // server->client: activation signal (empty payload)