1
$\begingroup$

Does the AES-256 encryption standart have a max input length?

If not, does it mean we can even translate a book to it? Like md5 doesnt care max input length?

$\endgroup$
  • $\begingroup$ It's not like MD5, but yeah, you can put any amount of data into it. $\endgroup$ – ceejayoz Jan 16 '19 at 17:49
  • 2
    $\begingroup$ AES input size is exactly 16 bytes. But you can apply AES endlessly if you divide your data into a stream of blocks of 16 bytes. $\endgroup$ – rustyx Jan 16 '19 at 17:54
  • $\begingroup$ but I read that whatsapp uses aes 256 encryption, or is it maybe just for making private key? $\endgroup$ – dsaop Jan 16 '19 at 18:23
  • $\begingroup$ AES-256 refers to using AES with a 256-bit key, which is the strongest standard key length. You can use 128-bit and 192-bit keys too. AES uses a symmetric key, not a private key. The sizes of keys for public key algorithms and algorithms are not directly comparable; public keys need to be larger to provide the same effective strength. For symmetric ciphers, the key size is unrelated to the maximum input length. As Maarten explained, that depends on the mode. $\endgroup$ – erickson Jan 18 '19 at 16:31
3
$\begingroup$

AES input size is exactly 16 bytes. But you can apply AES endlessly if you divide your data into a stream of blocks of 16 bytes. – rustyx

rustyx is party right. Just splitting the data is called ECB mode and it is insecure as you can detect repeated plaintext blocks. AES is not a full cipher, it is a block cipher. To create a real cipher from it you need to use it within a mode of operation. To have full CPA security this also requires a unique IV.

The amount of data that can be processed depends mainly on the mode of operation and the width of the block cipher (the block size). Generally modes of operation can handle at least 64 GiB of data in the worst case scenarios (e.g. for authenticated mode of operation such as GCM.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy