Home
last modified time | relevance | path

Searched refs:ipad (Results 1 - 25 of 45) sorted by relevance

12

/kernel/linux/linux-5.10/crypto/
H A Dhmac.c46 char *ipad = crypto_shash_ctx_aligned(parent); in hmac_setkey() local
47 char *opad = ipad + ss; in hmac_setkey()
59 err = crypto_shash_digest(shash, inkey, keylen, ipad); in hmac_setkey()
65 memcpy(ipad, inkey, keylen); in hmac_setkey()
67 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey()
68 memcpy(opad, ipad, bs); in hmac_setkey()
71 ipad[i] ^= HMAC_IPAD_VALUE; in hmac_setkey()
76 crypto_shash_update(shash, ipad, bs) ?: in hmac_setkey()
77 crypto_shash_export(shash, ipad) ?: in hmac_setkey()
/kernel/linux/linux-6.6/crypto/
H A Dhmac.c47 char *ipad = crypto_shash_ctx_aligned(parent); in hmac_setkey() local
48 char *opad = ipad + ss; in hmac_setkey()
63 err = crypto_shash_digest(shash, inkey, keylen, ipad); in hmac_setkey()
69 memcpy(ipad, inkey, keylen); in hmac_setkey()
71 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey()
72 memcpy(opad, ipad, bs); in hmac_setkey()
75 ipad[i] ^= HMAC_IPAD_VALUE; in hmac_setkey()
80 crypto_shash_update(shash, ipad, bs) ?: in hmac_setkey()
81 crypto_shash_export(shash, ipad) ?: in hmac_setkey()
/kernel/linux/linux-6.6/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c125 memcpy(ctx->base.ctxr->data, &ctx->base.ipad, ctx->key_sz); in safexcel_context_control()
382 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local
385 x = ipad[i] ^ ipad[i + 4]; in safexcel_ahash_send_req()
808 memcpy(areq->result, &ctx->base.ipad, sizeof(u32)); in safexcel_ahash_final()
824 result[i] = swab32(ctx->base.ipad.word[i + 4]); in safexcel_ahash_final()
1019 /* Start from ipad precompute */ in safexcel_hmac_sha1_init()
1020 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
1021 /* Already processed the key^ipad par in safexcel_hmac_sha1_init()
1045 safexcel_hmac_init_pad(struct ahash_request *areq, unsigned int blocksize, const u8 *key, unsigned int keylen, u8 *ipad, u8 *opad) safexcel_hmac_init_pad() argument
1123 u8 *ipad, *opad; __safexcel_hmac_setkey() local
[all...]
/kernel/linux/linux-5.10/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c123 memcpy(ctx->base.ctxr->data, &ctx->base.ipad, ctx->key_sz); in safexcel_context_control()
380 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local
383 x = ipad[i] ^ ipad[i + 4]; in safexcel_ahash_send_req()
806 memcpy(areq->result, &ctx->base.ipad, sizeof(u32)); in safexcel_ahash_final()
822 result[i] = swab32(ctx->base.ipad.word[i + 4]); in safexcel_ahash_final()
1017 /* Start from ipad precompute */ in safexcel_hmac_sha1_init()
1018 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
1019 /* Already processed the key^ipad par in safexcel_hmac_sha1_init()
1059 safexcel_hmac_init_pad(struct ahash_request *areq, unsigned int blocksize, const u8 *key, unsigned int keylen, u8 *ipad, u8 *opad) safexcel_hmac_init_pad() argument
1147 u8 *ipad, *opad; __safexcel_hmac_setkey() local
[all...]
/kernel/linux/linux-5.10/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c519 * for calculating ipad and opad in cpt_aead_init()
607 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 in aead_hmac_init()
[all...]
H A Dotx_cptvf_algs.h115 u8 ipad[64]; member
173 u8 *ipad; member
/kernel/linux/linux-6.6/drivers/crypto/marvell/octeontx2/
H A Dotx2_cptvf_algs.c586 * for calculating ipad and opad in cpt_aead_init()
687 kfree(ctx->ipad); in otx2_cpt_aead_exit()
803 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
810 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
811 if (!ctx->ipad) { in aead_hmac_init()
822 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
823 if (!ipad) { in aead_hmac_init()
836 authkeylen, ipad); in aead_hmac_init()
842 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init()
845 memset(ipad in aead_hmac_init()
[all...]
H A Dotx2_cptvf_algs.h105 u8 ipad[64]; member
164 u8 *ipad; member
/kernel/linux/linux-6.6/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c521 * for calculating ipad and opad in cpt_aead_init()
609 kfree(ctx->ipad); in otx_cpt_aead_exit()
748 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
755 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
756 if (!ctx->ipad) { in aead_hmac_init()
767 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
768 if (!ipad) { in aead_hmac_init()
781 authkeylen, ipad); in aead_hmac_init()
787 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init()
790 memset(ipad in aead_hmac_init()
[all...]
H A Dotx_cptvf_algs.h115 u8 ipad[64]; member
173 u8 *ipad; member
/kernel/linux/linux-5.10/drivers/crypto/marvell/cesa/
H A Dhash.c1134 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init()
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 in mv_cesa_ahmac_setkey()
1132 mv_cesa_ahmac_pad_init(struct ahash_request *req, const u8 *key, unsigned int keylen, u8 *ipad, u8 *opad, unsigned int blocksize) mv_cesa_ahmac_pad_init() argument
[all...]
/kernel/linux/linux-6.6/drivers/crypto/marvell/cesa/
H A Dhash.c1138 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init()
1147 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init()
1157 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init()
1171 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init()
1172 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1175 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init()
1189 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local
1207 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey()
1208 if (!ipad) { in mv_cesa_ahmac_setkey()
1213 opad = ipad in mv_cesa_ahmac_setkey()
1136 mv_cesa_ahmac_pad_init(struct ahash_request *req, const u8 *key, unsigned int keylen, u8 *ipad, u8 *opad, unsigned int blocksize) mv_cesa_ahmac_pad_init() argument
[all...]
/kernel/linux/linux-6.6/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c84 tfmctx->ipad = kzalloc(bs, GFP_KERNEL); in sun8i_ss_hmac_setkey()
85 if (!tfmctx->ipad) in sun8i_ss_hmac_setkey()
94 memcpy(tfmctx->ipad, tfmctx->key, tfmctx->keylen); in sun8i_ss_hmac_setkey()
97 tfmctx->ipad[i] ^= HMAC_IPAD_VALUE; in sun8i_ss_hmac_setkey()
108 kfree_sensitive(tfmctx->ipad); in sun8i_ss_hmac_setkey()
154 kfree_sensitive(tfmctx->ipad); in sun8i_ss_hash_exit_tfm()
596 addr_xpad = dma_map_single(ss->dev, tfmctx->ipad, bs, DMA_TO_DEVICE); in sun8i_ss_hash_run()
599 dev_err(ss->dev, "Fail to create DMA mapping of ipad\n"); in sun8i_ss_hash_run()
678 * MAP xpad (ipad) in sun8i_ss_hash_run()
/kernel/linux/linux-5.10/drivers/crypto/mediatek/
H A 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()
/kernel/linux/linux-5.10/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.h89 u8 ipad[64]; member
/kernel/linux/linux-6.6/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.h89 u8 ipad[64]; member
/kernel/linux/linux-5.10/drivers/crypto/
H A Datmel-sha.c1665 u32 ipad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1734 /* Prepare ipad. */ in atmel_sha_hmac_setup()
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()
1757 /* Prepare ipad. */ in atmel_sha_hmac_prehash_key_done()
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, b in atmel_sha_hmac_compute_ipad_hash()
[all...]
H A Domap-sham.c166 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED;
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()
1239 * the ipad in the beginning of the buffer if we are going for in omap_sham_final_shash()
1261 * HMAC is always >= 9 because ipad == block size. in omap_sham_final()
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, b in omap_sham_setkey()
[all...]
/kernel/linux/linux-6.6/drivers/crypto/
H A Datmel-sha.c1665 u32 ipad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1734 /* Prepare ipad. */ in atmel_sha_hmac_setup()
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()
1757 /* Prepare ipad. */ in atmel_sha_hmac_prehash_key_done()
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 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash()
1776 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash()
1780 return atmel_sha_cpu_hash(dd, hmac->ipad, b in atmel_sha_hmac_compute_ipad_hash()
[all...]
H A Domap-sham.c162 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED;
462 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4()
464 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4()
994 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init()
1223 * the ipad in the beginning of the buffer if we are going for in omap_sham_final_shash()
1245 * HMAC is always >= 9 because ipad == block size. in omap_sham_final()
1298 bctx->ipad); in omap_sham_setkey()
1303 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey()
1306 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey()
1309 memcpy(bctx->opad, bctx->ipad, b in omap_sham_setkey()
[all...]
/kernel/linux/linux-6.6/drivers/crypto/aspeed/
H A Daspeed-hace-hash.c739 memcpy(rctx->buffer, bctx->ipad, rctx->block_size); in aspeed_sham_init()
768 key, keylen, bctx->ipad); in aspeed_sham_setkey()
774 memcpy(bctx->ipad, key, keylen); in aspeed_sham_setkey()
777 memset(bctx->ipad + keylen, 0, bs - keylen); in aspeed_sham_setkey()
778 memcpy(bctx->opad, bctx->ipad, bs); in aspeed_sham_setkey()
781 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in aspeed_sham_setkey()
/kernel/linux/linux-5.10/drivers/crypto/qat/qat_common/
H A Dqat_algs.c66 char ipad[SHA512_BLOCK_SIZE]; /* sufficient for SHA-1/SHA-256 as well */ member
109 memset(ctx->ipad, 0, block_size); in qat_alg_do_precomputes()
115 auth_keylen, ctx->ipad); in qat_alg_do_precomputes()
119 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
121 memcpy(ctx->ipad, auth_key, auth_keylen); in qat_alg_do_precomputes()
126 char *ipad_ptr = ctx->ipad + i; in qat_alg_do_precomputes()
135 if (crypto_shash_update(shash, ctx->ipad, block_size)) in qat_alg_do_precomputes()
199 memzero_explicit(ctx->ipad, block_size); in qat_alg_do_precomputes()
/kernel/linux/linux-6.6/drivers/crypto/intel/qat/qat_common/
H A Dqat_algs.c79 char ipad[SHA512_BLOCK_SIZE]; /* sufficient for SHA-1/SHA-256 as well */ member
123 memset(ctx->ipad, 0, block_size); in qat_alg_do_precomputes()
129 auth_keylen, ctx->ipad); in qat_alg_do_precomputes()
133 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
135 memcpy(ctx->ipad, auth_key, auth_keylen); in qat_alg_do_precomputes()
140 char *ipad_ptr = ctx->ipad + i; in qat_alg_do_precomputes()
149 if (crypto_shash_update(shash, ctx->ipad, block_size)) in qat_alg_do_precomputes()
213 memzero_explicit(ctx->ipad, block_size); in qat_alg_do_precomputes()
/kernel/linux/linux-5.10/drivers/crypto/chelsio/
H A Dchcr_crypto.h243 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
/kernel/linux/linux-5.10/drivers/crypto/ccp/
H A Dccp-crypto.h193 u8 ipad[MAX_SHA_BLOCK_SIZE]; member

Completed in 41 milliseconds

12