Lines Matching refs:hmacctx
110 return ctx->crypto_ctx->hmacctx; in HMAC_CTX()
1572 struct hmac_ctx *hmacctx = HMAC_CTX(ctx); in create_hash_wr() local
1624 hmacctx->opad, param->alg_prm.result_size); in create_hash_wr()
2203 struct hmac_ctx *hmacctx = HMAC_CTX(h_ctx(tfm)); in chcr_ahash_setkey() local
2208 SHASH_DESC_ON_STACK(shash, hmacctx->base_hash); in chcr_ahash_setkey()
2214 shash->tfm = hmacctx->base_hash; in chcr_ahash_setkey()
2217 hmacctx->ipad); in chcr_ahash_setkey()
2222 memcpy(hmacctx->ipad, key, keylen); in chcr_ahash_setkey()
2224 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey()
2225 memcpy(hmacctx->opad, hmacctx->ipad, bs); in chcr_ahash_setkey()
2228 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey()
2229 *((unsigned int *)(&hmacctx->opad) + i) ^= OPAD_DATA; in chcr_ahash_setkey()
2237 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey()
2238 hmacctx->ipad, digestsize); in chcr_ahash_setkey()
2241 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey()
2243 err = chcr_compute_partial_hash(shash, hmacctx->opad, in chcr_ahash_setkey()
2244 hmacctx->opad, digestsize); in chcr_ahash_setkey()
2247 chcr_change_order(hmacctx->opad, updated_digestsize); in chcr_ahash_setkey()
2323 struct hmac_ctx *hmacctx = HMAC_CTX(h_ctx(rtfm)); in chcr_hmac_init() local
2331 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2334 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2337 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2346 struct hmac_ctx *hmacctx = HMAC_CTX(ctx); in chcr_hmac_cra_init() local
2352 hmacctx->base_hash = chcr_alloc_shash(digestsize); in chcr_hmac_cra_init()
2353 if (IS_ERR(hmacctx->base_hash)) in chcr_hmac_cra_init()
2354 return PTR_ERR(hmacctx->base_hash); in chcr_hmac_cra_init()
2361 struct hmac_ctx *hmacctx = HMAC_CTX(ctx); in chcr_hmac_cra_exit() local
2363 if (hmacctx->base_hash) { in chcr_hmac_cra_exit()
2364 chcr_free_shash(hmacctx->base_hash); in chcr_hmac_cra_exit()
2365 hmacctx->base_hash = NULL; in chcr_hmac_cra_exit()