Home
last modified time | relevance | path

Searched refs:opad (Results 1 – 24 of 24) sorted by relevance

/OK3568_Linux_fs/external/security/librkcrypto/test/c_mode/
H A Dhmac.c23 unsigned char ipad[PARTITION_BYTE_SIZE], opad[PARTITION_BYTE_SIZE];
30 memset(opad, 0x5c, sizeof(opad));
52 ostr[i] ^= opad[i];
75 memcpy(tmp, opad, sizeof(opad));
76 memcpy(tmp+sizeof(opad), istr, hash_len);
92 unsigned char opad = 0x5c; in rk_hmac_64() local
168 step7data[i] = k0[i] ^ opad; in rk_hmac_64()
202 unsigned char opad = 0x5c; in rk_hmac_128() local
278 step7data[i] = k0[i] ^ opad; in rk_hmac_128()
/OK3568_Linux_fs/kernel/crypto/
H A Dhmac.c47 char *opad = ipad + ss; in hmac_setkey() local
48 struct hmac_ctx *ctx = align_ptr(opad + ss, in hmac_setkey()
68 memcpy(opad, ipad, bs); in hmac_setkey()
72 opad[i] ^= HMAC_OPAD_VALUE; in hmac_setkey()
79 crypto_shash_update(shash, opad, bs) ?: in hmac_setkey()
80 crypto_shash_export(shash, opad); in hmac_setkey()
118 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_final() local
122 crypto_shash_import(desc, opad) ?: in hmac_final()
133 char *opad = crypto_shash_ctx_aligned(parent) + ss; in hmac_finup() local
137 crypto_shash_import(desc, opad) ?: in hmac_finup()
/OK3568_Linux_fs/kernel/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c608 kfree(ctx->opad); in otx_cpt_aead_exit()
746 u8 *ipad = NULL, *opad = NULL; in aead_hmac_init() local
759 ctx->opad = kzalloc(bs, GFP_KERNEL); in aead_hmac_init()
760 if (!ctx->opad) { in aead_hmac_init()
771 opad = kzalloc(state_size, GFP_KERNEL); in aead_hmac_init()
772 if (!opad) { in aead_hmac_init()
789 memcpy(opad, ipad, bs); in aead_hmac_init()
793 opad[icount] ^= 0x5c; in aead_hmac_init()
811 crypto_shash_update(&ctx->sdesc->shash, opad, bs); in aead_hmac_init()
812 crypto_shash_export(&ctx->sdesc->shash, opad); in aead_hmac_init()
[all …]
H A Dotx_cptvf_algs.h116 u8 opad[64]; member
174 u8 *opad; member
/OK3568_Linux_fs/kernel/drivers/crypto/chelsio/
H A Dchcr_algo.h145 #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 Dchcr_crypto.h244 u8 opad[CHCR_HASH_MAX_BLOCK_SIZE_128]; member
H A Dchcr_algo.c1624 hmacctx->opad, param->alg_prm.result_size); in create_hash_wr()
2225 memcpy(hmacctx->opad, hmacctx->ipad, bs); in chcr_ahash_setkey()
2229 *((unsigned int *)(&hmacctx->opad) + i) ^= OPAD_DATA; in chcr_ahash_setkey()
2243 err = chcr_compute_partial_hash(shash, hmacctx->opad, in chcr_ahash_setkey()
2244 hmacctx->opad, digestsize); in chcr_ahash_setkey()
2247 chcr_change_order(hmacctx->opad, updated_digestsize); in chcr_ahash_setkey()
/OK3568_Linux_fs/kernel/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c206 &ctx->base.opad, req->state_sz); in safexcel_context_control()
275 memcpy(sreq->state, &ctx->base.opad, sreq->digest_sz); in safexcel_handle_req_result()
706 &ctx->base.opad, req->state_sz)))) in safexcel_ahash_enqueue()
1062 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
1098 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
1102 opad[i] ^= HMAC_OPAD_VALUE; in safexcel_hmac_init_pad()
1148 u8 *ipad, *opad; in __safexcel_hmac_setkey() local
1170 opad = ipad + blocksize; in __safexcel_hmac_setkey()
1172 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); in __safexcel_hmac_setkey()
1180 ret = safexcel_hmac_init_iv(areq, blocksize, opad, ostate); in __safexcel_hmac_setkey()
[all …]
H A Dsafexcel.h845 } ipad, opad; member
H A Dsafexcel_cipher.c706 ctx->state_sz) / sizeof(u32), &ctx->base.opad, in safexcel_send_req()
/OK3568_Linux_fs/kernel/drivers/crypto/marvell/cesa/
H A Dhash.c1134 u8 *ipad, u8 *opad, in mv_cesa_ahmac_pad_init() argument
1173 memcpy(opad, ipad, blocksize); in mv_cesa_ahmac_pad_init()
1177 opad[i] ^= HMAC_OPAD_VALUE; in mv_cesa_ahmac_pad_init()
1191 u8 *opad; in mv_cesa_ahmac_setkey() local
1214 opad = ipad + blocksize; in mv_cesa_ahmac_setkey()
1216 ret = mv_cesa_ahmac_pad_init(req, key, keylen, ipad, opad, blocksize); in mv_cesa_ahmac_setkey()
1224 ret = mv_cesa_ahmac_iv_state_init(req, opad, ostate, blocksize); in mv_cesa_ahmac_setkey()
/OK3568_Linux_fs/kernel/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.h90 u8 opad[64]; /* or OPAD */ member
/OK3568_Linux_fs/kernel/drivers/crypto/ccp/
H A Dccp-crypto-sha.c161 rctx->cmd.u.sha.opad = ctx->u.sha.key_len ? in ccp_do_sha_update()
302 ctx->u.sha.opad[i] = ctx->u.sha.key[i] ^ HMAC_OPAD_VALUE; in ccp_sha_setkey()
305 sg_init_one(&ctx->u.sha.opad_sg, ctx->u.sha.opad, block_size); in ccp_sha_setkey()
H A Dccp-crypto.h194 u8 opad[MAX_SHA_BLOCK_SIZE]; member
H A Dccp-ops.c1758 if (sha->final && sha->opad) { in ccp_run_sha_cmd()
1776 scatterwalk_map_and_copy(hmac_buf, sha->opad, 0, block_size, 0); in ccp_run_sha_cmd()
1808 hmac_cmd.u.sha.opad = NULL; in ccp_run_sha_cmd()
/OK3568_Linux_fs/kernel/drivers/crypto/qat/qat_common/
H A Dqat_algs.c68 char opad[SHA512_BLOCK_SIZE]; member
111 memset(ctx->opad, 0, block_size); in qat_alg_do_precomputes()
120 memcpy(ctx->opad, ctx->ipad, digest_size); in qat_alg_do_precomputes()
123 memcpy(ctx->opad, auth_key, auth_keylen); in qat_alg_do_precomputes()
128 char *opad_ptr = ctx->opad + i; in qat_alg_do_precomputes()
168 if (crypto_shash_update(shash, ctx->opad, block_size)) in qat_alg_do_precomputes()
201 memzero_explicit(ctx->opad, block_size); in qat_alg_do_precomputes()
/OK3568_Linux_fs/kernel/drivers/crypto/
H A Domap-sham.c167 u8 opad[SHA512_BLOCK_SIZE] OMAP_ALIGNED; member
311 u32 *opad = (u32 *)bctx->opad; in omap_sham_copy_hash_omap4() local
315 opad[i] = omap_sham_read(dd, in omap_sham_copy_hash_omap4()
319 opad[i]); in omap_sham_copy_hash_omap4()
1126 crypto_shash_update(shash, bctx->opad, bs) ?: in omap_sham_finish_hmac()
1325 memcpy(bctx->opad, bctx->ipad, bs); in omap_sham_setkey()
1329 bctx->opad[i] ^= HMAC_OPAD_VALUE; in omap_sham_setkey()
H A Datmel-sha.c1666 u32 opad[SHA512_BLOCK_SIZE / sizeof(u32)]; member
1773 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
1776 hmac->opad[i] ^= 0x5c5c5c5c; in atmel_sha_hmac_compute_ipad_hash()
1795 return atmel_sha_cpu_hash(dd, hmac->opad, bs, false, in atmel_sha_hmac_compute_opad_hash()
1809 hmac->opad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_setup_done()
1908 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_final()
1972 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_hmac_digest2()
2293 atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]); in atmel_sha_authenc_init2()
H A Dsa2ul.c126 u16 key_sz, __be32 *ipad, __be32 *opad);
414 u16 key_sz, __be32 *ipad, __be32 *opad) in sa_prepare_iopads() argument
427 memzero_explicit(opad, block_size); in sa_prepare_iopads()
436 sa_export_shash(shash, block_size, digest_size, opad); 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()
524 memcpy(&sc_buf[64], opad, ad->hash_size); in sa_set_sc_auth()
/OK3568_Linux_fs/kernel/include/linux/
H A Dccp.h293 struct scatterlist *opad; member
/OK3568_Linux_fs/kernel/drivers/crypto/mediatek/
H A Dmtk-sha.c101 u8 opad[SHA512_BLOCK_SIZE] __aligned(sizeof(u32));
367 crypto_shash_update(shash, bctx->opad, ctx->bs) ?: in mtk_sha_finish_hmac()
819 memcpy(bctx->opad, bctx->ipad, bs); in mtk_sha_setkey()
823 bctx->opad[i] ^= HMAC_OPAD_VALUE; in mtk_sha_setkey()
/OK3568_Linux_fs/kernel/drivers/crypto/bcm/
H A Dcipher.h215 u8 opad[MAX_HASH_BLOCK_SIZE]; member
H A Dcipher.c908 rc = do_shash("md5", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash()
912 rc = do_shash("sha1", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash()
916 rc = do_shash("sha224", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash()
920 rc = do_shash("sha256", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash()
924 rc = do_shash("sha384", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash()
928 rc = do_shash("sha512", req->result, ctx->opad, blocksize, in spu_hmac_outer_hash()
2402 memcpy(ctx->opad, ctx->ipad, blocksize); in ahash_hmac_setkey()
2406 ctx->opad[index] ^= HMAC_OPAD_VALUE; in ahash_hmac_setkey()
2410 flow_dump(" opad: ", ctx->opad, blocksize); in ahash_hmac_setkey()
/OK3568_Linux_fs/kernel/drivers/crypto/cavium/nitrox/
H A Dnitrox_req.h147 u8 opad[64]; member