Specifies a software implementation of the AES-CMAC function, very similar to the OpenSSL CMAC implementation, and based on the same concepts.
Functions | |
static int | nist_sp_800_108_with_cmac (uint8_t *key, uint32_t key_len, char const *context, char const *label, uint32_t dk_len, uint8_t *out_dk) |
A software-based NIST-SP-800-108 KDF; derives keys from a key in a key buffer. More... | |
static int | key_mgnt_derive_root_keys (void) |
static int | set_ekb_key_to_keyslot (uint32_t keyslot, uint8_t key_index) |
static int | tegra_se_cmac_self_test (void) |
static int | tegra_se_nist_800_108_kdf_self_test (void) |
int | key_mgnt_processing (void) |
Variables | |
static uint8_t | fv_for_ekb [] |
static uint8_t | fv_for_ssk_dk [] |
static uint8_t | kek2_rk_for_ekb [AES_KEY_128_SIZE] = { 0 } |
static uint8_t | ssk_rk [AES_KEY_128_SIZE] = { 0 } |
static uint8_t | demo_256_rk [AES_KEY_256_SIZE] = { 0 } |
static uint8_t | ekb_ek [AES_KEY_128_SIZE] = { 0 } |
static uint8_t | ekb_ak [AES_KEY_128_SIZE] = { 0 } |
static uint8_t | ssk_dk [AES_KEY_128_SIZE] = { 0 } |
|
static |
Definition at line 198 of file key_mgnt.c.
References demo_256_rk, fv_for_ekb, fv_for_ssk_dk, kek2_rk_for_ekb, se_clear_aes_keyslots(), se_derive_root_key(), se_nist_sp_800_108_with_cmac(), and ssk_rk.
Referenced by key_mgnt_processing().
int key_mgnt_processing | ( | void | ) |
Definition at line 343 of file key_mgnt.c.
References ekb_ak, ekb_ek, kek2_rk_for_ekb, key_mgnt_derive_root_keys(), nist_sp_800_108_with_cmac(), set_ekb_key_to_keyslot(), ssk_dk, ssk_rk, tegra_se_cmac_self_test(), and tegra_se_nist_800_108_kdf_self_test().
|
static |
A software-based NIST-SP-800-108 KDF; derives keys from a key in a key buffer.
[in] | *key | Input key for derivation. |
[in] | key_len | Length in bytes of the input key. |
[in] | *context | A pointer to a NIST-SP-800-108 context string. |
[in] | *label | A pointer to a NIST-SP-800-108 label string. |
[in] | dk_len | Length of the derived key in bytes; may be 16 (128 bits) or any multiple of 16. |
[out] | *out_dk | A pointer to the derived key. The function stores its result in this location. |
Definition at line 116 of file key_mgnt.c.
Referenced by key_mgnt_processing(), and tegra_se_nist_800_108_kdf_self_test().
|
static |
Definition at line 246 of file key_mgnt.c.
References se_write_keyslot().
Referenced by key_mgnt_processing().
|
static |
Definition at line 259 of file key_mgnt.c.
References se_write_keyslot(), tegra_se_cmac_final(), tegra_se_cmac_free(), tegra_se_cmac_init(), tegra_se_cmac_new(), and tegra_se_cmac_update().
Referenced by key_mgnt_processing().
|
static |
Definition at line 308 of file key_mgnt.c.
References nist_sp_800_108_with_cmac(), se_nist_sp_800_108_with_cmac(), and se_write_keyslot().
Referenced by key_mgnt_processing().
|
static |
Definition at line 85 of file key_mgnt.c.
Referenced by key_mgnt_derive_root_keys().
|
static |
Definition at line 91 of file key_mgnt.c.
Referenced by key_mgnt_processing().
|
static |
Definition at line 90 of file key_mgnt.c.
Referenced by key_mgnt_processing().
|
static |
Definition at line 65 of file key_mgnt.c.
Referenced by key_mgnt_derive_root_keys().
|
static |
Definition at line 75 of file key_mgnt.c.
Referenced by key_mgnt_derive_root_keys().
|
static |
Definition at line 83 of file key_mgnt.c.
Referenced by key_mgnt_derive_root_keys(), and key_mgnt_processing().
|
static |
Definition at line 92 of file key_mgnt.c.
Referenced by key_mgnt_processing().
|
static |
Definition at line 84 of file key_mgnt.c.
Referenced by key_mgnt_derive_root_keys(), and key_mgnt_processing().