Home
last modified time | relevance | path

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

/drivers/crypto/inside-secure/
Dsafexcel_hash.c125 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()
1020 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
1063 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
1071 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
1080 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad()
1098 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad()
[all …]
Dsafexcel_cipher.c704 &ctx->base.ipad, ctx->state_sz); in safexcel_send_req()
2604 if (be32_to_cpu(ctx->base.ipad.be[i]) != hashkey[i]) { in safexcel_aead_gcm_setkey()
2612 ctx->base.ipad.be[i] = cpu_to_be32(hashkey[i]); in safexcel_aead_gcm_setkey()
2700 ctx->base.ipad.be[i + 2 * AES_BLOCK_SIZE / sizeof(u32)] = in safexcel_aead_ccm_setkey()
Dsafexcel.h846 } ipad, opad; member
/drivers/crypto/marvell/octeontx/
Dotx_cptvf_algs.c608 kfree(ctx->ipad); in otx_cpt_aead_exit()
747 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
754 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
755 if (!ctx->ipad) { in aead_hmac_init()
766 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
767 if (!ipad) { in aead_hmac_init()
780 authkeylen, ipad); in aead_hmac_init()
786 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init()
789 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init()
790 memcpy(opad, ipad, bs); in aead_hmac_init()
[all …]
Dotx_cptvf_algs.h115 u8 ipad[64]; member
173 u8 *ipad; member
/drivers/crypto/marvell/octeontx2/
Dotx2_cptvf_algs.c686 kfree(ctx->ipad); in otx2_cpt_aead_exit()
802 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
809 ctx->ipad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
810 if (!ctx->ipad) { in aead_hmac_init()
821 ipad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
822 if (!ipad) { in aead_hmac_init()
835 authkeylen, ipad); in aead_hmac_init()
841 memcpy(ipad, ctx->key, authkeylen); in aead_hmac_init()
844 memset(ipad + authkeylen, 0, bs - authkeylen); in aead_hmac_init()
845 memcpy(opad, ipad, bs); in aead_hmac_init()
[all …]
Dotx2_cptvf_algs.h105 u8 ipad[64]; member
164 u8 *ipad; member
/drivers/crypto/marvell/cesa/
Dhash.c1158 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument
1167 memcpy(ipad, key, keylen); in mv_cesa_ahmac_pad_init()
1178 ahash_request_set_crypt(req, &sg, ipad, keylen); in mv_cesa_ahmac_pad_init()
1196 memset(ipad + keylen, 0, blocksize - keylen); in mv_cesa_ahmac_pad_init()
1197 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1200 ipad[i] ^= HMAC_IPAD_VALUE; in mv_cesa_ahmac_pad_init()
1214 u8 *ipad = NULL; in mv_cesa_ahmac_setkey() local
1232 ipad = kcalloc(2, blocksize, GFP_KERNEL); in mv_cesa_ahmac_setkey()
1233 if (!ipad) { in mv_cesa_ahmac_setkey()
1238 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
[all …]
/drivers/crypto/
Datmel-sha.c1665 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 …]
Domap-sham.c166 u8 ipad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member
467 (u32 *)bctx->ipad, nr_dr); in omap_sham_write_ctrl_omap4()
469 (u32 *)bctx->ipad + nr_dr, nr_dr); in omap_sham_write_ctrl_omap4()
999 memcpy(ctx->buffer, bctx->ipad, bs); in omap_sham_init()
1299 bctx->ipad); in omap_sham_setkey()
1304 memcpy(bctx->ipad, key, keylen); in omap_sham_setkey()
1307 memset(bctx->ipad + keylen, 0, bs - keylen); in omap_sham_setkey()
1310 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1313 bctx->ipad[i] ^= HMAC_IPAD_VALUE; in omap_sham_setkey()
Dsa2ul.c145 u16 key_sz, __be32 *ipad, __be32 *opad);
435 u16 key_sz, __be32 *ipad, __be32 *opad) in sa_prepare_iopads() argument
452 sa_export_shash(&sha, shash, digest_size, ipad); in sa_prepare_iopads()
534 __be32 *ipad = (void *)(sc_buf + 32); in sa_set_sc_auth() local
545 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth()
/drivers/crypto/cavium/cpt/
Dcptvf_algs.h89 u8 ipad[64]; member
/drivers/crypto/qat/qat_common/
Dqat_algs.c78 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/ccp/
Dccp-crypto.h194 u8 ipad[MAX_SHA_BLOCK_SIZE]; member
Dccp-crypto-sha.c199 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/
Dchcr_crypto.h243 u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
Dchcr_algo.c2211 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 memcpy(hmacctx->opad, hmacctx->ipad, bs); in chcr_ahash_setkey()
2222 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA; in chcr_ahash_setkey()
2231 err = chcr_compute_partial_hash(shash, hmacctx->ipad, in chcr_ahash_setkey()
2232 hmacctx->ipad, digestsize); in chcr_ahash_setkey()
2235 chcr_change_order(hmacctx->ipad, updated_digestsize); in chcr_ahash_setkey()
2325 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
2328 memcpy(req_ctx->partial_hash, hmacctx->ipad, in chcr_hmac_init()
[all …]
/drivers/crypto/bcm/
Dcipher.h215 u8 ipad[MAX_HASH_BLOCK_SIZE]; member
Dcipher.c2396 memcpy(ctx->ipad, ctx->authkey, ctx->authkeylen); in ahash_hmac_setkey()
2397 memset(ctx->ipad + ctx->authkeylen, 0, in ahash_hmac_setkey()
2400 memcpy(ctx->opad, ctx->ipad, blocksize); in ahash_hmac_setkey()
2403 ctx->ipad[index] ^= HMAC_IPAD_VALUE; in ahash_hmac_setkey()
2407 flow_dump(" ipad: ", ctx->ipad, blocksize); in ahash_hmac_setkey()
2434 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_init()
2494 memcpy(rctx->hash_carry, ctx->ipad, blocksize); in ahash_hmac_digest()
/drivers/crypto/cavium/nitrox/
Dnitrox_req.h144 u8 ipad[64]; member