| /drivers/crypto/inside-secure/ |
| A D | safexcel_hash.c | 378 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local 381 x = ipad[i] ^ ipad[i + 4]; in safexcel_ahash_send_req() 1053 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad() 1077 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad() 1080 ipad[i] ^= HMAC_IPAD_VALUE; in safexcel_hmac_init_pad() 1121 u8 *ipad, *opad; in __safexcel_hmac_setkey() local 1138 if (!ipad) { in __safexcel_hmac_setkey() 1143 opad = ipad + blocksize; in __safexcel_hmac_setkey() 1156 kfree(ipad); in __safexcel_hmac_setkey() 2685 ctx->base.ipad.byte); in safexcel_hmac_sha3_setkey() [all …]
|
| A D | safexcel_cipher.c | 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()
|
| /drivers/crypto/marvell/octeontx/ |
| A D | otx_cptvf_algs.c | 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() 797 memcpy(opad, ipad, bs); in aead_hmac_init() 800 ipad[icount] ^= 0x36; in aead_hmac_init() 910 if (ctx->ipad) in create_aead_ctx_hdr() [all …]
|
| A D | otx_cptvf_algs.h | 115 u8 ipad[64]; member 173 u8 *ipad; member
|
| /drivers/crypto/marvell/octeontx2/ |
| A D | otx2_cptvf_algs.c | 641 if (!ctx->ipad) { in cpt_aead_init() 649 kfree(ctx->ipad); in cpt_aead_init() 732 kfree(ctx->ipad); in otx2_cpt_aead_exit() 845 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 882 ipad = ctx->ipad; in aead_hmac_init() 885 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init() 887 memcpy(opad, ipad, bs); in aead_hmac_init() 890 ipad[icount] ^= 0x36; in aead_hmac_init() 903 ret = swap_pad(ctx->mac_type, ipad); in aead_hmac_init() 996 if (ctx->ipad) in create_aead_ctx_hdr() [all …]
|
| A D | otx2_cptvf_algs.h | 106 u8 ipad[64]; member 169 u8 *ipad; member
|
| /drivers/crypto/inside-secure/eip93/ |
| A D | eip93-common.c | 708 u8 ipad[SHA256_BLOCK_SIZE], opad[SHA256_BLOCK_SIZE]; in eip93_hmac_setkey() local 753 ahash_request_set_crypt(req, sg, ipad, keylen); in eip93_hmac_setkey() 760 memcpy(ipad, key, keylen); in eip93_hmac_setkey() 764 memset(ipad + keylen, 0, SHA256_BLOCK_SIZE - keylen); in eip93_hmac_setkey() 765 memcpy(opad, ipad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey() 769 ipad[i] ^= HMAC_IPAD_VALUE; in eip93_hmac_setkey() 774 memcpy(dest_ipad, ipad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey() 777 sg_init_one(&sg[0], ipad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey()
|
| A D | eip93-common.h | 21 unsigned int hashlen, u8 *ipad, u8 *opad,
|
| A D | eip93-hash.h | 20 u8 ipad[SHA256_BLOCK_SIZE] __aligned(sizeof(u32));
|
| A D | eip93-hash.c | 301 memcpy(rctx->data, ctx->ipad, SHA256_BLOCK_SIZE); in eip93_hash_init() 569 ctx->ipad, ctx->opad, true); in eip93_hash_hmac_setkey()
|
| /drivers/crypto/marvell/cesa/ |
| A D | hash.c | 1136 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument 1145 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init() 1155 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init() 1169 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init() 1170 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init() 1173 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init() 1187 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local 1205 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey() 1206 if (!ipad) { in mv_cesa_ahmac_setkey() 1211 opad = ipad + blocksize; in mv_cesa_ahmac_setkey() [all …]
|
| /drivers/crypto/allwinner/sun8i-ss/ |
| A D | sun8i-ss-hash.c | 67 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() 584 addr_xpad = dma_map_single(ss->dev, tfmctx->ipad, bs, DMA_TO_DEVICE); in sun8i_ss_hash_run()
|
| A D | sun8i-ss.h | 234 u8 *ipad; member
|
| /drivers/crypto/intel/qat/qat_common/ |
| 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()
|
| /drivers/crypto/ |
| A D | atmel-sha.c | 1664 u32 ipad[SHA512_BLOCK_SIZE / sizeof(u32)]; member 1734 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup() 1735 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup() 1758 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done() 1759 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done() 1772 unsafe_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() 1986 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->ipad[i]); in atmel_sha_hmac_digest2() [all …]
|
| 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() 1297 bctx->ipad); in omap_sham_setkey() 1302 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey() 1305 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey() 1308 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey() 1311 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in omap_sham_setkey()
|
| A D | sa2ul.c | 146 u16 key_sz, __be32 *ipad, __be32 *opad); 436 u16 key_sz, __be32 *ipad, __be32 *opad) in sa_prepare_iopads() argument 453 sa_export_shash(&sha, shash, digest_size, ipad); in sa_prepare_iopads() 535 __be32 *ipad = (void *)(sc_buf + 32); in sa_set_sc_auth() local 546 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth()
|
| /drivers/crypto/cavium/cpt/ |
| A D | cptvf_algs.h | 89 u8 ipad[64]; member
|
| /drivers/crypto/ccp/ |
| A D | ccp-crypto.h | 194 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
|
| A 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()
|
| /drivers/crypto/chelsio/ |
| A D | chcr_crypto.h | 245 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
|
| A D | chcr_algo.c | 2218 hmacctx->ipad); in chcr_ahash_setkey() 2223 memcpy(hmacctx->ipad, key, keylen); in chcr_ahash_setkey() 2225 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey() 2226 unsafe_memcpy(hmacctx->opad, hmacctx->ipad, bs, in chcr_ahash_setkey() 2230 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey() 2239 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey() 2240 hmacctx->ipad, digestsize); in chcr_ahash_setkey() 2243 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey() 2333 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init() 2336 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init() [all …]
|
| /drivers/crypto/bcm/ |
| A D | cipher.h | 215 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
|
| A D | cipher.c | 2396 memcpy(ctx->ipad, ctx->authkey, ctx->authkeylen); in ahash_hmac_setkey() 2397 memset(ctx->ipad + ctx->authkeylen, 0, in ahash_hmac_setkey() 2400 unsafe_memcpy(ctx->opad, ctx->ipad, blocksize, in ahash_hmac_setkey() 2404 ctx->ipad[index] ^= HMAC_IPAD_VALUE; in ahash_hmac_setkey() 2408 flow_dump(" ipad: ", ctx->ipad, blocksize); in ahash_hmac_setkey() 2438 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init() 2498 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_digest()
|
| /drivers/crypto/cavium/nitrox/ |
| A D | nitrox_req.h | 144 u8 ipad[64]; member
|