Lines Matching refs:ipad
125 memcpy(ctx->base.ctxr->data, &ctx->base.ipad, ctx->key_sz); in safexcel_context_control()
378 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local
381 x = ipad[i] ^ ipad[i + 4]; in safexcel_ahash_send_req()
806 memcpy(areq->result, &ctx->base.ipad, sizeof(u32)); in safexcel_ahash_final()
822 result[i] = swab32(ctx->base.ipad.word[i + 4]); in safexcel_ahash_final()
1018 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
1045 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
1053 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
1062 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad()
1076 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad()
1077 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
1080 ipad[i] ^= HMAC_IPAD_VALUE; in safexcel_hmac_init_pad()
1121 u8 *ipad, *opad; in __safexcel_hmac_setkey() local
1137 ipad = kcalloc(2, blocksize, GFP_KERNEL); in __safexcel_hmac_setkey()
1138 if (!ipad) { in __safexcel_hmac_setkey()
1143 opad = ipad + blocksize; in __safexcel_hmac_setkey()
1145 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); in __safexcel_hmac_setkey()
1149 ret = safexcel_hmac_init_iv(areq, blocksize, ipad, istate); in __safexcel_hmac_setkey()
1156 kfree(ipad); in __safexcel_hmac_setkey()
1178 (memcmp(&base->ipad, istate.state, state_sz) || in safexcel_hmac_setkey()
1182 memcpy(&base->ipad, &istate.state, state_sz); in safexcel_hmac_setkey()
1365 memcpy(req->state, &ctx->base.ipad, SHA256_DIGEST_SIZE); in safexcel_hmac_sha224_init()
1437 memcpy(req->state, &ctx->base.ipad, SHA256_DIGEST_SIZE); in safexcel_hmac_sha256_init()
1623 memcpy(req->state, &ctx->base.ipad, SHA512_DIGEST_SIZE); in safexcel_hmac_sha512_init()
1695 memcpy(req->state, &ctx->base.ipad, SHA512_DIGEST_SIZE); in safexcel_hmac_sha384_init()
1817 memcpy(req->state, &ctx->base.ipad, MD5_DIGEST_SIZE); in safexcel_hmac_md5_init()
1890 memcpy(req->state, &ctx->base.ipad, ctx->key_sz); in safexcel_cbcmac_init()
1915 memset(&ctx->base.ipad, 0, 2 * AES_BLOCK_SIZE); in safexcel_cbcmac_setkey()
1917 ctx->base.ipad.be[i + 8] = cpu_to_be32(aes.key_enc[i]); in safexcel_cbcmac_setkey()
1991 ctx->base.ipad.word[i] = swab32(key_tmp[i]); in safexcel_xcbcmac_setkey()
2070 ctx->base.ipad.word[i + 8] = swab32(ctx->aes->key_enc[i]); in safexcel_cmac_setkey()
2093 ctx->base.ipad.be[i] = cpu_to_be32(((u32 *)consts)[i]); in safexcel_cmac_setkey()
2214 memcpy(req->state, &ctx->base.ipad, SM3_DIGEST_SIZE); in safexcel_hmac_sm3_init()
2307 memcpy(key, &ctx->base.ipad, in safexcel_sha3_fbcheck()
2685 ctx->base.ipad.byte); in safexcel_hmac_sha3_setkey()
2695 ctx->base.ipad.byte + in safexcel_hmac_sha3_setkey()
2705 memcpy(&ctx->base.ipad, key, keylen); in safexcel_hmac_sha3_setkey()
2707 memcpy(&ctx->base.ipad, key, in safexcel_hmac_sha3_setkey()
2717 memset(ctx->base.ipad.byte + keylen, 0, in safexcel_hmac_sha3_setkey()
2740 memcpy(req->state, &ctx->base.ipad, SHA3_224_BLOCK_SIZE / 2); in safexcel_hmac_sha3_224_init()
2811 memcpy(req->state, &ctx->base.ipad, SHA3_256_BLOCK_SIZE / 2); in safexcel_hmac_sha3_256_init()
2882 memcpy(req->state, &ctx->base.ipad, SHA3_384_BLOCK_SIZE / 2); in safexcel_hmac_sha3_384_init()
2953 memcpy(req->state, &ctx->base.ipad, SHA3_512_BLOCK_SIZE / 2); in safexcel_hmac_sha3_512_init()