/freebsd/sys/crypto/openssl/ |
H A D | ossl_chacha20.c | 163 POLY1305 auth_ctx; in ossl_chacha20_poly1305_encrypt() local 188 Poly1305_Init(&auth_ctx, block); in ossl_chacha20_poly1305_encrypt() 192 Poly1305_Update(&auth_ctx, crp->crp_aad, crp->crp_aad_length); in ossl_chacha20_poly1305_encrypt() 195 ossl_poly1305_update, &auth_ctx); in ossl_chacha20_poly1305_encrypt() 199 Poly1305_Update(&auth_ctx, block, in ossl_chacha20_poly1305_encrypt() 247 Poly1305_Update(&auth_ctx, out, todo); in ossl_chacha20_poly1305_encrypt() 280 Poly1305_Update(&auth_ctx, block, todo); in ossl_chacha20_poly1305_encrypt() 286 Poly1305_Update(&auth_ctx, block, sizeof(uint64_t) * 2); in ossl_chacha20_poly1305_encrypt() 288 Poly1305_Final(&auth_ctx, tag); in ossl_chacha20_poly1305_encrypt() 292 explicit_bzero(&auth_ctx, sizeof(auth_ctx)); in ossl_chacha20_poly1305_encrypt() [all …]
|
/freebsd/sys/dev/cxgbe/crypto/ |
H A D | t4_keyctx.c | 311 t4_copy_partial_hash(int alg, union authctx *auth_ctx, void *dst) in t4_copy_partial_hash() argument 323 u32[i] = htobe32(auth_ctx->sha1ctx.h.b32[i]); in t4_copy_partial_hash() 328 u32[i] = htobe32(auth_ctx->sha224ctx.state[i]); in t4_copy_partial_hash() 333 u32[i] = htobe32(auth_ctx->sha256ctx.state[i]); in t4_copy_partial_hash() 338 u64[i] = htobe64(auth_ctx->sha384ctx.state[i]); in t4_copy_partial_hash() 343 u64[i] = htobe64(auth_ctx->sha512ctx.state[i]); in t4_copy_partial_hash() 352 union authctx auth_ctx; in t4_init_hmac_digest() local 354 hmac_init_ipad(axf, key, klen, &auth_ctx); in t4_init_hmac_digest() 355 t4_copy_partial_hash(axf->type, &auth_ctx, dst); in t4_init_hmac_digest() 359 hmac_init_opad(axf, key, klen, &auth_ctx); in t4_init_hmac_digest() [all …]
|
H A D | t4_crypto.c | 2049 union authctx auth_ctx; in ccr_init_hash_digest() local 2053 axf->Init(&auth_ctx); in ccr_init_hash_digest() 2054 t4_copy_partial_hash(axf->type, &auth_ctx, s->hmac.pads); in ccr_init_hash_digest()
|
/freebsd/sys/dev/cesa/ |
H A D | cesa.c | 423 union authctx auth_ctx; in cesa_set_mkey() local 433 hmac_init_ipad(&auth_hash_hmac_sha1, mkey, mklen, &auth_ctx); in cesa_set_mkey() 434 memcpy(hin, auth_ctx.sha1ctx.h.b32, in cesa_set_mkey() 435 sizeof(auth_ctx.sha1ctx.h.b32)); in cesa_set_mkey() 436 hmac_init_opad(&auth_hash_hmac_sha1, mkey, mklen, &auth_ctx); in cesa_set_mkey() 437 memcpy(hout, auth_ctx.sha1ctx.h.b32, in cesa_set_mkey() 438 sizeof(auth_ctx.sha1ctx.h.b32)); in cesa_set_mkey() 442 &auth_ctx); in cesa_set_mkey() 443 memcpy(hin, auth_ctx.sha256ctx.state, in cesa_set_mkey() 444 sizeof(auth_ctx.sha256ctx.state)); in cesa_set_mkey() [all …]
|
/freebsd/sys/crypto/ccp/ |
H A D | ccp.c | 234 union authctx auth_ctx; in ccp_init_hmac_digest() local 244 axf->Init(&auth_ctx); in ccp_init_hmac_digest() 245 axf->Update(&auth_ctx, key, klen); in ccp_init_hmac_digest() 246 axf->Final(s->hmac.ipad, &auth_ctx); in ccp_init_hmac_digest() 247 explicit_bzero(&auth_ctx, sizeof(auth_ctx)); in ccp_init_hmac_digest()
|
H A D | ccp_hardware.c | 1206 union authctx auth_ctx; in ccp_do_hmac_done() local 1219 axf->Init(&auth_ctx); in ccp_do_hmac_done() 1220 axf->Update(&auth_ctx, s->hmac.opad, axf->blocksize); in ccp_do_hmac_done() 1226 axf->Update(&auth_ctx, ihash, axf->hashsize); in ccp_do_hmac_done() 1227 axf->Final(s->hmac.res, &auth_ctx); in ccp_do_hmac_done() 1239 explicit_bzero(&auth_ctx, sizeof(auth_ctx)); in ccp_do_hmac_done()
|
/freebsd/sys/opencrypto/ |
H A D | crypto.c | 384 void *auth_ctx, uint8_t padval) in hmac_init_pad() argument 398 axf->Init(auth_ctx); in hmac_init_pad() 399 axf->Update(auth_ctx, key, klen); in hmac_init_pad() 400 axf->Final(hmac_key, auth_ctx); in hmac_init_pad() 408 axf->Init(auth_ctx); in hmac_init_pad() 409 axf->Update(auth_ctx, hmac_key, axf->blocksize); in hmac_init_pad() 415 void *auth_ctx) in hmac_init_ipad() argument 418 hmac_init_pad(axf, key, klen, auth_ctx, HMAC_IPAD_VAL); in hmac_init_ipad() 423 void *auth_ctx) in hmac_init_opad() argument 426 hmac_init_pad(axf, key, klen, auth_ctx, HMAC_OPAD_VAL); in hmac_init_opad()
|
H A D | cryptodev.h | 651 void *auth_ctx); 653 void *auth_ctx);
|