Re: Data Compression Before or After Encryption ?
From: Tom St Denis (tomstdenis_at_iahu.ca)
Date: Mon, 25 Oct 2004 12:29:37 -0400
Jean-Luc Cooke wrote:
> Notice the AESEncrypt(KEY, DATA) function is a wrapper to the:
> CIPHERTEXT[i] = AES-ECB-Encrypt(KEY, DATA[i] xor IV)
Nitpick... that's not CTR mode. I don't think it would be insecure but
CTR is actually
CIPHERTEXT[i] = DATA[i] xor AES-ECB-Encrypt(KEY, IV)
Which has the added benefit of being it's own inverse.