/drivers/crypto/inside-secure/ |
D | safexcel_hash.c | 124 memcpy(ctx->base.ctxr->data, &ctx->base.ipad, ctx->key_sz); in safexcel_context_control() 381 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local 384 x = ipad[i] ^ ipad[i + 4]; in safexcel_ahash_send_req() 807 memcpy(areq->result, &ctx->base.ipad, sizeof(u32)); in safexcel_ahash_final() 823 result[i] = swab32(ctx->base.ipad.word[i + 4]); in safexcel_ahash_final() 1019 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init() 1062 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument 1070 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad() 1079 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad() 1097 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad() [all …]
|
D | safexcel_cipher.c | 703 &ctx->base.ipad, ctx->state_sz); in safexcel_send_req() 2603 if (be32_to_cpu(ctx->base.ipad.be[i]) != hashkey[i]) { in safexcel_aead_gcm_setkey() 2611 ctx->base.ipad.be[i] = cpu_to_be32(hashkey[i]); in safexcel_aead_gcm_setkey() 2699 ctx->base.ipad.be[i + 2 * AES_BLOCK_SIZE / sizeof(u32)] = in safexcel_aead_ccm_setkey()
|
D | safexcel.h | 845 } ipad, opad; member
|
/drivers/crypto/marvell/octeontx/ |
D | otx_cptvf_algs.c | 607 kfree(ctx->ipad); in otx_cpt_aead_exit() 746 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 753 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init() 754 if (!ctx->ipad) { in aead_hmac_init() 765 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init() 766 if (!ipad) { in aead_hmac_init() 779 authkeylen, ipad); in aead_hmac_init() 785 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init() 788 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init() 789 memcpy(opad, ipad, bs); in aead_hmac_init() [all …]
|
D | otx_cptvf_algs.h | 115 u8 ipad[64]; member 173 u8 *ipad; member
|
/drivers/crypto/marvell/cesa/ |
D | hash.c | 1134 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument 1143 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init() 1154 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init() 1172 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init() 1173 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init() 1176 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init() 1190 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local 1208 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey() 1209 if (!ipad) { in mv_cesa_ahmac_setkey() 1214 opad = ipad + blocksize; in mv_cesa_ahmac_setkey() [all …]
|
/drivers/crypto/mediatek/ |
D | mtk-sha.c | 100 u8 ipad[SHA512_BLOCK_SIZE] __aligned(sizeof(u32)); 413 memcpy(ctx->buffer, bctx->ipad, ctx->bs); in mtk_sha_init() 810 bctx->ipad); in mtk_sha_setkey() 815 memcpy(bctx->ipad, key, keylen); in mtk_sha_setkey() 818 memset(bctx->ipad + keylen, 0, bs - keylen); in mtk_sha_setkey() 819 memcpy(bctx->opad, bctx->ipad, bs); in mtk_sha_setkey() 822 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in mtk_sha_setkey()
|
/drivers/crypto/qat/qat_common/ |
D | qat_algs.c | 67 char ipad[SHA512_BLOCK_SIZE]; /* sufficient for SHA-1/SHA-256 as well */ member 110 memset(ctx->ipad, 0, block_size); in qat_alg_do_precomputes() 116 auth_keylen, ctx->ipad); in qat_alg_do_precomputes() 120 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes() 122 memcpy(ctx->ipad, auth_key, auth_keylen); in qat_alg_do_precomputes() 127 char *ipad_ptr = ctx->ipad + i; in qat_alg_do_precomputes() 136 if (crypto_shash_update(shash, ctx->ipad, block_size)) in qat_alg_do_precomputes() 200 memzero_explicit(ctx->ipad, block_size); in qat_alg_do_precomputes()
|
/drivers/crypto/ |
D | atmel-sha.c | 1665 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() 1794 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_compute_opad_hash() 1882 memcpy(ctx->digest, hmac->ipad, hs); in atmel_sha_hmac_init_done() [all …]
|
D | omap-sham.c | 166 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member 485 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4() 487 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4() 1017 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init() 1314 bctx->ipad); in omap_sham_setkey() 1319 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey() 1322 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey() 1325 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey() 1328 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in omap_sham_setkey()
|
D | sa2ul.c | 126 u16 key_sz, __be32 *ipad, __be32 *opad); 414 u16 key_sz, __be32 *ipad, __be32 *opad) in sa_prepare_iopads() argument 426 memzero_explicit(ipad, block_size); in sa_prepare_iopads() 431 sa_export_shash(shash, block_size, digest_size, ipad); in sa_prepare_iopads() 509 __be32 ipad[64], opad[64]; in sa_set_sc_auth() local 519 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth() 522 memcpy(&sc_buf[32], ipad, ad->hash_size); in sa_set_sc_auth()
|
/drivers/crypto/cavium/cpt/ |
D | cptvf_algs.h | 89 u8 ipad[64]; member
|
/drivers/crypto/ccp/ |
D | ccp-crypto.h | 193 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
|
D | ccp-crypto-sha.c | 198 memcpy(rctx->buf, ctx->u.sha.ipad, block_size); in ccp_sha_init() 301 ctx->u.sha.ipad[i] = ctx->u.sha.key[i] ^ HMAC_IPAD_VALUE; in ccp_sha_setkey()
|
/drivers/crypto/chelsio/ |
D | chcr_crypto.h | 243 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
|
D | chcr_algo.c | 2217 hmacctx->ipad); in chcr_ahash_setkey() 2222 memcpy(hmacctx->ipad, key, keylen); in chcr_ahash_setkey() 2224 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey() 2225 memcpy(hmacctx->opad, hmacctx->ipad, bs); in chcr_ahash_setkey() 2228 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey() 2237 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey() 2238 hmacctx->ipad, digestsize); in chcr_ahash_setkey() 2241 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey() 2331 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init() 2334 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init() [all …]
|
/drivers/crypto/bcm/ |
D | cipher.h | 214 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
|
D | cipher.c | 2398 memcpy(ctx->ipad, ctx->authkey, ctx->authkeylen); in ahash_hmac_setkey() 2399 memset(ctx->ipad + ctx->authkeylen, 0, in ahash_hmac_setkey() 2402 memcpy(ctx->opad, ctx->ipad, blocksize); in ahash_hmac_setkey() 2405 ctx->ipad[index] ^= HMAC_IPAD_VALUE; in ahash_hmac_setkey() 2409 flow_dump(" ipad: ", ctx->ipad, blocksize); in ahash_hmac_setkey() 2436 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init() 2496 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_digest()
|
/drivers/crypto/cavium/nitrox/ |
D | nitrox_req.h | 144 u8 ipad[64]; member
|