/openbmc/linux/crypto/ |
H A D | hmac.c | 47 char *ipad = crypto_shash_ctx_aligned(parent); in hmac_setkey() local 48 char *opad = ipad + ss; in hmac_setkey() 63 err = crypto_shash_digest(shash, inkey, keylen, ipad); in hmac_setkey() 69 memcpy(ipad, inkey, keylen); in hmac_setkey() 71 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey() 72 memcpy(opad, ipad, bs); in hmac_setkey() 75 ipad[i] ^= HMAC_IPAD_VALUE; in hmac_setkey() 80 crypto_shash_update(shash, ipad, bs) ?: in hmac_setkey() 81 crypto_shash_export(shash, ipad) ?: in hmac_setkey()
|
/openbmc/linux/drivers/crypto/inside-secure/ |
H A 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] = swab32(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() 1047 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument 1055 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad() [all …]
|
/openbmc/linux/drivers/crypto/marvell/octeontx/ |
H A D | otx_cptvf_algs.c | 548 * for calculating ipad and opad in cpt_aead_init() 553 ctx->ipad = kzalloc(ss, GFP_KERNEL); in cpt_aead_init() 554 if (!ctx->ipad) { in cpt_aead_init() 561 kfree(ctx->ipad); in cpt_aead_init() 570 kfree(ctx->ipad); in cpt_aead_init() 627 kfree(ctx->ipad); in otx_cpt_aead_exit() 762 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 798 ipad = ctx->ipad; in aead_hmac_init() 801 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init() 802 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init() [all …]
|
H A D | otx_cptvf_algs.h | 115 u8 ipad[64]; member 173 u8 *ipad; member
|
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss-hash.c | 84 tfmctx->ipad = kzalloc(bs, GFP_KERNEL); in sun8i_ss_hmac_setkey() 85 if (!tfmctx->ipad) in sun8i_ss_hmac_setkey() 94 memcpy(tfmctx->ipad, tfmctx->key, tfmctx->keylen); in sun8i_ss_hmac_setkey() 97 tfmctx->ipad[i] ^= HMAC_IPAD_VALUE; in sun8i_ss_hmac_setkey() 108 kfree_sensitive(tfmctx->ipad); in sun8i_ss_hmac_setkey() 154 kfree_sensitive(tfmctx->ipad); in sun8i_ss_hash_exit_tfm() 510 * 1: IPAD in sun8i_ss_hash_run() 589 /* shift all SG one slot up, to free slot 0 for IPAD */ in sun8i_ss_hash_run() 596 addr_xpad = dma_map_single(ss->dev, tfmctx->ipad, bs, DMA_TO_DEVICE); in sun8i_ss_hash_run() 599 dev_err(ss->dev, "Fail to create DMA mapping of ipad\n"); in sun8i_ss_hash_run() [all …]
|
/openbmc/linux/drivers/crypto/marvell/octeontx2/ |
H A D | otx2_cptvf_algs.c | 616 * for calculating ipad and opad in cpt_aead_init() 621 ctx->ipad = kzalloc(ss, GFP_KERNEL); in cpt_aead_init() 622 if (!ctx->ipad) { in cpt_aead_init() 630 kfree(ctx->ipad); in cpt_aead_init() 704 kfree(ctx->ipad); in otx2_cpt_aead_exit() 816 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 853 ipad = ctx->ipad; in aead_hmac_init() 856 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init() 857 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init() 858 memcpy(opad, ipad, bs); in aead_hmac_init() [all …]
|
H A D | otx2_cptvf_algs.h | 105 u8 ipad[64]; member 164 u8 *ipad; member
|
/openbmc/u-boot/tools/ |
H A D | envcrc.c | 80 int ipad = 0xff; in main() local 82 sscanf(argv[1] + 9, "%i", &ipad); in main() 83 pad = ipad; in main()
|
/openbmc/linux/drivers/crypto/marvell/cesa/ |
H A D | hash.c | 1138 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 …]
|
/openbmc/linux/drivers/crypto/cavium/nitrox/ |
H A 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
|
/openbmc/linux/drivers/crypto/intel/keembay/ |
H A 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()
|
/openbmc/linux/drivers/crypto/ |
H A 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 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash() 1776 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash() 1780 return atmel_sha_cpu_hash(dd, hmac->ipad, bs, false, in atmel_sha_hmac_compute_ipad_hash() [all …]
|
H A D | omap-sham.c | 162 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member 462 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4() 464 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4() 994 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init() 1223 * the ipad in the beginning of the buffer if we are going for in omap_sham_final_shash() 1245 * HMAC is always >= 9 because ipad == block size. in omap_sham_final() 1298 bctx->ipad); in omap_sham_setkey() 1303 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey() 1306 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey() 1309 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey() [all …]
|
/openbmc/linux/drivers/crypto/intel/qat/qat_common/ |
H A D | qat_algs.c | 79 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()
|
/openbmc/u-boot/drivers/mmc/ |
H A D | rpmb.c | 193 SHA(K XOR opad, SHA(K XOR ipad, text)) in rpmb_hmac() 196 ipad is the byte 0x36 repeated blocksize times in rpmb_hmac() 205 /* remaining pad bytes are '\0' XOR'd with ipad and opad values */ in rpmb_hmac()
|
/openbmc/u-boot/arch/mips/mach-mt7620/ |
H A D | lowlevel_init.S | 177 /* clean DQ IPAD */ 185 /* clean DQS IPAD */
|
/openbmc/linux/drivers/crypto/cavium/cpt/ |
H A D | cptvf_algs.h | 89 u8 ipad[64]; member
|
/openbmc/linux/drivers/crypto/aspeed/ |
H A D | aspeed-hace-hash.c | 739 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()
|
/openbmc/linux/Documentation/devicetree/bindings/pinctrl/ |
H A D | apple,pinctrl.yaml | 15 iPhone and iPad devices and the "Apple Silicon" Macs.
|
/openbmc/linux/net/mptcp/ |
H A D | crypto.c | 57 /* Generate key xored with ipad */ in mptcp_crypto_hmac_sha()
|
/openbmc/linux/Documentation/devicetree/bindings/interrupt-controller/ |
H A D | apple,aic.yaml | 14 Apple ARM SoC platforms, including various iPhone and iPad devices and the
|
/openbmc/linux/drivers/crypto/caam/ |
H A D | key_gen.c | 31 get a split ipad/opad key
|
/openbmc/linux/drivers/crypto/chelsio/ |
H A 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 unsafe_memcpy(hmacctx->opad, hmacctx->ipad, bs, in chcr_ahash_setkey() 2223 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey() 2232 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey() 2233 hmacctx->ipad, digestsize); in chcr_ahash_setkey() 2236 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/pci/ |
H A D | apple,pcie.yaml | 15 various iPhone and iPad devices and the "Apple Silicon" Macs.
|
/openbmc/linux/drivers/crypto/ccp/ |
H A D | ccp-crypto.h | 194 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
|