Hello,

The Texas Instruments keystone2 out-of-tree kernel uses the 
private_AES_set_encrypt_key() and
the AES_encrypt() at the crypto HW acceleration driver.

The "crypto: arm/aes - replace bit-sliced OpenSSL NEON code" commit removed 
those functions.
Here is a code, which calls the removed functions.

static inline int sa_aes_xcbc_subkey(u8 *sub_key1, u8 *sub_key2,
                                     u8 *sub_key3, const u8 *key,
                                     u16 key_sz)
{
        struct AES_KEY enc_key;

        if (private_AES_set_encrypt_key(key, (key_sz * 8), &enc_key)) {
                pr_err("%s: failed to set enc key\n", __func__);
                return -EINVAL;
        }

        if (sub_key1) {
                memset(sub_key1, 0x01, AES_BLOCK_SIZE);
                AES_encrypt(sub_key1, sub_key1, &enc_key);
        }

        if (sub_key2) {
                memset(sub_key2, 0x02, AES_BLOCK_SIZE);
                AES_encrypt(sub_key2, sub_key2, &enc_key);
        }

        if (sub_key3) {
                memset(sub_key3, 0x03, AES_BLOCK_SIZE);
                AES_encrypt(sub_key3, sub_key3, &enc_key);
        }

        return 0;
}

Which functions can I use to replace the removed ones in the above code?

I'm very appreciate any advice.

Sincerely,
-Vitaly Andrianov

Reply via email to