Home
last modified time | relevance | path

Searched refs:ipad (Results 1 – 19 of 19) sorted by relevance

/drivers/crypto/inside-secure/
Dsafexcel_hash.c124 memcpy(ctx->base.ctxr->data, &ctx->base.ipad, ctx->key_sz); in safexcel_context_control()
381 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local
384 x = ipad[i] ^ ipad[i + 4]; in safexcel_ahash_send_req()
807 memcpy(areq->result, &ctx->base.ipad, sizeof(u32)); in safexcel_ahash_final()
823 result[i] = swab32(ctx->base.ipad.word[i + 4]); in safexcel_ahash_final()
1019 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
1062 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
1070 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
1079 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad()
1097 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad()
[all …]
Dsafexcel_cipher.c703 &ctx->base.ipad, ctx->state_sz); in safexcel_send_req()
2603 if (be32_to_cpu(ctx->base.ipad.be[i]) != hashkey[i]) { in safexcel_aead_gcm_setkey()
2611 ctx->base.ipad.be[i] = cpu_to_be32(hashkey[i]); in safexcel_aead_gcm_setkey()
2699 ctx->base.ipad.be[i + 2 * AES_BLOCK_SIZE / sizeof(u32)] = in safexcel_aead_ccm_setkey()
Dsafexcel.h845 } ipad, opad; member
/drivers/crypto/marvell/octeontx/
Dotx_cptvf_algs.c607 kfree(ctx->ipad); in otx_cpt_aead_exit()
746 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
753 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
754 if (!ctx->ipad) { in aead_hmac_init()
765 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
766 if (!ipad) { in aead_hmac_init()
779 authkeylen, ipad); in aead_hmac_init()
785 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init()
788 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init()
789 memcpy(opad, ipad, bs); in aead_hmac_init()
[all …]
Dotx_cptvf_algs.h115 u8 ipad[64]; member
173 u8 *ipad; member
/drivers/crypto/marvell/cesa/
Dhash.c1134 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument
1143 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init()
1154 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init()
1172 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init()
1173 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1176 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init()
1190 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local
1208 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey()
1209 if (!ipad) { in mv_cesa_ahmac_setkey()
1214 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
[all …]
/drivers/crypto/mediatek/
Dmtk-sha.c100 u8 ipad[SHA512_BLOCK_SIZE] __aligned(sizeof(u32));
413 memcpy(ctx->buffer, bctx->ipad, ctx->bs); in mtk_sha_init()
810 bctx->ipad); in mtk_sha_setkey()
815 memcpy(bctx->ipad, key, keylen); in mtk_sha_setkey()
818 memset(bctx->ipad + keylen, 0, bs - keylen); in mtk_sha_setkey()
819 memcpy(bctx->opad, bctx->ipad, bs); in mtk_sha_setkey()
822 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in mtk_sha_setkey()
/drivers/crypto/qat/qat_common/
Dqat_algs.c67 char ipad[SHA512_BLOCK_SIZE]; /* sufficient for SHA-1/SHA-256 as well */ member
110 memset(ctx->ipad, 0, block_size); in qat_alg_do_precomputes()
116 auth_keylen, ctx->ipad); in qat_alg_do_precomputes()
120 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
122 memcpy(ctx->ipad, auth_key, auth_keylen); in qat_alg_do_precomputes()
127 char *ipad_ptr = ctx->ipad + i; in qat_alg_do_precomputes()
136 if (crypto_shash_update(shash, ctx->ipad, block_size)) in qat_alg_do_precomputes()
200 memzero_explicit(ctx->ipad, block_size); in qat_alg_do_precomputes()
/drivers/crypto/
Datmel-sha.c1665 u32 ipad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1735 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1736 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1759 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1760 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
1773 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
1775 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash()
1779 return atmel_sha_cpu_hash(dd, hmac->ipad, bs, false, in atmel_sha_hmac_compute_ipad_hash()
1794 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_compute_opad_hash()
1882 memcpy(ctx->digest, hmac->ipad, hs); in atmel_sha_hmac_init_done()
[all …]
Domap-sham.c166 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member
485 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4()
487 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4()
1017 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init()
1314 bctx->ipad); in omap_sham_setkey()
1319 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey()
1322 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey()
1325 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1328 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in omap_sham_setkey()
Dsa2ul.c126 u16 key_sz, __be32 *ipad, __be32 *opad);
414 u16 key_sz, __be32 *ipad, __be32 *opad) in sa_prepare_iopads() argument
426 memzero_explicit(ipad, block_size); in sa_prepare_iopads()
431 sa_export_shash(shash, block_size, digest_size, ipad); in sa_prepare_iopads()
509 __be32 ipad[64], opad[64]; in sa_set_sc_auth() local
519 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth()
522 memcpy(&sc_buf[32], ipad, ad->hash_size); in sa_set_sc_auth()
/drivers/crypto/cavium/cpt/
Dcptvf_algs.h89 u8 ipad[64]; member
/drivers/crypto/ccp/
Dccp-crypto.h193 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
Dccp-crypto-sha.c198 memcpy(rctx->buf, ctx->u.sha.ipad, block_size); in ccp_sha_init()
301 ctx->u.sha.ipad[i] = ctx->u.sha.key[i] ^ HMAC_IPAD_VALUE; in ccp_sha_setkey()
/drivers/crypto/chelsio/
Dchcr_crypto.h243 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
Dchcr_algo.c2217 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()
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()
2331 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2334 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
[all …]
/drivers/crypto/bcm/
Dcipher.h214 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
Dcipher.c2398 memcpy(ctx->ipad, ctx->authkey, ctx->authkeylen); in ahash_hmac_setkey()
2399 memset(ctx->ipad + ctx->authkeylen, 0, in ahash_hmac_setkey()
2402 memcpy(ctx->opad, ctx->ipad, blocksize); in ahash_hmac_setkey()
2405 ctx->ipad[index] ^= HMAC_IPAD_VALUE; in ahash_hmac_setkey()
2409 flow_dump(" ipad: ", ctx->ipad, blocksize); in ahash_hmac_setkey()
2436 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init()
2496 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_digest()
/drivers/crypto/cavium/nitrox/
Dnitrox_req.h144 u8 ipad[64]; member