Home
last modified time | relevance | path

Searched refs:cbcmac (Results 1 – 11 of 11) sorted by relevance

/freebsd/contrib/bearssl/src/aead/
H A Deax.c65 memset(ctx->cbcmac, 0, sizeof ctx->cbcmac); in omac_start()
112 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, ctx->buf, sizeof ctx->buf); in do_pad()
143 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in do_cbcmac_chunk()
146 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, data, len); in do_cbcmac_chunk()
201 memcpy(ctx->nonce, ctx->cbcmac, sizeof ctx->cbcmac); in br_eax_reset()
223 memcpy(ctx->cbcmac, st->st[0], sizeof ctx->cbcmac); in br_eax_reset_pre_aad()
228 memcpy(ctx->nonce, ctx->cbcmac, sizeof ctx->cbcmac); in br_eax_reset_pre_aad()
230 memcpy(ctx->cbcmac, st->st[1], sizeof ctx->cbcmac); in br_eax_reset_pre_aad()
251 memcpy(ctx->cbcmac, st->st[0], sizeof ctx->cbcmac); in br_eax_reset_post_aad()
256 memcpy(ctx->nonce, ctx->cbcmac, sizeof ctx->cbcmac); in br_eax_reset_post_aad()
[all …]
H A Dccm.c96 memset(ctx->cbcmac, 0, sizeof ctx->cbcmac); in br_ccm_reset()
97 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, tmp, sizeof tmp); in br_ccm_reset()
157 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in br_ccm_aad_inject()
166 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, dbuf, len); in br_ccm_aad_inject()
188 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in br_ccm_flip()
247 ctx->cbcmac, ctx->buf, sizeof ctx->buf); in br_ccm_run()
264 (*ctx->bctx)->decrypt(ctx->bctx, ctx->ctr, ctx->cbcmac, in br_ccm_run()
267 (*ctx->bctx)->encrypt(ctx->bctx, ctx->ctr, ctx->cbcmac, in br_ccm_run()
318 (*ctx->bctx)->mac(ctx->bctx, ctx->cbcmac, in br_ccm_get_tag()
326 ctx->cbcmac[u] ^= ctx->tagmask[u]; in br_ccm_get_tag()
[all …]
/freebsd/contrib/bearssl/src/symcipher/
H A Daes_ct_ctrcbc.c136 void *cbcmac, const void *data, size_t len) in br_aes_ct_ctrcbc_mac() argument
146 cm0 = br_dec32le((unsigned char *)cbcmac + 0); in br_aes_ct_ctrcbc_mac()
147 cm1 = br_dec32le((unsigned char *)cbcmac + 4); in br_aes_ct_ctrcbc_mac()
148 cm2 = br_dec32le((unsigned char *)cbcmac + 8); in br_aes_ct_ctrcbc_mac()
149 cm3 = br_dec32le((unsigned char *)cbcmac + 12); in br_aes_ct_ctrcbc_mac()
173 br_enc32le((unsigned char *)cbcmac + 0, cm0); in br_aes_ct_ctrcbc_mac()
174 br_enc32le((unsigned char *)cbcmac + 4, cm1); in br_aes_ct_ctrcbc_mac()
175 br_enc32le((unsigned char *)cbcmac + 8, cm2); in br_aes_ct_ctrcbc_mac()
176 br_enc32le((unsigned char *)cbcmac + 12, cm3); in br_aes_ct_ctrcbc_mac()
182 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_ct_ctrcbc_encrypt() argument
[all …]
H A Daes_ct64_ctrcbc.c131 void *cbcmac, const void *data, size_t len) in br_aes_ct64_ctrcbc_mac() argument
140 cm0 = br_dec32le((unsigned char *)cbcmac + 0); in br_aes_ct64_ctrcbc_mac()
141 cm1 = br_dec32le((unsigned char *)cbcmac + 4); in br_aes_ct64_ctrcbc_mac()
142 cm2 = br_dec32le((unsigned char *)cbcmac + 8); in br_aes_ct64_ctrcbc_mac()
143 cm3 = br_dec32le((unsigned char *)cbcmac + 12); in br_aes_ct64_ctrcbc_mac()
169 br_enc32le((unsigned char *)cbcmac + 0, cm0); in br_aes_ct64_ctrcbc_mac()
170 br_enc32le((unsigned char *)cbcmac + 4, cm1); in br_aes_ct64_ctrcbc_mac()
171 br_enc32le((unsigned char *)cbcmac + 8, cm2); in br_aes_ct64_ctrcbc_mac()
172 br_enc32le((unsigned char *)cbcmac + 12, cm3); in br_aes_ct64_ctrcbc_mac()
178 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_ct64_ctrcbc_encrypt() argument
[all …]
H A Daes_small_ctrcbc.c92 void *cbcmac, const void *data, size_t len) in br_aes_small_ctrcbc_mac() argument
98 xorbuf(cbcmac, buf, 16); in br_aes_small_ctrcbc_mac()
99 br_aes_small_encrypt(ctx->num_rounds, ctx->skey, cbcmac); in br_aes_small_ctrcbc_mac()
108 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_small_ctrcbc_encrypt() argument
111 br_aes_small_ctrcbc_mac(ctx, cbcmac, data, len); in br_aes_small_ctrcbc_encrypt()
117 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_small_ctrcbc_decrypt() argument
119 br_aes_small_ctrcbc_mac(ctx, cbcmac, data, len); in br_aes_small_ctrcbc_decrypt()
H A Daes_big_ctrcbc.c92 void *cbcmac, const void *data, size_t len) in br_aes_big_ctrcbc_mac() argument
98 xorbuf(cbcmac, buf, 16); in br_aes_big_ctrcbc_mac()
99 br_aes_big_encrypt(ctx->num_rounds, ctx->skey, cbcmac); in br_aes_big_ctrcbc_mac()
108 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_big_ctrcbc_encrypt() argument
111 br_aes_big_ctrcbc_mac(ctx, cbcmac, data, len); in br_aes_big_ctrcbc_encrypt()
117 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_big_ctrcbc_decrypt() argument
119 br_aes_big_ctrcbc_mac(ctx, cbcmac, data, len); in br_aes_big_ctrcbc_decrypt()
H A Daes_pwr8_ctrcbc.c541 unsigned char *cbcmac, const unsigned char *buf, size_t num_blocks) \
559 lxvw4x(48, %[cc], %[cbcmac]) \
581 stxvw4x(48, %[cc], %[cbcmac]) \
584 : [sk] "b" (sk), [cbcmac] "b" (cbcmac), [num_blocks] "b" (num_blocks) \
600 unsigned char *ctr, unsigned char *cbcmac, unsigned char *buf, \
622 lxvw4x(49, %[cc], %[cbcmac]) \
683 stxvw4x(49, %[cc], %[cbcmac]) \
686 : [sk] "b" (sk), [ctr] "b" (ctr), [cbcmac] "b" (cbcmac), \
703 unsigned char *ctr, unsigned char *cbcmac, unsigned char *buf, \
725 lxvw4x(49, %[cc], %[cbcmac]) \
[all …]
H A Daes_x86ni_ctrcbc.c258 void *cbcmac, const void *data, size_t len) in br_aes_x86ni_ctrcbc_mac() argument
266 ivx = _mm_loadu_si128(cbcmac); in br_aes_x86ni_ctrcbc_mac()
302 _mm_storeu_si128(cbcmac, ivx); in br_aes_x86ni_ctrcbc_mac()
309 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_x86ni_ctrcbc_encrypt() argument
336 cmx = _mm_loadu_si128(cbcmac); in br_aes_x86ni_ctrcbc_encrypt()
451 _mm_storeu_si128(cbcmac, cmx); in br_aes_x86ni_ctrcbc_encrypt()
458 void *ctr, void *cbcmac, void *data, size_t len) in br_aes_x86ni_ctrcbc_decrypt() argument
484 cmx = _mm_loadu_si128(cbcmac); in br_aes_x86ni_ctrcbc_decrypt()
561 _mm_storeu_si128(cbcmac, cmx); in br_aes_x86ni_ctrcbc_decrypt()
/freebsd/contrib/bearssl/inc/
H A Dbearssl_block.h628 void *ctr, void *cbcmac, void *data, size_t len);
652 void *ctr, void *cbcmac, void *data, size_t len);
689 void *cbcmac, const void *data, size_t len);
876 void *ctr, void *cbcmac, void *data, size_t len);
888 void *ctr, void *cbcmac, void *data, size_t len);
910 void *cbcmac, const void *data, size_t len);
1096 void *ctr, void *cbcmac, void *data, size_t len);
1108 void *ctr, void *cbcmac, void *data, size_t len);
1130 void *cbcmac, const void *data, size_t len);
1315 void *ctr, void *cbcmac, void *data, size_t len);
[all …]
H A Dbearssl_aead.h589 unsigned char cbcmac[16]; member
900 unsigned char cbcmac[16]; member
/freebsd/contrib/bearssl/test/
H A Dtest_crypto.c4019 void *ctr, void *cbcmac, unsigned char *data, size_t len) in do_aes_ctrcbc() argument
4030 if (cbcmac != NULL in do_aes_ctrcbc()
4036 memcpy(zz, cbcmac, sizeof zz); in do_aes_ctrcbc()
4048 memcpy(cbcmac, zz, sizeof zz); in do_aes_ctrcbc()
4100 unsigned char ctr[16], cbcmac[16]; in test_AES_CTRCBC_inner() local
4114 br_hmac_drbg_generate(&rng, cbcmac, 16); in test_AES_CTRCBC_inner()
4129 memcpy(cbcmac1, cbcmac, 16); in test_AES_CTRCBC_inner()
4132 memcpy(cbcmac2, cbcmac, 16); in test_AES_CTRCBC_inner()
4140 memcpy(cbcmac1, cbcmac, 16); in test_AES_CTRCBC_inner()
4145 memcpy(cbcmac2, cbcmac, 16); in test_AES_CTRCBC_inner()
[all …]