/openbmc/linux/crypto/ |
H A D | hmac.c | 48 char *opad = ipad + ss; in hmac_setkey() local 49 struct hmac_ctx *ctx = align_ptr(opad + ss, in hmac_setkey() 72 memcpy(opad, ipad, bs); in hmac_setkey() 76 opad[i] ^= HMAC_OPAD_VALUE; in hmac_setkey() 83 crypto_shash_update(shash, opad, bs) ?: in hmac_setkey() 84 crypto_shash_export(shash, opad); in hmac_setkey() 122 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_final() local 126 crypto_shash_import(desc, opad) ?: in hmac_final() 137 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_finup() local 141 crypto_shash_import(desc, opad) ?: in hmac_finup()
|
/openbmc/linux/drivers/crypto/chelsio/ |
H A D | chcr_algo.h | 145 #define FILL_SEC_CPL_SCMD0_SEQNO(ctrl, seq, cmode, amode, opad, size) \ argument 154 SCMD_HMAC_CTRL_V((opad)) | \ 170 #define FILL_KEY_CTX_HDR(ck_size, mk_size, d_ck, opad, ctx_len) \ argument 175 KEY_CONTEXT_OPAD_PRESENT_V((opad)) | \ 179 #define FILL_KEY_CRX_HDR(ck_size, mk_size, d_ck, opad, ctx_len) \ argument
|
H A D | chcr_crypto.h | 246 u8 opad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
|
H A D | chcr_algo.c | 1618 hmacctx->opad, param->alg_prm.result_size); in create_hash_wr() 2219 unsafe_memcpy(hmacctx->opad, hmacctx->ipad, bs, in chcr_ahash_setkey() 2224 *((unsigned int *)(&hmacctx->opad) + i) ^= OPAD_DATA; in chcr_ahash_setkey() 2238 err = chcr_compute_partial_hash(shash, hmacctx->opad, in chcr_ahash_setkey() 2239 hmacctx->opad, digestsize); in chcr_ahash_setkey() 2242 chcr_change_order(hmacctx->opad, updated_digestsize); in chcr_ahash_setkey()
|
/openbmc/linux/drivers/crypto/marvell/octeontx/ |
H A D | otx_cptvf_algs.c | 559 ctx->opad = kzalloc(ss, GFP_KERNEL); in cpt_aead_init() 560 if (!ctx->opad) { in cpt_aead_init() 569 kfree(ctx->opad); in cpt_aead_init() 628 kfree(ctx->opad); in otx_cpt_aead_exit() 762 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 799 opad = ctx->opad; in aead_hmac_init() 803 memcpy(opad, ipad, bs); in aead_hmac_init() 807 opad[icount] ^= 0x5c; in aead_hmac_init() 825 crypto_shash_update(&ctx->sdesc->shash, opad, bs); in aead_hmac_init() 826 crypto_shash_export(&ctx->sdesc->shash, opad); in aead_hmac_init() [all …]
|
H A D | otx_cptvf_algs.h | 116 u8 opad[64]; member 174 u8 *opad; member
|
/openbmc/linux/drivers/crypto/marvell/octeontx2/ |
H A D | otx2_cptvf_algs.c | 628 ctx->opad = kzalloc(ss, GFP_KERNEL); in cpt_aead_init() 629 if (!ctx->opad) { in cpt_aead_init() 705 kfree(ctx->opad); in otx2_cpt_aead_exit() 816 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local 854 opad = ctx->opad; in aead_hmac_init() 858 memcpy(opad, ipad, bs); in aead_hmac_init() 862 opad[icount] ^= 0x5c; in aead_hmac_init() 880 crypto_shash_update(&ctx->sdesc->shash, opad, bs); in aead_hmac_init() 881 crypto_shash_export(&ctx->sdesc->shash, opad); in aead_hmac_init() 882 ret = swap_pad(ctx->mac_type, opad); in aead_hmac_init() [all …]
|
H A D | otx2_cptvf_algs.h | 106 u8 opad[64]; member 165 u8 *opad; member
|
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss-hash.c | 87 tfmctx->opad = kzalloc(bs, GFP_KERNEL); in sun8i_ss_hmac_setkey() 88 if (!tfmctx->opad) { in sun8i_ss_hmac_setkey() 95 memcpy(tfmctx->opad, tfmctx->key, tfmctx->keylen); in sun8i_ss_hmac_setkey() 98 tfmctx->opad[i] ^= HMAC_OPAD_VALUE; in sun8i_ss_hmac_setkey() 106 kfree_sensitive(tfmctx->opad); in sun8i_ss_hmac_setkey() 155 kfree_sensitive(tfmctx->opad); in sun8i_ss_hash_exit_tfm() 623 addr_xpad = dma_map_single(ss->dev, tfmctx->opad, bs, DMA_TO_DEVICE); in sun8i_ss_hash_run()
|
H A D | sun8i-ss.h | 235 u8 *opad; member
|
/openbmc/linux/drivers/crypto/inside-secure/ |
H A D | safexcel_hash.c | 207 &ctx->base.opad, req->state_sz); in safexcel_context_control() 276 memcpy(sreq->state, &ctx->base.opad, sreq->digest_sz); in safexcel_handle_req_result() 707 &ctx->base.opad, req->state_sz)))) in safexcel_ahash_enqueue() 1047 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument 1079 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad() 1083 opad[i] ^= HMAC_OPAD_VALUE; in safexcel_hmac_init_pad() 1123 u8 *ipad, *opad; in __safexcel_hmac_setkey() local 1145 opad = ipad + blocksize; in __safexcel_hmac_setkey() 1147 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); in __safexcel_hmac_setkey() 1155 ret = safexcel_hmac_init_iv(areq, blocksize, opad, ostate); in __safexcel_hmac_setkey() [all …]
|
/openbmc/linux/drivers/crypto/marvell/cesa/ |
H A D | hash.c | 1138 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument 1172 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init() 1176 opad[i] ^= HMAC_OPAD_VALUE; in mv_cesa_ahmac_pad_init() 1190 u8 *opad; in mv_cesa_ahmac_setkey() local 1213 opad = ipad + blocksize; in mv_cesa_ahmac_setkey() 1215 ret = mv_cesa_ahmac_pad_init(req, key, keylen, ipad, opad, blocksize); in mv_cesa_ahmac_setkey() 1223 ret = mv_cesa_ahmac_iv_state_init(req, opad, ostate, blocksize); in mv_cesa_ahmac_setkey()
|
/openbmc/linux/drivers/crypto/cavium/cpt/ |
H A D | cptvf_algs.h | 90 u8 opad[64]; /* or OPAD */ member
|
/openbmc/linux/drivers/crypto/intel/qat/qat_common/ |
H A D | qat_algs.c | 80 char opad[SHA512_BLOCK_SIZE]; member 124 memset(ctx->opad, 0, block_size); in qat_alg_do_precomputes() 133 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes() 136 memcpy(ctx->opad, auth_key, auth_keylen); in qat_alg_do_precomputes() 141 char *opad_ptr = ctx->opad + i; in qat_alg_do_precomputes() 181 if (crypto_shash_update(shash, ctx->opad, block_size)) in qat_alg_do_precomputes() 214 memzero_explicit(ctx->opad, block_size); in qat_alg_do_precomputes()
|
/openbmc/linux/drivers/crypto/ccp/ |
H A D | ccp-crypto-sha.c | 162 rctx->cmd.u.sha.opad = ctx->u.sha.key_len ? in ccp_do_sha_update() 303 ctx->u.sha.opad[i] = ctx->u.sha.key[i] ^ HMAC_OPAD_VALUE; in ccp_sha_setkey() 306 sg_init_one(&ctx->u.sha.opad_sg, ctx->u.sha.opad, block_size); in ccp_sha_setkey()
|
H A D | ccp-crypto.h | 195 u8 opad[MAX_SHA_BLOCK_SIZE]; member
|
/openbmc/linux/drivers/crypto/ |
H A D | omap-sham.c | 163 u8 opad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member 306 u32 *opad = (u32 *)bctx->opad; in omap_sham_copy_hash_omap4() local 310 opad[i] = omap_sham_read(dd, in omap_sham_copy_hash_omap4() 314 opad[i]); in omap_sham_copy_hash_omap4() 1110 crypto_shash_update(shash, bctx->opad, bs) ?: in omap_sham_finish_hmac() 1309 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey() 1313 bctx->opad[i] ^= HMAC_OPAD_VALUE; in omap_sham_setkey()
|
H A D | atmel-sha.c | 1666 u32 opad[SHA512_BLOCK_SIZE / sizeof(u32)]; member 1773 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash() 1777 hmac->opad[i] ^= 0x5c5c5c5c; in atmel_sha_hmac_compute_ipad_hash() 1796 return atmel_sha_cpu_hash(dd, hmac->opad, bs, false, in atmel_sha_hmac_compute_opad_hash() 1810 hmac->opad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_setup_done() 1909 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_final() 1991 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_digest2() 2319 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_authenc_init2()
|
H 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 460 sa_export_shash(&sha, shash, digest_size, opad); in sa_prepare_iopads() 536 __be32 *opad = (void *)(sc_buf + 64); in sa_set_sc_auth() local 546 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth()
|
/openbmc/linux/drivers/crypto/aspeed/ |
H A D | aspeed-hace.h | 167 u8 opad[SHA512_BLOCK_SIZE]; member
|
H A D | aspeed-hace-hash.c | 365 memcpy(rctx->buffer, bctx->opad, rctx->block_size); in aspeed_ahash_hmac_resume() 778 memcpy(bctx->opad, bctx->ipad, bs); in aspeed_sham_setkey() 782 bctx->opad[i] ^= HMAC_OPAD_VALUE; in aspeed_sham_setkey()
|
/openbmc/linux/include/linux/ |
H A D | ccp.h | 294 struct scatterlist *opad; member
|
/openbmc/linux/drivers/crypto/bcm/ |
H A D | cipher.h | 216 u8 opad[MAX_HASH_BLOCK_SIZE]; member
|
H A D | cipher.c | 906 rc = do_shash("md5", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash() 910 rc = do_shash("sha1", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash() 914 rc = do_shash("sha224", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash() 918 rc = do_shash("sha256", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash() 922 rc = do_shash("sha384", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash() 926 rc = do_shash("sha512", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash() 2399 unsafe_memcpy(ctx->opad, ctx->ipad, blocksize, in ahash_hmac_setkey() 2404 ctx->opad[index] ^= HMAC_OPAD_VALUE; in ahash_hmac_setkey() 2408 flow_dump(" opad: ", ctx->opad, blocksize); in ahash_hmac_setkey()
|
/openbmc/linux/drivers/crypto/cavium/nitrox/ |
H A D | nitrox_req.h | 147 u8 opad[64]; member
|