Topic: AES Key Size

2009-04-01 16:30:33 UTC
Hello, I noticed in AesSetKey() in aes.c that the key length is restricted to 16, 24 or 32 bytes.

I naively thought that an AES key length might be longer, like 256 or 4096. What have I misunderstood something about AES and/or the ctaocrypt API?
touskaProject Admin

2009-04-01 19:54:10 UTC
The AES standard supports AES-128, AES-192, and AES-256. Those are key sizes in bits, which correspond to byte sizes of 16, 24, and 32 respectively.

Public key algorithms will use longer keys in the thousands of bits to represent huge numbers that are factors of other huge numbers. But block cipher key sizes are the actual length of the key. Even AES-128 has 2 ^ 128 different possible keys!