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