| /freebsd/sys/crypto/via/ |
| H A D | padlock_hash.c | 224 padlock_copy_ctx(const struct auth_hash *axf, void *sctx, void *dctx) in padlock_copy_ctx() argument 228 (axf->type == CRYPTO_SHA1_HMAC || in padlock_copy_ctx() 229 axf->type == CRYPTO_SHA2_256_HMAC)) { in padlock_copy_ctx() 237 bcopy(sctx, dctx, axf->ctxsize); in padlock_copy_ctx() 242 padlock_free_ctx(const struct auth_hash *axf, void *ctx) in padlock_free_ctx() argument 246 (axf->type == CRYPTO_SHA1_HMAC || in padlock_free_ctx() 247 axf->type == CRYPTO_SHA2_256_HMAC)) { in padlock_free_ctx() 256 const struct auth_hash *axf; in padlock_hash_key_setup() local 258 axf = ses->ses_axf; in padlock_hash_key_setup() 265 padlock_free_ctx(axf, ses->ses_ictx); in padlock_hash_key_setup() [all …]
|
| /freebsd/sys/crypto/openssl/ |
| H A D | ossl.c | 219 struct auth_hash *axf; in ossl_newsession_hash() local 221 axf = ossl_lookup_hash(csp); in ossl_newsession_hash() 222 s->hash.axf = axf; in ossl_newsession_hash() 224 s->hash.mlen = axf->hashsize; in ossl_newsession_hash() 229 axf->Init(&s->hash.ictx); in ossl_newsession_hash() 233 if (axf->Setkey != NULL) { in ossl_newsession_hash() 234 axf->Init(&s->hash.ictx); in ossl_newsession_hash() 235 axf->Setkey(&s->hash.ictx, csp->csp_auth_key, in ossl_newsession_hash() 238 hmac_init_ipad(axf, csp->csp_auth_key, in ossl_newsession_hash() 240 hmac_init_opad(axf, csp->csp_auth_key, in ossl_newsession_hash() [all …]
|
| H A D | ossl.h | 64 struct auth_hash *axf; member
|
| /freebsd/sys/dev/glxsb/ |
| H A D | glxsb_hash.c | 52 const struct auth_hash *axf; in glxsb_hash_key_setup() local 54 axf = ses->ses_axf; in glxsb_hash_key_setup() 55 hmac_init_ipad(axf, key, klen, ses->ses_ictx); in glxsb_hash_key_setup() 56 hmac_init_opad(axf, key, klen, ses->ses_octx); in glxsb_hash_key_setup() 66 const struct auth_hash *axf; in glxsb_authcompute() local 70 axf = ses->ses_axf; in glxsb_authcompute() 71 bcopy(ses->ses_ictx, &ctx, axf->ctxsize); in glxsb_authcompute() 73 axf->Update, &ctx); in glxsb_authcompute() 77 crp->crp_payload_length, axf->Update, &ctx); in glxsb_authcompute() 81 axf->Final(hash, &ctx); in glxsb_authcompute() [all …]
|
| /freebsd/sys/opencrypto/ |
| H A D | cryptosoft.c | 250 const struct auth_hash *axf; in swcr_authcompute() local 255 axf = sw->sw_axf; in swcr_authcompute() 260 hmac_init_ipad(axf, crp->crp_auth_key, in swcr_authcompute() 263 axf->Init(&s.ctx); in swcr_authcompute() 264 axf->Setkey(&s.ctx, crp->crp_auth_key, in swcr_authcompute() 268 memcpy(&s.ctx, sw->sw_ictx, axf->ctxsize); in swcr_authcompute() 271 err = axf->Update(&s.ctx, crp->crp_aad, crp->crp_aad_length); in swcr_authcompute() 274 axf->Update, &s.ctx); in swcr_authcompute() 282 axf->Update, &s.ctx); in swcr_authcompute() 285 crp->crp_payload_length, axf->Update, &s.ctx); in swcr_authcompute() [all …]
|
| H A D | crypto.c | 387 hmac_init_pad(const struct auth_hash *axf, const char *key, int klen, in hmac_init_pad() argument 393 KASSERT(axf->blocksize <= sizeof(hmac_key), in hmac_init_pad() 394 ("Invalid HMAC block size %d", axf->blocksize)); in hmac_init_pad() 401 if (klen > axf->blocksize) { in hmac_init_pad() 402 axf->Init(auth_ctx); in hmac_init_pad() 403 axf->Update(auth_ctx, key, klen); in hmac_init_pad() 404 axf->Final(hmac_key, auth_ctx); in hmac_init_pad() 405 klen = axf->hashsize; in hmac_init_pad() 409 for (i = 0; i < axf->blocksize; i++) in hmac_init_pad() 412 axf->Init(auth_ctx); in hmac_init_pad() [all …]
|
| H A D | cryptodev.h | 650 void hmac_init_ipad(const struct auth_hash *axf, const char *key, int klen, 652 void hmac_init_opad(const struct auth_hash *axf, const char *key, int klen,
|
| /freebsd/sys/dev/cxgbe/crypto/ |
| H A D | t4_keyctx.c | 349 t4_init_hmac_digest(const struct auth_hash *axf, u_int partial_digest_len, in t4_init_hmac_digest() argument 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() 549 const struct auth_hash *axf; in t4_tls_key_ctx() 634 axf = &auth_hash_hmac_sha1; 638 axf = &auth_hash_hmac_sha2_256; in t4_alloc_tls_keyid() 642 axf = &auth_hash_hmac_sha2_384; in t4_alloc_tls_keyid() 648 t4_init_hmac_digest(axf, mac_key_siz in t4_alloc_tls_keyid() 532 const struct auth_hash *axf; t4_tls_key_ctx() local [all...] |
| H A D | t4_crypto.c | 482 const struct auth_hash *axf; in ccr_hash() 492 axf = s->hmac.auth_hash; in ccr_hash() 512 hash_size_in_response = axf->hashsize; in ccr_hash() 516 imm_len = axf->blocksize; in ccr_hash() 556 axf->blocksize : crp->crp_payload_length); in ccr_hash() 587 *(uint64_t *)(dst + axf->blocksize - sizeof(uint64_t)) = in ccr_hash() 588 htobe64(axf->blocksize << 3); in ccr_hash() 819 const struct auth_hash *axf; in ccr_eta() 850 axf = s->hmac.auth_hash; in ccr_eta() 933 if (input_len + roundup2(axf in ccr_eta() 480 const struct auth_hash *axf; ccr_hash() local 817 const struct auth_hash *axf; ccr_eta() local 2050 const struct auth_hash *axf; ccr_init_hash_digest() local [all...] |
| /freebsd/sys/crypto/ccp/ |
| H A D | ccp.c | 235 const struct auth_hash *axf; in ccp_init_hmac_digest() local 242 axf = s->hmac.auth_hash; in ccp_init_hmac_digest() 243 if (klen > axf->blocksize) { in ccp_init_hmac_digest() 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() 248 klen = axf->hashsize; in ccp_init_hmac_digest() 252 memset(s->hmac.ipad + klen, 0, axf->blocksize - klen); in ccp_init_hmac_digest() 253 memcpy(s->hmac.opad, s->hmac.ipad, axf->blocksize); in ccp_init_hmac_digest() 255 for (i = 0; i < axf->blocksize; i++) { in ccp_init_hmac_digest()
|
| H A D | ccp_hardware.c | 995 const struct auth_hash *axf; member 1002 .axf = &auth_hash_hmac_sha1, 1010 .axf = &auth_hash_hmac_sha2_224, 1018 .axf = &auth_hash_hmac_sha2_256, 1025 .axf = &auth_hash_hmac_sha2_384, 1032 .axf = &auth_hash_hmac_sha2_512, 1172 if (defn->axf->hashsize > LSB_ENTRY_SIZE) in ccp_sha_copy_result() 1177 memcpy(output, buffer + 12, defn->axf->hashsize); in ccp_sha_copy_result() 1181 memcpy(output, buffer + XXX, defn->axf->hashsize); in ccp_sha_copy_result() 1185 memcpy(output, buffer, defn->axf->hashsize); in ccp_sha_copy_result() [all …]
|
| /freebsd/sys/dev/dpaa/ |
| H A D | sec_dev.c | 833 const struct auth_hash *axf; in sec_sw_gen_split_key() local 836 axf = crypto_auth_hash(csp); in sec_sw_gen_split_key() 837 hmac_init_ipad(axf, csp->csp_auth_key, csp->csp_auth_klen, &ictx); in sec_sw_gen_split_key() 838 hmac_init_opad(axf, csp->csp_auth_key, csp->csp_auth_klen, &octx); in sec_sw_gen_split_key()
|