Home
last modified time | relevance | path

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

/Linux-v4.19/crypto/
Dhmac.c51 char *ipad = crypto_shash_ctx_aligned(parent); in hmac_setkey() local
52 char *opad = ipad + ss; in hmac_setkey()
66 err = crypto_shash_digest(shash, inkey, keylen, ipad); in hmac_setkey()
72 memcpy(ipad, inkey, keylen); in hmac_setkey()
74 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey()
75 memcpy(opad, ipad, bs); in hmac_setkey()
78 ipad[i] ^= HMAC_IPAD_VALUE; in hmac_setkey()
83 crypto_shash_update(shash, ipad, bs) ?: in hmac_setkey()
84 crypto_shash_export(shash, ipad) ?: in hmac_setkey()
/Linux-v4.19/drivers/crypto/inside-secure/
Dsafexcel_hash.c23 u32 ipad[SHA512_DIGEST_SIZE / sizeof(u32)]; member
142 memcpy(ctx->base.ctxr->data, ctx->ipad, req->state_sz); in safexcel_context_control()
852 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
860 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
869 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad()
888 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad()
889 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
892 ipad[i] ^= HMAC_IPAD_VALUE; in safexcel_hmac_init_pad()
938 u8 *ipad, *opad; in safexcel_hmac_setkey() local
954 ipad = kcalloc(2, blocksize, GFP_KERNEL); in safexcel_hmac_setkey()
[all …]
Dsafexcel_cipher.c48 u32 ipad[SHA512_DIGEST_SIZE / sizeof(u32)]; member
241 (memcmp(ctx->ipad, istate.state, ctx->state_sz) || in safexcel_aead_aes_setkey()
249 memcpy(ctx->ipad, &istate.state, ctx->state_sz); in safexcel_aead_aes_setkey()
416 ctx->ipad, ctx->state_sz); in safexcel_send_req()
/Linux-v4.19/drivers/crypto/marvell/
Dhash.c1125 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument
1134 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init()
1145 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init()
1164 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init()
1165 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1168 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init()
1182 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local
1200 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey()
1201 if (!ipad) { in mv_cesa_ahmac_setkey()
1206 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
[all …]
/Linux-v4.19/drivers/crypto/cavium/cpt/
Dcptvf_algs.h92 u8 ipad[64]; member
/Linux-v4.19/drivers/crypto/qat/qat_common/
Dqat_algs.c156 char ipad[block_size]; in qat_alg_do_precomputes() local
162 memset(ipad, 0, block_size); in qat_alg_do_precomputes()
169 auth_keylen, ipad); in qat_alg_do_precomputes()
173 memcpy(opad, ipad, digest_size); in qat_alg_do_precomputes()
175 memcpy(ipad, auth_key, auth_keylen); in qat_alg_do_precomputes()
180 char *ipad_ptr = ipad + i; in qat_alg_do_precomputes()
189 if (crypto_shash_update(shash, ipad, block_size)) in qat_alg_do_precomputes()
250 memzero_explicit(ipad, block_size); in qat_alg_do_precomputes()
/Linux-v4.19/drivers/crypto/mediatek/
Dmtk-sha.c103 u8 ipad[SHA512_BLOCK_SIZE] __aligned(sizeof(u32));
417 memcpy(ctx->buffer, bctx->ipad, ctx->bs); in mtk_sha_init()
817 err = crypto_shash_digest(shash, key, keylen, bctx->ipad); in mtk_sha_setkey()
822 memcpy(bctx->ipad, key, keylen); in mtk_sha_setkey()
825 memset(bctx->ipad + keylen, 0, bs - keylen); in mtk_sha_setkey()
826 memcpy(bctx->opad, bctx->ipad, bs); in mtk_sha_setkey()
829 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in mtk_sha_setkey()
/Linux-v4.19/drivers/crypto/
Datmel-sha.c1734 u32 ipad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1804 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1805 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1828 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1829 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
1842 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
1844 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash()
1848 return atmel_sha_cpu_hash(dd, hmac->ipad, bs, false, in atmel_sha_hmac_compute_ipad_hash()
1863 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_compute_opad_hash()
1956 memcpy(ctx->digest, hmac->ipad, hs); in atmel_sha_hmac_init_done()
[all …]
Domap-sham.c166 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member
480 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4()
482 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4()
988 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init()
1332 key, keylen, bctx->ipad); in omap_sham_setkey()
1337 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey()
1340 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey()
1343 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1346 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in omap_sham_setkey()
/Linux-v4.19/drivers/crypto/ccp/
Dccp-crypto.h193 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
Dccp-crypto-sha.c200 memcpy(rctx->buf, ctx->u.sha.ipad, block_size); in ccp_sha_init()
312 ctx->u.sha.ipad[i] = ctx->u.sha.key[i] ^ HMAC_IPAD_VALUE; in ccp_sha_setkey()
/Linux-v4.19/drivers/crypto/cavium/nitrox/
Dnitrox_req.h133 u8 ipad[64]; member
/Linux-v4.19/drivers/crypto/chelsio/
Dchcr_crypto.h244 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
Dchcr_algo.c2048 hmacctx->ipad); in chcr_ahash_setkey()
2053 memcpy(hmacctx->ipad, key, keylen); in chcr_ahash_setkey()
2055 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey()
2056 memcpy(hmacctx->opad, hmacctx->ipad, bs); in chcr_ahash_setkey()
2059 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey()
2068 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey()
2069 hmacctx->ipad, digestsize); in chcr_ahash_setkey()
2072 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey()
2147 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2150 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
[all …]
/Linux-v4.19/drivers/crypto/bcm/
Dcipher.h225 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
Dcipher.c2495 memcpy(ctx->ipad, ctx->authkey, ctx->authkeylen); in ahash_hmac_setkey()
2496 memset(ctx->ipad + ctx->authkeylen, 0, in ahash_hmac_setkey()
2499 memcpy(ctx->opad, ctx->ipad, blocksize); in ahash_hmac_setkey()
2502 ctx->ipad[index] ^= HMAC_IPAD_VALUE; in ahash_hmac_setkey()
2506 flow_dump(" ipad: ", ctx->ipad, blocksize); in ahash_hmac_setkey()
2533 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init()
2593 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_digest()