Lines Matching full:ipad
125 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()
1019 /* Start from ipad precompute */ in safexcel_hmac_sha1_init()
1020 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
1021 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha1_init()
1047 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
1055 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
1064 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad()
1078 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad()
1079 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
1082 ipad[i] ^= HMAC_IPAD_VALUE; in safexcel_hmac_init_pad()
1123 u8 *ipad, *opad; in __safexcel_hmac_setkey() local
1139 ipad = kcalloc(2, blocksize, GFP_KERNEL); in __safexcel_hmac_setkey()
1140 if (!ipad) { in __safexcel_hmac_setkey()
1145 opad = ipad + blocksize; in __safexcel_hmac_setkey()
1147 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); in __safexcel_hmac_setkey()
1151 ret = safexcel_hmac_init_iv(areq, blocksize, ipad, istate); in __safexcel_hmac_setkey()
1158 kfree(ipad); in __safexcel_hmac_setkey()
1180 (memcmp(&base->ipad, istate.state, state_sz) || in safexcel_hmac_setkey()
1184 memcpy(&base->ipad, &istate.state, state_sz); in safexcel_hmac_setkey()
1366 /* Start from ipad precompute */ in safexcel_hmac_sha224_init()
1367 memcpy(req->state, &ctx->base.ipad, SHA256_DIGEST_SIZE); in safexcel_hmac_sha224_init()
1368 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha224_init()
1438 /* Start from ipad precompute */ in safexcel_hmac_sha256_init()
1439 memcpy(req->state, &ctx->base.ipad, SHA256_DIGEST_SIZE); in safexcel_hmac_sha256_init()
1440 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha256_init()
1624 /* Start from ipad precompute */ in safexcel_hmac_sha512_init()
1625 memcpy(req->state, &ctx->base.ipad, SHA512_DIGEST_SIZE); in safexcel_hmac_sha512_init()
1626 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha512_init()
1696 /* Start from ipad precompute */ in safexcel_hmac_sha384_init()
1697 memcpy(req->state, &ctx->base.ipad, SHA512_DIGEST_SIZE); in safexcel_hmac_sha384_init()
1698 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha384_init()
1818 /* Start from ipad precompute */ in safexcel_hmac_md5_init()
1819 memcpy(req->state, &ctx->base.ipad, MD5_DIGEST_SIZE); in safexcel_hmac_md5_init()
1820 /* Already processed the key^ipad part now! */ in safexcel_hmac_md5_init()
1890 memset(&ctx->base.ipad, 0, sizeof(u32)); in safexcel_crc32_cra_init()
1902 req->state[0] = cpu_to_le32(~ctx->base.ipad.word[0]); in safexcel_crc32_init()
1924 memcpy(&ctx->base.ipad, key, sizeof(u32)); in safexcel_crc32_setkey()
1974 memcpy(req->state, &ctx->base.ipad, ctx->key_sz); in safexcel_cbcmac_init()
1999 memset(&ctx->base.ipad, 0, 2 * AES_BLOCK_SIZE); in safexcel_cbcmac_setkey()
2001 ctx->base.ipad.be[i + 8] = cpu_to_be32(aes.key_enc[i]); in safexcel_cbcmac_setkey()
2075 ctx->base.ipad.word[i] = swab32(key_tmp[i]); in safexcel_xcbcmac_setkey()
2154 ctx->base.ipad.word[i + 8] = swab32(ctx->aes->key_enc[i]); in safexcel_cmac_setkey()
2177 ctx->base.ipad.be[i] = cpu_to_be32(((u32 *)consts)[i]); in safexcel_cmac_setkey()
2297 /* Start from ipad precompute */ in safexcel_hmac_sm3_init()
2298 memcpy(req->state, &ctx->base.ipad, SM3_DIGEST_SIZE); in safexcel_hmac_sm3_init()
2299 /* Already processed the key^ipad part now! */ in safexcel_hmac_sm3_init()
2391 memcpy(key, &ctx->base.ipad, in safexcel_sha3_fbcheck()
2769 ctx->base.ipad.byte); in safexcel_hmac_sha3_setkey()
2779 ctx->base.ipad.byte + in safexcel_hmac_sha3_setkey()
2784 * Copy the key to our ipad & opad buffers in safexcel_hmac_sha3_setkey()
2785 * Note that ipad and opad each contain one half of the key, in safexcel_hmac_sha3_setkey()
2789 memcpy(&ctx->base.ipad, key, keylen); in safexcel_hmac_sha3_setkey()
2791 memcpy(&ctx->base.ipad, key, in safexcel_hmac_sha3_setkey()
2801 memset(ctx->base.ipad.byte + keylen, 0, in safexcel_hmac_sha3_setkey()
2824 memcpy(req->state, &ctx->base.ipad, SHA3_224_BLOCK_SIZE / 2); in safexcel_hmac_sha3_224_init()
2895 memcpy(req->state, &ctx->base.ipad, SHA3_256_BLOCK_SIZE / 2); in safexcel_hmac_sha3_256_init()
2966 memcpy(req->state, &ctx->base.ipad, SHA3_384_BLOCK_SIZE / 2); in safexcel_hmac_sha3_384_init()
3037 memcpy(req->state, &ctx->base.ipad, SHA3_512_BLOCK_SIZE / 2); in safexcel_hmac_sha3_512_init()