Lines Matching refs:nonce
39 int tc_ccm_config(TCCcmMode_t c, TCAesKeySched_t sched, uint8_t *nonce, in tc_ccm_config() argument
46 nonce == (uint8_t *) 0) { in tc_ccm_config()
56 c->nonce = nonce; in tc_ccm_config()
98 uint8_t nonce[TC_AES_BLOCK_SIZE]; in ccm_ctr_mode() local
114 (void) _copy(nonce, sizeof(nonce), ctr, sizeof(nonce)); in ccm_ctr_mode()
117 block_num = (uint16_t) ((nonce[14] << 8)|(nonce[15])); in ccm_ctr_mode()
121 nonce[14] = (uint8_t)(block_num >> 8); in ccm_ctr_mode()
122 nonce[15] = (uint8_t)(block_num); in ccm_ctr_mode()
123 if (!tc_aes_encrypt(buffer, nonce, sched)) { in ccm_ctr_mode()
132 ctr[14] = nonce[14]; ctr[15] = nonce[15]; in ccm_ctr_mode()
163 b[i] = c->nonce[i - 1]; in tc_ccm_generation_encryption()
224 b[i] = c->nonce[i - 1]; in tc_ccm_decryption_verification()
244 b[i] = c->nonce[i - 1]; in tc_ccm_decryption_verification()