Home
last modified time | relevance | path

Searched full:ipad (Results 1 – 25 of 27) sorted by relevance

12

/linux/crypto/
H A Dhmac.c27 /* Contains 'u8 ipad[statesize];', then 'u8 opad[statesize];' */
39 u8 *ipad = &tctx->pads[0]; in hmac_setkey() local
52 err = crypto_shash_digest(shash, inkey, keylen, ipad); in hmac_setkey()
58 memcpy(ipad, inkey, keylen); in hmac_setkey()
60 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey()
61 memcpy(opad, ipad, bs); in hmac_setkey()
64 ipad[i] ^= HMAC_IPAD_VALUE; in hmac_setkey()
69 crypto_shash_update(shash, ipad, bs) ?: in hmac_setkey()
70 crypto_shash_export(shash, ipad) ?: in hmac_setkey()
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c542 * for calculating ipad and opad in cpt_aead_init()
547 ctx->ipad = kzalloc(ss, GFP_KERNEL); in cpt_aead_init()
548 if (!ctx->ipad) { in cpt_aead_init()
555 kfree(ctx->ipad); in cpt_aead_init()
564 kfree(ctx->ipad); in cpt_aead_init()
621 kfree(ctx->ipad); in otx_cpt_aead_exit()
756 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
792 ipad = ctx->ipad; in aead_hmac_init()
795 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init()
796 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init()
[all …]
H A Dotx_cptvf_algs.h115 u8 ipad[64]; member
173 u8 *ipad; member
/linux/drivers/crypto/marvell/octeontx2/
H A Dotx2_cptvf_algs.c634 * for calculating ipad and opad in cpt_aead_init()
639 ctx->ipad = kzalloc(ss, GFP_KERNEL); in cpt_aead_init()
640 if (!ctx->ipad) { in cpt_aead_init()
648 kfree(ctx->ipad); in cpt_aead_init()
731 kfree(ctx->ipad); in otx2_cpt_aead_exit()
844 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
881 ipad = ctx->ipad; in aead_hmac_init()
884 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init()
885 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init()
886 memcpy(opad, ipad, bs); in aead_hmac_init()
[all …]
H A Dotx2_cptvf_algs.h106 u8 ipad[64]; member
169 u8 *ipad; member
/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c67 tfmctx->ipad = kzalloc(bs, GFP_KERNEL); in sun8i_ss_hmac_setkey()
68 if (!tfmctx->ipad) in sun8i_ss_hmac_setkey()
77 memcpy(tfmctx->ipad, tfmctx->key, tfmctx->keylen); in sun8i_ss_hmac_setkey()
80 tfmctx->ipad[i] ^= HMAC_IPAD_VALUE; in sun8i_ss_hmac_setkey()
91 kfree_sensitive(tfmctx->ipad); in sun8i_ss_hmac_setkey()
137 kfree_sensitive(tfmctx->ipad); in sun8i_ss_hash_exit_tfm()
493 * 1: IPAD in sun8i_ss_hash_run()
572 /* shift all SG one slot up, to free slot 0 for IPAD */ in sun8i_ss_hash_run()
579 addr_xpad = dma_map_single(ss->dev, tfmctx->ipad, bs, DMA_TO_DEVICE); in sun8i_ss_hash_run()
582 dev_err(ss->dev, "Fail to create DMA mapping of ipad\n"); in sun8i_ss_hash_run()
[all …]
H A Dsun8i-ss.h234 u8 *ipad; member
/linux/drivers/crypto/marvell/cesa/
H A Dhash.c1138 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument
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 + blocksize; in mv_cesa_ahmac_setkey()
[all …]
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_req.h139 * @ipad: IPAD or KEY2 for AES-XTS
144 u8 ipad[64]; member
184 * 1 - Authentication IV and KEY, microcode calculates OPAD/IPAD
185 * 0 - Authentication OPAD/IPAD
H A Dnitrox_aead.c319 /* ask microcode to calculate ipad/opad */ in nitrox_gcm_common_init()
/linux/drivers/crypto/intel/keembay/
H A Dkeembay-ocs-hcu-core.c63 * artifacts (ipad, opad, etc.).
83 * - ipad (1 block) + a possible partial block of data.
84 * - opad (1 block) + digest of H(k ^ ipad || m)
398 * Prepare IPAD for HMAC. Only done for first block. in prepare_ipad()
399 * HMAC(k,m) = H(k ^ opad || H(k ^ ipad || m)) in prepare_ipad()
400 * k ^ ipad will be first hashed block. in prepare_ipad()
521 * of: H(k ^ ipad || m). in kmb_ocs_hcu_do_one_request()
525 * the digest we just obtained, i.e., H(k ^ ipad || m). in kmb_ocs_hcu_do_one_request()
/linux/drivers/crypto/
H A Datmel-sha.c1663 u32 ipad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1732 /* Prepare ipad. */ in atmel_sha_hmac_setup()
1733 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1734 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1755 /* Prepare ipad. */ in atmel_sha_hmac_prehash_key_done()
1757 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1758 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
1771 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash()
1774 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash()
1778 return atmel_sha_cpu_hash(dd, hmac->ipad, bs, false, in atmel_sha_hmac_compute_ipad_hash()
[all …]
/linux/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()
/linux/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()
H A Daspeed-hace.h166 u8 ipad[SHA512_BLOCK_SIZE]; member
/linux/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.h89 u8 ipad[64]; member
/linux/net/mptcp/
H A Dcrypto.c57 /* Generate key xored with ipad */ in mptcp_crypto_hmac_sha()
/linux/Documentation/devicetree/bindings/interrupt-controller/
H A Dapple,aic.yaml14 Apple ARM SoC platforms, including various iPhone and iPad devices and the
/linux/drivers/crypto/caam/
H A Dkey_gen.c31 get a split ipad/opad key
/linux/drivers/crypto/ccp/
H 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()
H A Dccp-crypto.h194 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
/linux/drivers/crypto/chelsio/
H A Dchcr_crypto.h245 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
/linux/drivers/crypto/bcm/
H A Dcipher.h215 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
/linux/drivers/crypto/inside-secure/
H A Dsafexcel_cipher.c516 /* Take in account the ipad+opad digests */ in safexcel_context_control()
709 &ctx->base.ipad, ctx->state_sz); in safexcel_send_req()
2540 if (be32_to_cpu(ctx->base.ipad.be[i]) != hashkey[i]) { in safexcel_aead_gcm_setkey()
2548 ctx->base.ipad.be[i] = cpu_to_be32(hashkey[i]); in safexcel_aead_gcm_setkey()
2632 ctx->base.ipad.be[i + 2 * AES_BLOCK_SIZE / sizeof(u32)] = in safexcel_aead_ccm_setkey()
/linux/arch/mips/boot/
H A Delf2ecoff.c553 perror("ipad: write"); in main()

12