/linux-master/crypto/ |
H A D | hmac.c | 27 /* Contains 'u8 ipad[statesize];', then 'u8 opad[statesize];' */ 40 u8 *opad = &tctx->pads[ss]; local 61 memcpy(opad, ipad, bs); 65 opad[i] ^= HMAC_OPAD_VALUE; 72 crypto_shash_update(shash, opad, bs) ?: 73 crypto_shash_export(shash, opad); 114 const u8 *opad = &tctx->pads[ss]; local 118 crypto_shash_import(desc, opad) ?: 130 const u8 *opad = &tctx->pads[ss]; local 134 crypto_shash_import(desc, opad) [all...] |
/linux-master/drivers/crypto/chelsio/ |
H A D | chcr_algo.h | 145 #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) \
|
H A D | chcr_crypto.h | 246 u8 opad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member in struct:hmac_ctx
|
/linux-master/drivers/crypto/marvell/octeontx/ |
H A D | otx_cptvf_algs.h | 116 u8 opad[64]; member in struct:otx_cpt_fchmac_ctx::__anon210 174 u8 *opad; member in struct:otx_cpt_aead_ctx
|
H A D | otx_cptvf_algs.c | 515 * for calculating ipad and opad 604 kfree(ctx->opad); 742 u8 *ipad = NULL, *opad = NULL; local 755 ctx->opad = kzalloc(bs, GFP_KERNEL); 756 if (!ctx->opad) { 767 opad = kzalloc(state_size, GFP_KERNEL); 768 if (!opad) { 785 memcpy(opad, ipad, bs); 789 opad[icount] ^= 0x5c; 807 crypto_shash_update(&ctx->sdesc->shash, opad, b [all...] |
/linux-master/drivers/crypto/marvell/octeontx2/ |
H A D | otx2_cptvf_algs.h | 107 u8 opad[64]; member in struct:otx2_cpt_fc_hmac_ctx::__anon122 170 u8 *opad; member in struct:otx2_cpt_aead_ctx
|
H A D | otx2_cptvf_algs.c | 604 * for calculating ipad and opad 715 kfree(ctx->opad); 831 u8 *ipad = NULL, *opad = NULL; local 844 ctx->opad = kzalloc(bs, GFP_KERNEL); 845 if (!ctx->opad) { 856 opad = kzalloc(state_size, GFP_KERNEL); 857 if (!opad) { 874 memcpy(opad, ipad, bs); 878 opad[icount] ^= 0x5c; 896 crypto_shash_update(&ctx->sdesc->shash, opad, b [all...] |
/linux-master/drivers/crypto/cavium/cpt/ |
H A D | cptvf_algs.h | 90 u8 opad[64]; /* or OPAD */ member in struct:fchmac_context
|
/linux-master/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss-hash.c | 70 tfmctx->opad = kzalloc(bs, GFP_KERNEL); 71 if (!tfmctx->opad) { 78 memcpy(tfmctx->opad, tfmctx->key, tfmctx->keylen); 81 tfmctx->opad[i] ^= HMAC_OPAD_VALUE; 89 kfree_sensitive(tfmctx->opad); 138 kfree_sensitive(tfmctx->opad); 606 addr_xpad = dma_map_single(ss->dev, tfmctx->opad, bs, DMA_TO_DEVICE); 609 dev_err(ss->dev, "Fail to create DMA mapping of opad\n"); 664 * MAP xpad (opad)
|
H A D | sun8i-ss.h | 235 u8 *opad; member in struct:sun8i_ss_hash_tfm_ctx
|
/linux-master/drivers/crypto/marvell/cesa/ |
H A D | hash.c | 1138 u8 *ipad, u8 *opad, 1172 memcpy(opad, ipad, blocksize); 1176 opad[i] ^= HMAC_OPAD_VALUE; 1190 u8 *opad; local 1213 opad = ipad + blocksize; 1215 ret = mv_cesa_ahmac_pad_init(req, key, keylen, ipad, opad, blocksize); 1223 ret = mv_cesa_ahmac_iv_state_init(req, opad, ostate, blocksize); 1136 mv_cesa_ahmac_pad_init(struct ahash_request *req, const u8 *key, unsigned int keylen, u8 *ipad, u8 *opad, unsigned int blocksize) argument
|
/linux-master/drivers/crypto/ccp/ |
H A D | ccp-crypto-sha.c | 162 rctx->cmd.u.sha.opad = ctx->u.sha.key_len ? 303 ctx->u.sha.opad[i] = ctx->u.sha.key[i] ^ HMAC_OPAD_VALUE; 306 sg_init_one(&ctx->u.sha.opad_sg, ctx->u.sha.opad, block_size);
|
H A D | ccp-crypto.h | 195 u8 opad[MAX_SHA_BLOCK_SIZE]; member in struct:ccp_sha_ctx
|
H A D | ccp-ops.c | 1761 if (sha->final && sha->opad) { 1779 scatterwalk_map_and_copy(hmac_buf, sha->opad, 0, block_size, 0); 1811 hmac_cmd.u.sha.opad = NULL;
|
/linux-master/drivers/crypto/inside-secure/ |
H A D | safexcel_hash.c | 207 &ctx->base.opad, req->state_sz); 276 memcpy(sreq->state, &ctx->base.opad, sreq->digest_sz); 707 &ctx->base.opad, req->state_sz)))) 1047 unsigned int keylen, u8 *ipad, u8 *opad) 1079 memcpy(opad, ipad, blocksize); 1083 opad[i] ^= HMAC_OPAD_VALUE; 1123 u8 *ipad, *opad; local 1145 opad = ipad + blocksize; 1147 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); 1155 ret = safexcel_hmac_init_iv(areq, blocksize, opad, ostat 1045 safexcel_hmac_init_pad(struct ahash_request *areq, unsigned int blocksize, const u8 *key, unsigned int keylen, u8 *ipad, u8 *opad) argument [all...] |
/linux-master/include/linux/ |
H A D | ccp.h | 272 * @opad: data to be used for final HMAC operation 294 struct scatterlist *opad; member in struct:ccp_sha_engine
|
/linux-master/drivers/crypto/bcm/ |
H A D | cipher.h | 216 u8 opad[MAX_HASH_BLOCK_SIZE]; member in struct:iproc_ctx_s
|
H A D | cipher.c | 906 rc = do_shash("md5", req->result, ctx->opad, blocksize, 910 rc = do_shash("sha1", req->result, ctx->opad, blocksize, 914 rc = do_shash("sha224", req->result, ctx->opad, blocksize, 918 rc = do_shash("sha256", req->result, ctx->opad, blocksize, 922 rc = do_shash("sha384", req->result, ctx->opad, blocksize, 926 rc = do_shash("sha512", req->result, ctx->opad, blocksize, 2399 unsafe_memcpy(ctx->opad, ctx->ipad, blocksize, 2404 ctx->opad[index] ^= HMAC_OPAD_VALUE; 2408 flow_dump(" opad: ", ctx->opad, blocksiz [all...] |
/linux-master/drivers/crypto/aspeed/ |
H A D | aspeed-hace.h | 167 u8 opad[SHA512_BLOCK_SIZE]; member in struct:aspeed_sha_hmac_ctx
|
H A D | aspeed-hace-hash.c | 365 memcpy(rctx->buffer, bctx->opad, rctx->block_size); 778 memcpy(bctx->opad, bctx->ipad, bs); 782 bctx->opad[i] ^= HMAC_OPAD_VALUE;
|
/linux-master/drivers/crypto/intel/qat/qat_common/ |
H A D | qat_algs.c | 80 char opad[SHA512_BLOCK_SIZE]; member in struct:qat_alg_aead_ctx 124 memset(ctx->opad, 0, block_size); 133 memcpy(ctx->opad, ctx->ipad, digest_size); 136 memcpy(ctx->opad, auth_key, auth_keylen); 141 char *opad_ptr = ctx->opad + i; 181 if (crypto_shash_update(shash, ctx->opad, block_size)) 214 memzero_explicit(ctx->opad, block_size);
|
/linux-master/drivers/crypto/ |
H A D | atmel-sha.c | 1664 u32 opad[SHA512_BLOCK_SIZE / sizeof(u32)]; member in struct:atmel_sha_hmac_ctx 1771 unsafe_memcpy(hmac->opad, hmac->ipad, bs, 1775 hmac->opad[i] ^= 0x5c5c5c5c; 1794 return atmel_sha_cpu_hash(dd, hmac->opad, bs, false, 1808 hmac->opad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); 1903 /* Restore context to finish computing SHA((K' + opad) | d). */ 1907 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); 1989 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); 2317 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]);
|
H A D | omap-sham.c | 163 u8 opad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; 306 u32 *opad = (u32 *)bctx->opad; local 310 opad[i] = omap_sham_read(dd, 314 opad[i]); 1110 crypto_shash_update(shash, bctx->opad, bs) ?: 1309 memcpy(bctx->opad, bctx->ipad, bs); 1313 bctx->opad[i] ^= HMAC_OPAD_VALUE;
|
H A D | sa2ul.c | 129 * @prep_iopad: Function pointer to generate intermediate ipad/opad 146 u16 key_sz, __be32 *ipad, __be32 *opad); 383 /* Prepare the ipad and opad from key as per SHA algorithm step 1*/ 436 u16 key_sz, __be32 *ipad, __be32 *opad) 460 sa_export_shash(&sha, shash, digest_size, opad); 536 __be32 *opad = (void *)(sc_buf + 64); local 544 /* Copy the keys or ipad/opad */ 546 ad->prep_iopad(ad, key, key_sz, ipad, opad); 435 sa_prepare_iopads(struct algo_data *data, const u8 *key, u16 key_sz, __be32 *ipad, __be32 *opad) argument
|
/linux-master/drivers/crypto/cavium/nitrox/ |
H A D | nitrox_req.h | 140 * @opad: OPAD or AUTH KEY if auth_input_type = 1 147 u8 opad[64]; member in struct:auth_keys
|