| // Copyright lowRISC contributors. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| |
| #ifndef OPENTITAN_HW_IP_AES_MODEL_AES_EXAMPLE_H_ |
| #define OPENTITAN_HW_IP_AES_MODEL_AES_EXAMPLE_H_ |
| |
| // The examples below are extracted from |
| // the Advanced Encryption Standard (AES) FIPS Publication 197 available at |
| // https://www.nist.gov/publications/advanced-encryption-standard-aes. |
| |
| static const unsigned char plain_text_0[16] = { |
| 0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, |
| 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34}; |
| |
| static const unsigned char plain_text_1[16] = { |
| 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; |
| |
| static const unsigned char key_16_0[16] = {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, |
| 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, |
| 0x09, 0xcf, 0x4f, 0x3c}; |
| |
| static const unsigned char key_16_1[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, |
| 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, |
| 0x0c, 0x0d, 0x0e, 0x0f}; |
| |
| static const unsigned char key_24_0[24] = { |
| 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, 0xc8, 0x10, 0xf3, 0x2b, |
| 0x80, 0x90, 0x79, 0xe5, 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b}; |
| |
| static const unsigned char key_24_1[24] = { |
| 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, |
| 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17}; |
| |
| static const unsigned char key_32_0[32] = { |
| 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, |
| 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, |
| 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4}; |
| |
| static const unsigned char key_32_1[32] = { |
| 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, |
| 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, |
| 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; |
| |
| static const unsigned char cipher_text_gold_16_0[16] = { |
| 0x39, 0x25, 0x84, 0x1d, 0x02, 0xdc, 0x09, 0xfb, |
| 0xdc, 0x11, 0x85, 0x97, 0x19, 0x6a, 0x0b, 0x32}; |
| |
| static const unsigned char cipher_text_gold_16_1[16] = { |
| 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30, |
| 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a}; |
| |
| static const unsigned char cipher_text_gold_24_0[16] = { |
| 0x58, 0x5e, 0x9f, 0xb6, 0xc2, 0x72, 0x2b, 0x9a, |
| 0xf4, 0xf4, 0x92, 0xc1, 0x2b, 0xb0, 0x24, 0xc1}; |
| |
| static const unsigned char cipher_text_gold_24_1[16] = { |
| 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, |
| 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91}; |
| |
| static const unsigned char cipher_text_gold_32_0[16] = { |
| 0x30, 0x21, 0x61, 0x3a, 0x97, 0x3e, 0x58, 0x2f, |
| 0x4a, 0x29, 0x23, 0x41, 0x37, 0xae, 0xc4, 0x94}; |
| |
| static const unsigned char cipher_text_gold_32_1[16] = { |
| 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf, |
| 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89}; |
| |
| #endif // OPENTITAN_HW_IP_AES_MODEL_AES_EXAMPLE_H_ |