/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() 199 Poly1305_Update(&auth_ctx, block, 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() 309 struct poly1305_context auth_ctx; in ossl_chacha20_poly1305_decrypt() local 335 Poly1305_Init(&auth_ctx, block); in ossl_chacha20_poly1305_decrypt() 346 Poly1305_Update(&auth_ctx, block, in ossl_chacha20_poly1305_decrypt() 356 Poly1305_Update(&auth_ctx, block, in ossl_chacha20_poly1305_decrypt() 365 Poly1305_Final(&auth_ctx, tag); in ossl_chacha20_poly1305_decrypt() [all …]
|
/freebsd/sys/dev/cxgbe/crypto/ |
H A D | t4_keyctx.c | 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() 360 t4_copy_partial_hash(axf->type, &auth_ctx, dst); 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 434 memcpy(hin, auth_ctx.sha1ctx.h.b32, in cesa_set_mkey() 435 sizeof(auth_ctx.sha1ctx.h.b32)); 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() 446 &auth_ctx); in cesa_set_mkey() 447 memcpy(hout, 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 | 391 void *auth_ctx, uint8_t padval) in hmac_init_pad() argument 405 axf->Init(auth_ctx); in hmac_init_pad() 406 axf->Update(auth_ctx, key, klen); in hmac_init_pad() 407 axf->Final(hmac_key, auth_ctx); in hmac_init_pad() 415 axf->Init(auth_ctx); in hmac_init_pad() 416 axf->Update(auth_ctx, hmac_key, axf->blocksize); in hmac_init_pad() 422 void *auth_ctx) in hmac_init_ipad() argument 425 hmac_init_pad(axf, key, klen, auth_ctx, HMAC_IPAD_VAL); in hmac_init_ipad() 430 void *auth_ctx) in hmac_init_opad() argument 433 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);
|