tpm2: Add test vectors for camellia-192

Signed-off-by: Fergus Dall <sidereal@google.com>
This commit is contained in:
Fergus Dall 2023-06-04 12:47:15 +10:00 committed by Stefan Berger
parent 2ef7f12aed
commit 52e98e9758

View File

@ -308,7 +308,44 @@ const BYTE dataOut_CAMELLIA128_CTR [] = {
0x05, 0xd4, 0x18, 0x6b, 0x25, 0x86, 0xd4, 0xc9};
#endif
#if CAMELLIA_192
#error Missing test cases for CAMELLIA_192
const BYTE key_CAMELLIA192 [] = {
0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b};
const BYTE dataIn_CAMELLIA192 [] = {
0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51};
const BYTE dataOut_CAMELLIA192_ECB [] = {
0xcc, 0xcc, 0x6c, 0x4e, 0x13, 0x8b, 0x45, 0x84,
0x85, 0x14, 0xd4, 0x8d, 0x0d, 0x34, 0x39, 0xd3,
0x57, 0x13, 0xc6, 0x2c, 0x14, 0xb2, 0xec, 0x0f,
0x83, 0x93, 0xb6, 0xaf, 0xd6, 0xf5, 0x78, 0x5a,
0xe4, 0x91, 0xc6, 0xea, 0xbc, 0x87, 0x70, 0xd4,
0xa5, 0xf4, 0x43, 0x6f, 0x7a, 0xc9, 0x99, 0x36};
const BYTE dataOut_CAMELLIA192_CBC [] = {
0x2a, 0x48, 0x30, 0xab, 0x5a, 0xc4, 0xa1, 0xa2,
0x40, 0x59, 0x55, 0xfd, 0x21, 0x95, 0xcf, 0x93,
0x5d, 0x5a, 0x86, 0x9b, 0xd1, 0x4c, 0xe5, 0x42,
0x64, 0xf8, 0x92, 0xa6, 0xdd, 0x2e, 0xc3, 0xd5,
0x70, 0x86, 0x6c, 0x04, 0x1c, 0xe0, 0xa5, 0xf4,
0x0b, 0x5f, 0x6e, 0x1b, 0x69, 0xe1, 0x10, 0x66};
const BYTE dataOut_CAMELLIA192_CFB [] = {
0xc8, 0x32, 0xbb, 0x97, 0x80, 0x67, 0x7d, 0xaa,
0x82, 0xd9, 0xb6, 0x86, 0x0d, 0xcd, 0x56, 0x5e,
0x86, 0xf8, 0x49, 0x16, 0x27, 0x90, 0x6d, 0x78,
0x0c, 0x7a, 0x6d, 0x46, 0xea, 0x33, 0x1f, 0x98};
const BYTE dataOut_CAMELLIA192_OFB [] = {
0xc8, 0x32, 0xbb, 0x97, 0x80, 0x67, 0x7d, 0xaa,
0x82, 0xd9, 0xb6, 0x86, 0x0d, 0xcd, 0x56, 0x5e,
0x3c, 0x2d, 0x4d, 0xd9, 0x17, 0x84, 0x4e, 0x91,
0x9c, 0x63, 0x7a, 0x3a, 0xb9, 0x38, 0xb4, 0x51};
const BYTE dataOut_CAMELLIA192_CTR [] = {
0x56, 0x46, 0x17, 0xf8, 0xea, 0x09, 0x38, 0xbb,
0x25, 0xdc, 0x9d, 0x19, 0x9c, 0xa5, 0x7e, 0x2a,
0x27, 0x74, 0x12, 0xda, 0x1a, 0x84, 0x01, 0x17,
0xbb, 0x12, 0x91, 0x45, 0x87, 0x57, 0xc3, 0x7c};
#endif
#if CAMELLIA_256
const BYTE key_CAMELLIA256 [] = {