feat: enable key manager and HUK support for S31

This commit is contained in:
nilesh.kale
2026-05-20 10:17:34 +05:30
parent e1d429ba30
commit a530aab0a6
16 changed files with 831 additions and 13 deletions
@@ -68,6 +68,7 @@ static const char *TAG = "key_mgr_test";
} \
} while (0)
#if SOC_KEY_MANAGER_FE_KEY_DEPLOY
#define ENCRYPTED_DATA_SIZE 128
static const uint8_t plaintext_data[ENCRYPTED_DATA_SIZE] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
@@ -90,6 +91,7 @@ static const uint8_t expected_ciphertext[ENCRYPTED_DATA_SIZE] = {
0x85, 0xe2, 0x69, 0x26, 0xfb, 0x61, 0x7e, 0x15, 0x11, 0x26, 0x59, 0xf1, 0x4f, 0xeb, 0x4d, 0x25,
0x8e, 0xc5, 0xb9, 0x64, 0xdf, 0xc7, 0x52, 0x87, 0x2d, 0xb, 0xd6, 0xdd, 0xb1, 0xb3, 0xfe, 0xaf,
};
#endif /* SOC_KEY_MANAGER_FE_KEY_DEPLOY */
/* Big endian */
static const uint8_t init_key[] = {
@@ -105,11 +107,13 @@ static const uint8_t k2_info[] = {
0x88, 0x9d, 0x0b, 0x2b, 0x40, 0x87, 0x6e, 0x58, 0xf3, 0xf3, 0x63, 0x62, 0xd1, 0x5c, 0x9a, 0xe8
};
#if SOC_KEY_MANAGER_FE_KEY_DEPLOY
/* Big endian */
static const uint8_t k1_xts_aes_encrypt[] = {
0x0a, 0x43, 0x2a, 0xee, 0xb5, 0xd0, 0x6b, 0x58, 0x34, 0x2d, 0x0d, 0xbf, 0xf7, 0x04, 0x60, 0x81,
0x08, 0x79, 0x38, 0xb3, 0xb5, 0xdf, 0x25, 0xb4, 0x38, 0x8e, 0x93, 0x5d, 0xbf, 0xd1, 0x91, 0x6d,
};
#endif /* SOC_KEY_MANAGER_FE_KEY_DEPLOY */
static const uint8_t k1_hmac_encrypt[] = {
0x02, 0xf7, 0x05, 0x75, 0xfd, 0x12, 0x99, 0xc2, 0xb9, 0xc0, 0x2e, 0x40, 0xd0, 0x69, 0xb0, 0x83,