Home
last modified time | relevance | path

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

/linux/crypto/
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()
/linux/drivers/crypto/inside-secure/
A Dsafexcel_hash.c382 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local
385 x = ipad[i] ^ ipad[i + 4]; in safexcel_ahash_send_req()
1071 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
1099 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
1102 ipad[i] ^= HMAC_IPAD_VALUE; in safexcel_hmac_init_pad()
1149 u8 *ipad, *opad; in __safexcel_hmac_setkey() local
1166 if (!ipad) { in __safexcel_hmac_setkey()
1171 opad = ipad + blocksize; in __safexcel_hmac_setkey()
1184 kfree(ipad); in __safexcel_hmac_setkey()
2815 ctx->base.ipad.byte); in safexcel_hmac_sha3_setkey()
[all …]
A Dsafexcel_cipher.c704 &ctx->base.ipad, ctx->state_sz); in safexcel_send_req()
2604 if (be32_to_cpu(ctx->base.ipad.be[i]) != hashkey[i]) { in safexcel_aead_gcm_setkey()
2612 ctx->base.ipad.be[i] = cpu_to_be32(hashkey[i]); in safexcel_aead_gcm_setkey()
2700 ctx->base.ipad.be[i + 2 * AES_BLOCK_SIZE / sizeof(u32)] = in safexcel_aead_ccm_setkey()
A Dsafexcel.h846 } ipad, opad; member
/linux/drivers/crypto/marvell/octeontx/
A Dotx_cptvf_algs.c608 kfree(ctx->ipad); in otx_cpt_aead_exit()
755 if (!ctx->ipad) { in aead_hmac_init()
767 if (!ipad) { in aead_hmac_init()
793 ipad[icount] ^= 0x36; in aead_hmac_init()
806 ret = copy_pad(ctx->mac_type, ctx->ipad, ipad); in aead_hmac_init()
818 kfree(ipad); in aead_hmac_init()
824 kfree(ctx->ipad); in aead_hmac_init()
825 ctx->ipad = NULL; in aead_hmac_init()
828 kfree(ipad); in aead_hmac_init()
990 if (ctx->ipad) in create_aead_ctx_hdr()
[all …]
A Dotx_cptvf_algs.h115 u8 ipad[64]; member
173 u8 *ipad; member
/linux/drivers/crypto/marvell/octeontx2/
A Dotx2_cptvf_algs.c686 kfree(ctx->ipad); in otx2_cpt_aead_exit()
810 if (!ctx->ipad) { in aead_hmac_init()
822 if (!ipad) { in aead_hmac_init()
848 ipad[icount] ^= 0x36; in aead_hmac_init()
861 ret = copy_pad(ctx->mac_type, ctx->ipad, ipad); in aead_hmac_init()
873 kfree(ipad); in aead_hmac_init()
879 kfree(ctx->ipad); in aead_hmac_init()
880 ctx->ipad = NULL; in aead_hmac_init()
883 kfree(ipad); in aead_hmac_init()
1045 if (ctx->ipad) in create_aead_ctx_hdr()
[all …]
A Dotx2_cptvf_algs.h105 u8 ipad[64]; member
164 u8 *ipad; member
/linux/drivers/crypto/marvell/cesa/
A Dhash.c1158 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument
1167 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init()
1178 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init()
1196 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init()
1197 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1200 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init()
1214 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local
1232 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey()
1233 if (!ipad) { in mv_cesa_ahmac_setkey()
1238 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
[all …]
/linux/drivers/crypto/
A 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()
1882 memcpy(ctx->digest, hmac->ipad, hs); in atmel_sha_hmac_init_done()
1968 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->ipad[i]); in atmel_sha_hmac_digest2()
[all …]
A Domap-sham.c166 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member
467 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4()
469 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4()
999 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init()
1299 bctx->ipad); in omap_sham_setkey()
1304 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey()
1307 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey()
1310 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1313 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in omap_sham_setkey()
A Dsa2ul.c145 u16 key_sz, __be32 *ipad, __be32 *opad);
435 u16 key_sz, __be32 *ipad, __be32 *opad) in sa_prepare_iopads() argument
452 sa_export_shash(&sha, shash, digest_size, ipad); in sa_prepare_iopads()
534 __be32 *ipad = (void *)(sc_buf + 32); in sa_set_sc_auth() local
545 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth()
/linux/drivers/crypto/cavium/cpt/
A Dcptvf_algs.h89 u8 ipad[64]; member
/linux/drivers/crypto/qat/qat_common/
A Dqat_algs.c91 char ipad[SHA512_BLOCK_SIZE]; /* sufficient for SHA-1/SHA-256 as well */ member
136 memset(ctx->ipad, 0, block_size); in qat_alg_do_precomputes()
142 auth_keylen, ctx->ipad); in qat_alg_do_precomputes()
146 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
148 memcpy(ctx->ipad, auth_key, auth_keylen); in qat_alg_do_precomputes()
153 char *ipad_ptr = ctx->ipad + i; in qat_alg_do_precomputes()
162 if (crypto_shash_update(shash, ctx->ipad, block_size)) in qat_alg_do_precomputes()
226 memzero_explicit(ctx->ipad, block_size); in qat_alg_do_precomputes()
/linux/drivers/crypto/ccp/
A Dccp-crypto.h194 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
A Dccp-crypto-sha.c199 memcpy(rctx->buf, ctx->u.sha.ipad, block_size); in ccp_sha_init()
302 ctx->u.sha.ipad[i] = ctx->u.sha.key[i] ^ HMAC_IPAD_VALUE; in ccp_sha_setkey()
/linux/drivers/crypto/chelsio/
A Dchcr_crypto.h245 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
A Dchcr_algo.c2211 hmacctx->ipad); in chcr_ahash_setkey()
2216 memcpy(hmacctx->ipad, key, keylen); in chcr_ahash_setkey()
2218 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey()
2219 memcpy(hmacctx->opad, hmacctx->ipad, bs); in chcr_ahash_setkey()
2222 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey()
2231 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey()
2232 hmacctx->ipad, digestsize); in chcr_ahash_setkey()
2235 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey()
2325 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2328 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
[all …]
/linux/drivers/crypto/bcm/
A Dcipher.h215 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
A Dcipher.c2396 memcpy(ctx->ipad, ctx->authkey, ctx->authkeylen); in ahash_hmac_setkey()
2397 memset(ctx->ipad + ctx->authkeylen, 0, in ahash_hmac_setkey()
2400 memcpy(ctx->opad, ctx->ipad, blocksize); in ahash_hmac_setkey()
2403 ctx->ipad[index] ^= HMAC_IPAD_VALUE; in ahash_hmac_setkey()
2407 flow_dump(" ipad: ", ctx->ipad, blocksize); in ahash_hmac_setkey()
2434 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init()
2494 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_digest()
/linux/drivers/crypto/cavium/nitrox/
A Dnitrox_req.h144 u8 ipad[64]; member

Completed in 83 milliseconds