I am using AES encryption in my application. I used 3 types of encryption AES-128,AES-192, AES-256 keysize. When I encrypt with different keysize(128 or 192 or 256) with the same text, the encrypted string length is same for all keysize(128 and 192 and 256) whereas encrypted characters only differs. Is this correct? Is the length of the encrypted string length always same for every keysize?
1 Answer
$\begingroup$
$\endgroup$
1
Yes, with most operating modes of AES, the length of the encrypted string is the same regardless of key size (128, 192 or 256 bits).
That's because AES-128, AES-192 and AES-256 all are 128-bit block ciphers, meaning they operate on 128-bit data blocks, regardless of key size. The key determines the mapping of 128-bit plaintext blocks to 128-bit ciphertext block, but the key size is independent of the block size.
-
$\begingroup$ Good answer, you will notice it in performance, specially if you do it a lot. also if you like to test with your data size then just alter the code here to fit your needs dotnetfiddle.net/T5gzHI $\endgroup$ Commented Jan 8, 2020 at 7:24