Home
last modified time | relevance | path

Searched refs:opad (Results 1 - 25 of 51) sorted by relevance

123

/kernel/linux/linux-5.10/crypto/
H A Dhmac.c47 char *opad = ipad + ss; in hmac_setkey() local
48 struct hmac_ctx *ctx = align_ptr(opad + ss, in hmac_setkey()
68 memcpy(opad, ipad, bs); in hmac_setkey()
72 opad[i] ^= HMAC_OPAD_VALUE; in hmac_setkey()
79 crypto_shash_update(shash, opad, bs) ?: in hmac_setkey()
80 crypto_shash_export(shash, opad); in hmac_setkey()
118 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_final() local
122 crypto_shash_import(desc, opad) ?: in hmac_final()
133 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_finup() local
137 crypto_shash_import(desc, opad) in hmac_finup()
[all...]
/kernel/linux/linux-6.6/crypto/
H A Dhmac.c48 char *opad = ipad + ss; in hmac_setkey() local
49 struct hmac_ctx *ctx = align_ptr(opad + ss, in hmac_setkey()
72 memcpy(opad, ipad, bs); in hmac_setkey()
76 opad[i] ^= HMAC_OPAD_VALUE; in hmac_setkey()
83 crypto_shash_update(shash, opad, bs) ?: in hmac_setkey()
84 crypto_shash_export(shash, opad); in hmac_setkey()
122 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_final() local
126 crypto_shash_import(desc, opad) ?: in hmac_final()
137 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_finup() local
141 crypto_shash_import(desc, opad) in hmac_finup()
[all...]
/kernel/linux/linux-5.10/drivers/crypto/chelsio/
H A Dchcr_algo.h145 #define FILL_SEC_CPL_SCMD0_SEQNO(ctrl, seq, cmode, amode, opad, size) \
154 SCMD_HMAC_CTRL_V((opad)) | \
170 #define FILL_KEY_CTX_HDR(ck_size, mk_size, d_ck, opad, ctx_len) \
175 KEY_CONTEXT_OPAD_PRESENT_V((opad)) | \
179 #define FILL_KEY_CRX_HDR(ck_size, mk_size, d_ck, opad, ctx_len) \
/kernel/linux/linux-6.6/drivers/crypto/chelsio/
H A Dchcr_algo.h145 #define FILL_SEC_CPL_SCMD0_SEQNO(ctrl, seq, cmode, amode, opad, size) \
154 SCMD_HMAC_CTRL_V((opad)) | \
170 #define FILL_KEY_CTX_HDR(ck_size, mk_size, d_ck, opad, ctx_len) \
175 KEY_CONTEXT_OPAD_PRESENT_V((opad)) | \
179 #define FILL_KEY_CRX_HDR(ck_size, mk_size, d_ck, opad, ctx_len) \
/kernel/linux/linux-5.10/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c519 * for calculating ipad and opad in cpt_aead_init()
608 kfree(ctx->opad); in otx_cpt_aead_exit()
746 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
759 ctx->opad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
760 if (!ctx->opad) { in aead_hmac_init()
771 opad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
772 if (!opad) { in aead_hmac_init()
789 memcpy(opad, ipad, bs); in aead_hmac_init()
793 opad[icount] ^= 0x5c; in aead_hmac_init()
811 crypto_shash_update(&ctx->sdesc->shash, opad, b in aead_hmac_init()
[all...]
H A Dotx_cptvf_algs.h116 u8 opad[64]; member
174 u8 *opad; 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()
688 kfree(ctx->opad); in otx2_cpt_aead_exit()
803 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
816 ctx->opad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
817 if (!ctx->opad) { in aead_hmac_init()
828 opad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
829 if (!opad) { in aead_hmac_init()
846 memcpy(opad, ipad, bs); in aead_hmac_init()
850 opad[icount] ^= 0x5c; in aead_hmac_init()
868 crypto_shash_update(&ctx->sdesc->shash, opad, b in aead_hmac_init()
[all...]
H A Dotx2_cptvf_algs.h106 u8 opad[64]; member
165 u8 *opad; 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()
610 kfree(ctx->opad); in otx_cpt_aead_exit()
748 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
761 ctx->opad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
762 if (!ctx->opad) { in aead_hmac_init()
773 opad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
774 if (!opad) { in aead_hmac_init()
791 memcpy(opad, ipad, bs); in aead_hmac_init()
795 opad[icount] ^= 0x5c; in aead_hmac_init()
813 crypto_shash_update(&ctx->sdesc->shash, opad, b in aead_hmac_init()
[all...]
H A Dotx_cptvf_algs.h116 u8 opad[64]; member
174 u8 *opad; member
/kernel/linux/linux-6.6/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c87 tfmctx->opad = kzalloc(bs, GFP_KERNEL); in sun8i_ss_hmac_setkey()
88 if (!tfmctx->opad) { in sun8i_ss_hmac_setkey()
95 memcpy(tfmctx->opad, tfmctx->key, tfmctx->keylen); in sun8i_ss_hmac_setkey()
98 tfmctx->opad[i] ^= HMAC_OPAD_VALUE; in sun8i_ss_hmac_setkey()
106 kfree_sensitive(tfmctx->opad); in sun8i_ss_hmac_setkey()
155 kfree_sensitive(tfmctx->opad); in sun8i_ss_hash_exit_tfm()
623 addr_xpad = dma_map_single(ss->dev, tfmctx->opad, bs, DMA_TO_DEVICE); in sun8i_ss_hash_run()
626 dev_err(ss->dev, "Fail to create DMA mapping of opad\n"); in sun8i_ss_hash_run()
681 * MAP xpad (opad) in sun8i_ss_hash_run()
/kernel/linux/linux-6.6/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c207 &ctx->base.opad, req->state_sz); in safexcel_context_control()
276 memcpy(sreq->state, &ctx->base.opad, sreq->digest_sz); in safexcel_handle_req_result()
707 &ctx->base.opad, req->state_sz)))) in safexcel_ahash_enqueue()
1047 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad()
1079 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
1083 opad[i] ^= HMAC_OPAD_VALUE; in safexcel_hmac_init_pad()
1123 u8 *ipad, *opad; in __safexcel_hmac_setkey() local
1145 opad = ipad + blocksize; in __safexcel_hmac_setkey()
1147 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); in __safexcel_hmac_setkey()
1155 ret = safexcel_hmac_init_iv(areq, blocksize, opad, ostat in __safexcel_hmac_setkey()
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
[all...]
/kernel/linux/linux-5.10/drivers/crypto/marvell/cesa/
H A Dhash.c1134 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init()
1173 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1177 opad[i] ^= HMAC_OPAD_VALUE; in mv_cesa_ahmac_pad_init()
1191 u8 *opad; in mv_cesa_ahmac_setkey() local
1214 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
1216 ret = mv_cesa_ahmac_pad_init(req, key, keylen, ipad, opad, blocksize); in mv_cesa_ahmac_setkey()
1224 ret = mv_cesa_ahmac_iv_state_init(req, opad, ostate, blocksize); 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
/kernel/linux/linux-6.6/drivers/crypto/marvell/cesa/
H A Dhash.c1138 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init()
1172 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1176 opad[i] ^= HMAC_OPAD_VALUE; in mv_cesa_ahmac_pad_init()
1190 u8 *opad; in mv_cesa_ahmac_setkey() local
1213 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
1215 ret = mv_cesa_ahmac_pad_init(req, key, keylen, ipad, opad, blocksize); in mv_cesa_ahmac_setkey()
1223 ret = mv_cesa_ahmac_iv_state_init(req, opad, ostate, blocksize); 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
/kernel/linux/linux-5.10/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.h90 u8 opad[64]; /* or OPAD */ member
/kernel/linux/linux-6.6/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.h90 u8 opad[64]; /* or OPAD */ member
/kernel/linux/linux-5.10/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c205 &ctx->base.opad, req->state_sz); in safexcel_context_control()
274 memcpy(sreq->state, &ctx->base.opad, sreq->digest_sz); in safexcel_handle_req_result()
705 &ctx->base.opad, req->state_sz)))) in safexcel_ahash_enqueue()
1061 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad()
1097 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
1101 opad[i] ^= HMAC_OPAD_VALUE; in safexcel_hmac_init_pad()
1147 u8 *ipad, *opad; in __safexcel_hmac_setkey() local
1169 opad = ipad + blocksize; in __safexcel_hmac_setkey()
1171 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); in __safexcel_hmac_setkey()
1179 ret = safexcel_hmac_init_iv(areq, blocksize, opad, ostat in __safexcel_hmac_setkey()
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
[all...]
/kernel/linux/linux-5.10/drivers/crypto/ccp/
H A Dccp-crypto-sha.c161 rctx->cmd.u.sha.opad = ctx->u.sha.key_len ? in ccp_do_sha_update()
302 ctx->u.sha.opad[i] = ctx->u.sha.key[i] ^ HMAC_OPAD_VALUE; in ccp_sha_setkey()
305 sg_init_one(&ctx->u.sha.opad_sg, ctx->u.sha.opad, block_size); in ccp_sha_setkey()
/kernel/linux/linux-6.6/drivers/crypto/ccp/
H A Dccp-crypto-sha.c162 rctx->cmd.u.sha.opad = ctx->u.sha.key_len ? in ccp_do_sha_update()
303 ctx->u.sha.opad[i] = ctx->u.sha.key[i] ^ HMAC_OPAD_VALUE; in ccp_sha_setkey()
306 sg_init_one(&ctx->u.sha.opad_sg, ctx->u.sha.opad, block_size); in ccp_sha_setkey()
/kernel/linux/linux-5.10/drivers/crypto/
H A Domap-sham.c167 u8 opad[SHA512_BLOCK_SIZE] OMAP_ALIGNED;
311 u32 *opad = (u32 *)bctx->opad; in omap_sham_copy_hash_omap4() local
315 opad[i] = omap_sham_read(dd, in omap_sham_copy_hash_omap4()
319 opad[i]); in omap_sham_copy_hash_omap4()
1126 crypto_shash_update(shash, bctx->opad, bs) ?: in omap_sham_finish_hmac()
1325 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1329 bctx->opad[i] ^= HMAC_OPAD_VALUE; in omap_sham_setkey()
H A Datmel-sha.c1666 u32 opad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1773 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
1776 hmac->opad[i] ^= 0x5c5c5c5c; in atmel_sha_hmac_compute_ipad_hash()
1795 return atmel_sha_cpu_hash(dd, hmac->opad, bs, false, in atmel_sha_hmac_compute_opad_hash()
1809 hmac->opad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_setup_done()
1904 /* Restore context to finish computing SHA((K' + opad) | d). */ in atmel_sha_hmac_final()
1908 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_final()
1972 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_digest2()
2293 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_authenc_init2()
/kernel/linux/linux-6.6/drivers/crypto/
H A Domap-sham.c163 u8 opad[SHA512_BLOCK_SIZE] OMAP_ALIGNED;
306 u32 *opad = (u32 *)bctx->opad; in omap_sham_copy_hash_omap4() local
310 opad[i] = omap_sham_read(dd, in omap_sham_copy_hash_omap4()
314 opad[i]); in omap_sham_copy_hash_omap4()
1110 crypto_shash_update(shash, bctx->opad, bs) ?: in omap_sham_finish_hmac()
1309 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1313 bctx->opad[i] ^= HMAC_OPAD_VALUE; in omap_sham_setkey()
H A Datmel-sha.c1666 u32 opad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1773 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash()
1777 hmac->opad[i] ^= 0x5c5c5c5c; in atmel_sha_hmac_compute_ipad_hash()
1796 return atmel_sha_cpu_hash(dd, hmac->opad, bs, false, in atmel_sha_hmac_compute_opad_hash()
1810 hmac->opad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_setup_done()
1905 /* Restore context to finish computing SHA((K' + opad) | d). */ in atmel_sha_hmac_final()
1909 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_final()
1991 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_digest2()
2319 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_authenc_init2()
/kernel/linux/linux-5.10/drivers/crypto/qat/qat_common/
H A Dqat_algs.c67 char opad[SHA512_BLOCK_SIZE]; member
110 memset(ctx->opad, 0, block_size); in qat_alg_do_precomputes()
119 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
122 memcpy(ctx->opad, auth_key, auth_keylen); in qat_alg_do_precomputes()
127 char *opad_ptr = ctx->opad + i; in qat_alg_do_precomputes()
167 if (crypto_shash_update(shash, ctx->opad, block_size)) in qat_alg_do_precomputes()
200 memzero_explicit(ctx->opad, block_size); in qat_alg_do_precomputes()
/kernel/linux/linux-6.6/drivers/crypto/intel/qat/qat_common/
H A Dqat_algs.c80 char opad[SHA512_BLOCK_SIZE]; member
124 memset(ctx->opad, 0, block_size); in qat_alg_do_precomputes()
133 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
136 memcpy(ctx->opad, auth_key, auth_keylen); in qat_alg_do_precomputes()
141 char *opad_ptr = ctx->opad + i; in qat_alg_do_precomputes()
181 if (crypto_shash_update(shash, ctx->opad, block_size)) in qat_alg_do_precomputes()
214 memzero_explicit(ctx->opad, block_size); in qat_alg_do_precomputes()

Completed in 39 milliseconds

123