struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
struct ablk_ctx *ablkctx = ABLK_CTX(c_ctx(tfm));
struct chcr_skcipher_req_ctx *reqctx = skcipher_request_ctx(req);
- struct crypto_aes_ctx aes;
+ struct aes_key aes;
int ret, i;
u8 *key;
unsigned int keylen;
*/
if (KEY_CONTEXT_CK_SIZE_G(ntohl(ablkctx->key_ctx_hdr))
== CHCR_KEYCTX_CIPHER_KEY_SIZE_192)
- ret = aes_expandkey(&aes, key, keylen - 8);
+ ret = aes_preparekey(&aes, key, keylen - 8);
else
- ret = aes_expandkey(&aes, key, keylen);
+ ret = aes_preparekey(&aes, key, keylen);
if (ret)
return ret;
aes_encrypt(&aes, iv, iv);
struct chcr_gcm_ctx *gctx = GCM_CTX(aeadctx);
unsigned int ck_size;
int ret = 0, key_ctx_size = 0;
- struct crypto_aes_ctx aes;
+ struct aes_enckey aes;
aeadctx->enckey_len = 0;
crypto_aead_clear_flags(aeadctx->sw_cipher, CRYPTO_TFM_REQ_MASK);
/* Calculate the H = CIPH(K, 0 repeated 16 times).
* It will go in key context
*/
- ret = aes_expandkey(&aes, key, keylen);
+ ret = aes_prepareenckey(&aes, key, keylen);
if (ret) {
aeadctx->enckey_len = 0;
goto out;