AES 的官方规范是 FIPS-197。它包含以下有关密钥大小和块大小的文本。
1. Introduction
This standard specifies the Rijndael algorithm ([3] and [4]), a symmetric block cipher that can
process data blocks of 128 bits, using cipher keys with lengths of 128, 192, and 256 bits.
Rijndael was designed to handle additional block sizes and key lengths, however they are not
adopted in this standard.
Throughout the remainder of this standard, the algorithm specified herein will be referred to as
“the AES algorithm.” The algorithm may be used with the three different key lengths indicated
above, and therefore these different “flavors” may be referred to as “AES-128”, “AES-192”, and
“AES-256”.
由于 NIST 在竞赛后选择 Rijndael 作为 AES,因此您无法获得更权威的参考。
请注意,尽管您的代码还包含 CBC 和 PKCS#7 填充,但它们不是 AES 规范的一部分。不过,CBC 是 NIST 批准的分组密码操作模式(请参阅 NIST SP 800-38A)。该规范还提到 NIST 没有考虑填充方案,可能是因为它们不应该用作提供任何安全性的算法(即对于分组密码模式)。