Searched refs:key (Results 1 – 8 of 8) sorted by relevance
| /tinycrypt-latest/lib/source/ |
| D | hmac.c | 37 static void rekey(uint8_t *key, const uint8_t *new_key, unsigned int key_size) in rekey() argument 44 key[i] = inner_pad ^ new_key[i]; in rekey() 45 key[i + TC_SHA256_BLOCK_SIZE] = outer_pad ^ new_key[i]; in rekey() 48 key[i] = inner_pad; key[i + TC_SHA256_BLOCK_SIZE] = outer_pad; in rekey() 52 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, in tc_hmac_set_key() argument 57 key == (const uint8_t *) 0 || in tc_hmac_set_key() 77 (void)tc_sha256_final(&dummy_state.key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key() 81 rekey(ctx->key, key, key_size); in tc_hmac_set_key() 84 (void)tc_sha256_update(&ctx->hash_state, key, key_size); in tc_hmac_set_key() 85 (void)tc_sha256_final(&ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key() [all …]
|
| D | hmac_prng.c | 84 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 96 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update() 99 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 110 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 119 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update() 122 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update() 143 _set(prng->key, 0x00, sizeof(prng->key)); in tc_hmac_prng_init() 210 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in tc_hmac_prng_generate()
|
| D | ctr_prng.c | 93 (void)tc_aes_encrypt(output_block, ctx->V, &ctx->key); in tc_ctr_prng_update() 110 (void)tc_aes128_set_encrypt_key(&ctx->key, temp); in tc_ctr_prng_update() 148 (void)tc_aes128_set_encrypt_key(&ctx->key, zeroArr); in tc_ctr_prng_init() 247 (void)tc_aes_encrypt(output_block, ctx->V, &ctx->key); in tc_ctr_prng_generate() 275 memset(ctx->key.words, 0x00, sizeof ctx->key.words); in tc_ctr_prng_uninstantiate()
|
| D | cmac_mode.c | 97 int tc_cmac_setup(TCCmacState_t s, const uint8_t *key, TCAesKeySched_t sched) in tc_cmac_setup() argument 102 key == (const uint8_t *) 0) { in tc_cmac_setup() 111 tc_aes128_set_encrypt_key(s->sched, key); in tc_cmac_setup()
|
| /tinycrypt-latest/lib/include/tinycrypt/ |
| D | hmac.h | 76 uint8_t key[2*TC_SHA256_BLOCK_SIZE]; member 92 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key,
|
| D | hmac_prng.h | 84 uint8_t key[TC_SHA256_DIGEST_SIZE]; member
|
| D | ctr_prng.h | 75 struct tc_aes_key_sched_struct key; member
|
| D | cmac_mode.h | 142 int tc_cmac_setup(TCCmacState_t s, const uint8_t *key,
|