| /Linux-v5.15/crypto/ |
| D | hmac.c | 46 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-v5.15/drivers/crypto/inside-secure/ |
| D | safexcel_hash.c | 125 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] = swab(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 part now! */ in safexcel_hmac_sha1_init() 1063 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument 1071 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad() [all …]
|
| /Linux-v5.15/drivers/crypto/marvell/octeontx/ |
| D | otx_cptvf_algs.c | 520 * for calculating ipad and opad in cpt_aead_init() 608 kfree(ctx->ipad); in otx_cpt_aead_exit() 747 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 754 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init() 755 if (!ctx->ipad) { in aead_hmac_init() 766 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init() 767 if (!ipad) { in aead_hmac_init() 780 authkeylen, ipad); in aead_hmac_init() 786 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init() 789 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init() [all …]
|
| D | otx_cptvf_algs.h | 115 u8 ipad[64]; member 173 u8 *ipad; member
|
| /Linux-v5.15/drivers/crypto/marvell/octeontx2/ |
| D | otx2_cptvf_algs.c | 585 * for calculating ipad and opad in cpt_aead_init() 686 kfree(ctx->ipad); in otx2_cpt_aead_exit() 802 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 809 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init() 810 if (!ctx->ipad) { in aead_hmac_init() 821 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init() 822 if (!ipad) { in aead_hmac_init() 835 authkeylen, ipad); in aead_hmac_init() 841 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init() 844 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init() [all …]
|
| D | otx2_cptvf_algs.h | 105 u8 ipad[64]; member 164 u8 *ipad; member
|
| /Linux-v5.15/drivers/crypto/marvell/cesa/ |
| D | hash.c | 1158 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-v5.15/drivers/crypto/cavium/nitrox/ |
| D | nitrox_req.h | 139 * @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
|
| /Linux-v5.15/drivers/crypto/keembay/ |
| D | keembay-ocs-hcu-core.c | 63 * 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-v5.15/drivers/crypto/ |
| D | atmel-sha.c | 1665 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, bs, false, in atmel_sha_hmac_compute_ipad_hash() [all …]
|
| D | omap-sham.c | 166 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() 1224 * the ipad in the beginning of the buffer if we are going for in omap_sham_final_shash() 1246 * HMAC is always >= 9 because ipad == block size. in omap_sham_final() 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() [all …]
|
| D | sa2ul.c | 128 * @prep_iopad: Function pointer to generate intermediate ipad/opad 145 u16 key_sz, __be32 *ipad, __be32 *opad); 382 /* Prepare the ipad and opad from key as per SHA algorithm step 1*/ 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 543 /* Copy the keys or ipad/opad */ in sa_set_sc_auth() 545 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth()
|
| /Linux-v5.15/drivers/crypto/qat/qat_common/ |
| D | qat_algs.c | 91 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-v5.15/drivers/crypto/cavium/cpt/ |
| D | cptvf_algs.h | 89 u8 ipad[64]; member
|
| /Linux-v5.15/Documentation/devicetree/bindings/interrupt-controller/ |
| D | apple,aic.yaml | 14 Apple ARM SoC platforms, including various iPhone and iPad devices and the
|
| /Linux-v5.15/Documentation/devicetree/bindings/pinctrl/ |
| D | apple,pinctrl.yaml | 15 iPhone and iPad devices and the "Apple Silicon" Macs.
|
| /Linux-v5.15/net/mptcp/ |
| D | crypto.c | 57 /* Generate key xored with ipad */ in mptcp_crypto_hmac_sha()
|
| /Linux-v5.15/drivers/crypto/chelsio/ |
| D | chcr_algo.c | 2204 /* use the key to calculate the ipad and opad. ipad will sent with the in chcr_ahash_setkey() 2206 * ipad in hmacctx->ipad and opad in hmacctx->opad location in chcr_ahash_setkey() 2211 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() [all …]
|
| D | chcr_crypto.h | 243 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
|
| /Linux-v5.15/drivers/crypto/caam/ |
| D | key_gen.c | 31 get a split ipad/opad key
|
| /Linux-v5.15/drivers/crypto/ccp/ |
| D | ccp-crypto.h | 194 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
|
| D | ccp-crypto-sha.c | 199 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-v5.15/drivers/crypto/bcm/ |
| D | cipher.c | 2392 * So keeping the generation of IPAD, OPAD and in ahash_hmac_setkey() 2396 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() 2433 /* start with a prepended ipad */ in ahash_hmac_init() 2434 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init() 2482 * hardware, need not to generate IPAD, OPAD and in ahash_hmac_digest() 2493 /* start with a prepended ipad */ in ahash_hmac_digest() [all …]
|
| /Linux-v5.15/drivers/crypto/ccree/ |
| D | cc_hash.c | 402 /* Memory Barrier: wait for IPAD/OPAD axi write to complete */ in cc_fin_hmac() 464 /* If HMAC then load hash IPAD xor key, if HASH then load initial in cc_hash_digest() 873 /* Prepare ipad key */ in cc_hash_setkey() 890 /* Get the IPAD/OPAD xor key (Note, IPAD is the initial digest in cc_hash_setkey()
|
| D | cc_aead.c | 36 u8 *ipad_opad; /* IPAD, OPAD*/ 173 /* Allocate dma-coherent buffer for IPAD + OPAD */ in cc_aead_init() 179 dev_err(dev, "Failed allocating IPAD/OPAD buffer\n"); in cc_aead_init() 327 /* Prepare ipad key */ in hmac_setkey() 999 /* Loading hash ipad xor key state */ in cc_set_hmac_desc()
|