mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Add another standard AES test vector.
The 128-bit example from Appendix A/B is a more useful first test case for a new implementation than the Appendix C tests, because the standard shows even more of the working (in particular the full set of intermediate results from key setup).
This commit is contained in:
parent
5ac7cdb1cb
commit
9f530d8c55
@ -957,6 +957,14 @@ class standard_test_vectors(MyTestBase):
|
|||||||
self.assertEqualBin(
|
self.assertEqualBin(
|
||||||
ssh2_cipher_decrypt(c, ciphertext), plaintext)
|
ssh2_cipher_decrypt(c, ciphertext), plaintext)
|
||||||
|
|
||||||
|
# The test vector from FIPS 197 appendix B. (This is also the
|
||||||
|
# same key whose key setup phase is shown in detail in
|
||||||
|
# appendix A.)
|
||||||
|
vector('aes128',
|
||||||
|
unhex('2b7e151628aed2a6abf7158809cf4f3c'),
|
||||||
|
unhex('3243f6a8885a308d313198a2e0370734'),
|
||||||
|
unhex('3925841d02dc09fbdc118597196a0b32'))
|
||||||
|
|
||||||
# The test vectors from FIPS 197 appendix C: the key bytes go
|
# The test vectors from FIPS 197 appendix C: the key bytes go
|
||||||
# 00 01 02 03 ... for as long as needed, and the plaintext
|
# 00 01 02 03 ... for as long as needed, and the plaintext
|
||||||
# bytes go 00 11 22 33 ... FF.
|
# bytes go 00 11 22 33 ... FF.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user