[botan-devel] Where are AES's encryption and decryption subkeys?

Jeffrey Walton noloader at gmail.com
Tue Aug 8 00:48:55 EDT 2017


Hi Everyone,

I'm working on an ARM platform. I'm having trouble locating AES's
subkey schedule. I instrumented AES_128::encrypt_n to dump subkeys:

AES_128::encrypt_n
{
   ...
   aes_encrypt_n(in, out, blocks, m_EK, m_ME);
   PrintSubKeys(m_EK.data(), m_EK.size());
}

The dump does not show 11 rows as expected (0 through 10). Rather, it
shows 40 or so rows.

Where can I find the subkeys in AES?

Or maybe, should I use (rounds+1)*4 as size?

It looks like  'botan-test block' produces random data. How can I run
just NIST AES test vectors?

Jeff

**********

R0: 8252FD6459A11B18E6EF1FDBD75A524F
R1: 065C43655FFD587DB91247A66E4815E9
R2: 18C3113E473E4943FE2C0EE590641B0C
R3: E6A35295A19D1BD65FB11533CFD50E3F
R4: 9329513632B44AE06D055FD3A2D051EC
R5: 5D1321F76FA76B1702A234C4A0726528
R6: 69F3619A06540A8D04F63E49A4845B61
R7: 86BA3EE380EE346E84180A27209C5146
R8: DC0DE0B25CE3D4DCD8FBDEFBF8678FBD
R9: A64C65DAFAAFB10622546FFDDA33E040
R10: D021000000000000B100000000000000
R11: AF1BA60D55B4170B77E078F6ADD398B6
R12: B426DD1A9D2409522DAFB3D52A1A82FB
R13: 0789262B2902D448B08BBA8707B5312E
R14: 321553952E8BF26399896ECFB73E8BA9
R15: F0273A8C1C9EA1F6B7029CAC2EB7E566
R16: CD069AC9ECB99B7AAB9C3D5A99B579CA
R17: 8855EBEB21BF01B34725A62032294490
R18: 180FB326A9EAEA58669AA793750CE2B0
R19: 65A29FACB1E5597ECF704DCB13964523
R20: 7EBDC37CD447C6D27E9514B5DCE608E8
R21: 10DE8633000000009107000000000000
R22: 80FA639CFF03000080FA639CFF030000
R23: D00A873300000000D00A873300000000
R24: 800A873300000000400B873300000000
R25: 200B8733000000000700000000000000
R26: 73696D645F3332000000000000000000
R27: E0220000000000005000000000000000
R28: 800B873300000000F00A873300000000
R29: 00000000000000000000000000000000
R30: 700B8733000000000700000000000000
R31: 736D325F656E63000000000000000000
R32: 30230000000000005000000000000000
R33: D00B873300000000D00C873300000000
R34: F00A873300000000300C873300000000
R35: C00B8733000000000700000000000000
R36: 736D325F736967000000000000000000
R37: 80230000000000005000000000000000
R38: 200C873300000000300C873300000000
R39: 00000000000000000000000000000000
R40: 100C8733000000000400000000000000


More information about the botan-devel mailing list