Searched refs:ctx (Results 1 – 4 of 4) sorted by relevance
| /tinycrypt-latest/lib/source/ |
| D | hmac.c | 52 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, in tc_hmac_set_key() argument 56 if (ctx == (TCHmacState_t) 0 || in tc_hmac_set_key() 81 rekey(ctx->key, key, key_size); in tc_hmac_set_key() 83 (void)tc_sha256_init(&ctx->hash_state); 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() 86 &ctx->hash_state); in tc_hmac_set_key() 87 rekey(ctx->key, in tc_hmac_set_key() 88 &ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key() 95 int tc_hmac_init(TCHmacState_t ctx) in tc_hmac_init() argument [all …]
|
| D | ctr_prng.c | 74 static void tc_ctr_prng_update(TCCtrPrng_t * const ctx, uint8_t const * const providedData) in tc_ctr_prng_update() argument 76 if (0 != ctx) { in tc_ctr_prng_update() 87 arrInc(ctx->V, sizeof ctx->V); in tc_ctr_prng_update() 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() 113 memcpy(ctx->V, &(temp[TC_AES_KEY_SIZE]), TC_AES_BLOCK_SIZE); in tc_ctr_prng_update() 117 int tc_ctr_prng_init(TCCtrPrng_t * const ctx, in tc_ctr_prng_init() argument 140 if ((0 != ctx) && (0 != entropy) && (entropyLen >= sizeof seed_material)) { in tc_ctr_prng_init() 148 (void)tc_aes128_set_encrypt_key(&ctx->key, zeroArr); in tc_ctr_prng_init() 151 memset(ctx->V, 0x00, sizeof ctx->V); in tc_ctr_prng_init() [all …]
|
| /tinycrypt-latest/lib/include/tinycrypt/ |
| D | hmac.h | 92 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, 102 int tc_hmac_init(TCHmacState_t ctx); 114 int tc_hmac_update(TCHmacState_t ctx, const void *data, 133 int tc_hmac_final(uint8_t *tag, unsigned int taglen, TCHmacState_t ctx);
|
| D | ctr_prng.h | 101 int tc_ctr_prng_init(TCCtrPrng_t * const ctx, 126 int tc_ctr_prng_reseed(TCCtrPrng_t * const ctx, 148 int tc_ctr_prng_generate(TCCtrPrng_t * const ctx, 160 void tc_ctr_prng_uninstantiate(TCCtrPrng_t * const ctx);
|