Home
last modified time | relevance | path

Searched refs:ipad (Results 1 – 16 of 16) sorted by relevance

/Linux-v5.4/crypto/
Dhmac.c46 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.4/drivers/crypto/inside-secure/
Dsafexcel_hash.c23 u32 ipad[SHA512_DIGEST_SIZE / sizeof(u32)]; member
884 memcpy(req->state, ctx->ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
926 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
934 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
943 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad()
962 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad()
963 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
966 ipad[i] ^= HMAC_IPAD_VALUE; in safexcel_hmac_init_pad()
1012 u8 *ipad, *opad; in safexcel_hmac_setkey() local
1028 ipad = kcalloc(2, blocksize, GFP_KERNEL); in safexcel_hmac_setkey()
[all …]
Dsafexcel_cipher.c54 u32 ipad[SHA512_DIGEST_SIZE / sizeof(u32)]; member
386 (memcmp(ctx->ipad, istate.state, ctx->state_sz) || in safexcel_aead_setkey()
394 memcpy(ctx->ipad, &istate.state, ctx->state_sz); in safexcel_aead_setkey()
583 ctx->ipad, ctx->state_sz); in safexcel_send_req()
2112 if (ctx->ipad[i] != cpu_to_be32(hashkey[i])) { in safexcel_aead_gcm_setkey()
2120 ctx->ipad[i] = cpu_to_be32(hashkey[i]); in safexcel_aead_gcm_setkey()
2211 ctx->ipad[i + 2 * AES_BLOCK_SIZE / sizeof(u32)] = in safexcel_aead_ccm_setkey()
/Linux-v5.4/drivers/crypto/marvell/
Dhash.c1121 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument
1130 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init()
1141 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init()
1159 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init()
1160 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1163 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init()
1177 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local
1195 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey()
1196 if (!ipad) { in mv_cesa_ahmac_setkey()
1201 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
[all …]
/Linux-v5.4/drivers/crypto/cavium/cpt/
Dcptvf_algs.h89 u8 ipad[64]; member
/Linux-v5.4/drivers/crypto/qat/qat_common/
Dqat_algs.c121 char ipad[SHA512_BLOCK_SIZE]; /* sufficient for SHA-1/SHA-256 as well */ member
163 memset(ctx->ipad, 0, block_size); in qat_alg_do_precomputes()
169 auth_keylen, ctx->ipad); in qat_alg_do_precomputes()
173 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
175 memcpy(ctx->ipad, auth_key, auth_keylen); in qat_alg_do_precomputes()
180 char *ipad_ptr = ctx->ipad + i; in qat_alg_do_precomputes()
189 if (crypto_shash_update(shash, ctx->ipad, block_size)) in qat_alg_do_precomputes()
253 memzero_explicit(ctx->ipad, block_size); in qat_alg_do_precomputes()
/Linux-v5.4/drivers/crypto/mediatek/
Dmtk-sha.c100 u8 ipad[SHA512_BLOCK_SIZE] __aligned(sizeof(u32));
413 memcpy(ctx->buffer, bctx->ipad, ctx->bs); in mtk_sha_init()
813 err = crypto_shash_digest(shash, key, keylen, bctx->ipad); in mtk_sha_setkey()
818 memcpy(bctx->ipad, key, keylen); in mtk_sha_setkey()
821 memset(bctx->ipad + keylen, 0, bs - keylen); in mtk_sha_setkey()
822 memcpy(bctx->opad, bctx->ipad, bs); in mtk_sha_setkey()
825 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in mtk_sha_setkey()
/Linux-v5.4/drivers/crypto/
Datmel-sha.c1731 u32 ipad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1801 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1802 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1825 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1826 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
1839 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
1841 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash()
1845 return atmel_sha_cpu_hash(dd, hmac->ipad, bs, false, in atmel_sha_hmac_compute_ipad_hash()
1860 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_compute_opad_hash()
1953 memcpy(ctx->digest, hmac->ipad, hs); in atmel_sha_hmac_init_done()
[all …]
Domap-sham.c163 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member
477 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4()
479 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4()
985 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init()
1327 key, keylen, bctx->ipad); in omap_sham_setkey()
1332 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey()
1335 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey()
1338 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1341 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in omap_sham_setkey()
/Linux-v5.4/drivers/crypto/ccp/
Dccp-crypto.h190 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
Dccp-crypto-sha.c197 memcpy(rctx->buf, ctx->u.sha.ipad, block_size); in ccp_sha_init()
307 ctx->u.sha.ipad[i] = ctx->u.sha.key[i] ^ HMAC_IPAD_VALUE; in ccp_sha_setkey()
/Linux-v5.4/drivers/crypto/chelsio/
Dchcr_crypto.h241 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
Dchcr_algo.c2116 hmacctx->ipad); in chcr_ahash_setkey()
2121 memcpy(hmacctx->ipad, key, keylen); in chcr_ahash_setkey()
2123 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey()
2124 memcpy(hmacctx->opad, hmacctx->ipad, bs); in chcr_ahash_setkey()
2127 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey()
2136 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey()
2137 hmacctx->ipad, digestsize); in chcr_ahash_setkey()
2140 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey()
2215 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2218 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
[all …]
/Linux-v5.4/drivers/crypto/bcm/
Dcipher.h212 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
Dcipher.c2459 memcpy(ctx->ipad, ctx->authkey, ctx->authkeylen); in ahash_hmac_setkey()
2460 memset(ctx->ipad + ctx->authkeylen, 0, in ahash_hmac_setkey()
2463 memcpy(ctx->opad, ctx->ipad, blocksize); in ahash_hmac_setkey()
2466 ctx->ipad[index] ^= HMAC_IPAD_VALUE; in ahash_hmac_setkey()
2470 flow_dump(" ipad: ", ctx->ipad, blocksize); in ahash_hmac_setkey()
2497 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init()
2557 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_digest()
/Linux-v5.4/drivers/crypto/cavium/nitrox/
Dnitrox_req.h142 u8 ipad[64]; member