Dominic K
Dominic K

Reputation: 7085

How many bytes are IV and Keys for AES?

I'm using AESCryptoServiceProvider in C#/.Net Framework and I'm wondering how large, in bytes, the IV and Keys are. I'm pretty sure that this class follows the specifications of AES so if anyone has any ideas, I'd be happy to hear it :)

Upvotes: 10

Views: 8816

Answers (1)

Matthew Flaschen
Matthew Flaschen

Reputation: 284967

The IV size is 16 bytes, and the default key size is 32 (16 and 24 are also allowed) You can use the BlockSize, KeySize, LegalBlockSizes, and LegalKeySizes properties, respectively. The API provides the value in bits.

Upvotes: 11

Related Questions