Lines Matching full:ipad
123 memcpy(ctx->base.ctxr->data, &ctx->base.ipad, ctx->key_sz); in safexcel_context_control()
380 u32 *ipad = ctx->base.ipad.word; in safexcel_ahash_send_req() local
383 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()
1017 /* Start from ipad precompute */ in safexcel_hmac_sha1_init()
1018 memcpy(req->state, &ctx->base.ipad, SHA1_DIGEST_SIZE); in safexcel_hmac_sha1_init()
1019 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha1_init()
1061 unsigned int keylen, u8 *ipad, u8 *opad) in safexcel_hmac_init_pad() argument
1069 memcpy(ipad, key, keylen); in safexcel_hmac_init_pad()
1078 ahash_request_set_crypt(areq, &sg, ipad, keylen); in safexcel_hmac_init_pad()
1096 memset(ipad + keylen, 0, blocksize - keylen); in safexcel_hmac_init_pad()
1097 memcpy(opad, ipad, blocksize); in safexcel_hmac_init_pad()
1100 ipad[i] ^= HMAC_IPAD_VALUE; in safexcel_hmac_init_pad()
1147 u8 *ipad, *opad; in __safexcel_hmac_setkey() local
1163 ipad = kcalloc(2, blocksize, GFP_KERNEL); in __safexcel_hmac_setkey()
1164 if (!ipad) { in __safexcel_hmac_setkey()
1169 opad = ipad + blocksize; in __safexcel_hmac_setkey()
1171 ret = safexcel_hmac_init_pad(areq, blocksize, key, keylen, ipad, opad); in __safexcel_hmac_setkey()
1175 ret = safexcel_hmac_init_iv(areq, blocksize, ipad, istate); in __safexcel_hmac_setkey()
1182 kfree(ipad); in __safexcel_hmac_setkey()
1204 (memcmp(&base->ipad, istate.state, state_sz) || in safexcel_hmac_setkey()
1208 memcpy(&base->ipad, &istate.state, state_sz); in safexcel_hmac_setkey()
1390 /* Start from ipad precompute */ in safexcel_hmac_sha224_init()
1391 memcpy(req->state, &ctx->base.ipad, SHA256_DIGEST_SIZE); in safexcel_hmac_sha224_init()
1392 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha224_init()
1462 /* Start from ipad precompute */ in safexcel_hmac_sha256_init()
1463 memcpy(req->state, &ctx->base.ipad, SHA256_DIGEST_SIZE); in safexcel_hmac_sha256_init()
1464 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha256_init()
1648 /* Start from ipad precompute */ in safexcel_hmac_sha512_init()
1649 memcpy(req->state, &ctx->base.ipad, SHA512_DIGEST_SIZE); in safexcel_hmac_sha512_init()
1650 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha512_init()
1720 /* Start from ipad precompute */ in safexcel_hmac_sha384_init()
1721 memcpy(req->state, &ctx->base.ipad, SHA512_DIGEST_SIZE); in safexcel_hmac_sha384_init()
1722 /* Already processed the key^ipad part now! */ in safexcel_hmac_sha384_init()
1842 /* Start from ipad precompute */ in safexcel_hmac_md5_init()
1843 memcpy(req->state, &ctx->base.ipad, MD5_DIGEST_SIZE); in safexcel_hmac_md5_init()
1844 /* Already processed the key^ipad part now! */ in safexcel_hmac_md5_init()
1914 memset(&ctx->base.ipad, 0, sizeof(u32)); in safexcel_crc32_cra_init()
1926 req->state[0] = cpu_to_le32(~ctx->base.ipad.word[0]); in safexcel_crc32_init()
1948 memcpy(&ctx->base.ipad, key, sizeof(u32)); in safexcel_crc32_setkey()
1998 memcpy(req->state, &ctx->base.ipad, ctx->key_sz); in safexcel_cbcmac_init()
2023 memset(&ctx->base.ipad, 0, 2 * AES_BLOCK_SIZE); in safexcel_cbcmac_setkey()
2025 ctx->base.ipad.be[i + 8] = cpu_to_be32(aes.key_enc[i]); in safexcel_cbcmac_setkey()
2107 ctx->base.ipad.word[i] = swab32(key_tmp[i]); in safexcel_xcbcmac_setkey()
2190 ctx->base.ipad.word[i + 8] = swab32(aes.key_enc[i]); in safexcel_cmac_setkey()
2221 ctx->base.ipad.be[i] = cpu_to_be32(((u32 *)consts)[i]); in safexcel_cmac_setkey()
2342 /* Start from ipad precompute */ in safexcel_hmac_sm3_init()
2343 memcpy(req->state, &ctx->base.ipad, SM3_DIGEST_SIZE); in safexcel_hmac_sm3_init()
2344 /* Already processed the key^ipad part now! */ in safexcel_hmac_sm3_init()
2436 memcpy(key, &ctx->base.ipad, in safexcel_sha3_fbcheck()
2813 ctx->base.ipad.byte); in safexcel_hmac_sha3_setkey()
2823 ctx->base.ipad.byte + in safexcel_hmac_sha3_setkey()
2828 * Copy the key to our ipad & opad buffers in safexcel_hmac_sha3_setkey()
2829 * Note that ipad and opad each contain one half of the key, in safexcel_hmac_sha3_setkey()
2833 memcpy(&ctx->base.ipad, key, keylen); in safexcel_hmac_sha3_setkey()
2835 memcpy(&ctx->base.ipad, key, in safexcel_hmac_sha3_setkey()
2845 memset(ctx->base.ipad.byte + keylen, 0, in safexcel_hmac_sha3_setkey()
2868 memcpy(req->state, &ctx->base.ipad, SHA3_224_BLOCK_SIZE / 2); in safexcel_hmac_sha3_224_init()
2939 memcpy(req->state, &ctx->base.ipad, SHA3_256_BLOCK_SIZE / 2); in safexcel_hmac_sha3_256_init()
3010 memcpy(req->state, &ctx->base.ipad, SHA3_384_BLOCK_SIZE / 2); in safexcel_hmac_sha3_384_init()
3081 memcpy(req->state, &ctx->base.ipad, SHA3_512_BLOCK_SIZE / 2); in safexcel_hmac_sha3_512_init()