#include <rte_malloc.h>
#include <rte_cpuflags.h>
-#include "armv8_crypto_defs.h"
+#include "AArch64cryptolib.h"
#include "armv8_pmd_private.h"
static const crypto_func_tbl_t
crypto_op_ca_encrypt = {
/* [cipher alg][auth alg][key length] = crypto_function, */
- [CIPH_AES_CBC][AUTH_SHA1_HMAC][KEYL(128)] = aes128cbc_sha1_hmac,
- [CIPH_AES_CBC][AUTH_SHA256_HMAC][KEYL(128)] = aes128cbc_sha256_hmac,
+ [CIPH_AES_CBC][AUTH_SHA1_HMAC][KEYL(128)] =
+ armv8_enc_aes_cbc_sha1_128,
+ [CIPH_AES_CBC][AUTH_SHA256_HMAC][KEYL(128)] =
+ armv8_enc_aes_cbc_sha256_128,
};
static const crypto_func_tbl_t
static const crypto_func_tbl_t
crypto_op_ac_decrypt = {
/* [cipher alg][auth alg][key length] = crypto_function, */
- [CIPH_AES_CBC][AUTH_SHA1_HMAC][KEYL(128)] = sha1_hmac_aes128cbc_dec,
- [CIPH_AES_CBC][AUTH_SHA256_HMAC][KEYL(128)] = sha256_hmac_aes128cbc_dec,
+ [CIPH_AES_CBC][AUTH_SHA1_HMAC][KEYL(128)] =
+ armv8_dec_aes_cbc_sha1_128,
+ [CIPH_AES_CBC][AUTH_SHA256_HMAC][KEYL(128)] =
+ armv8_dec_aes_cbc_sha256_128,
};
/**
static const crypto_key_sched_tbl_t
crypto_key_sched_encrypt = {
/* [cipher alg][key length] = key_expand_func, */
- [CIPH_AES_CBC][KEYL(128)] = aes128_key_sched_enc,
+ [CIPH_AES_CBC][KEYL(128)] = armv8_expandkeys_enc_aes_cbc_128,
};
static const crypto_key_sched_tbl_t
crypto_key_sched_decrypt = {
/* [cipher alg][key length] = key_expand_func, */
- [CIPH_AES_CBC][KEYL(128)] = aes128_key_sched_dec,
+ [CIPH_AES_CBC][KEYL(128)] = armv8_expandkeys_dec_aes_cbc_128,
};
/**
* Calculate partial hash values for i_key_pad and o_key_pad.
* Will be used as initialization state for final HMAC.
*/
- error = sha1_block_partial(NULL, sess->auth.hmac.i_key_pad,
- partial, SHA1_BLOCK_SIZE);
+ error = armv8_sha1_block_partial(NULL,
+ sess->auth.hmac.i_key_pad,
+ partial, SHA1_BLOCK_SIZE);
if (error != 0)
return -1;
memcpy(sess->auth.hmac.i_key_pad, partial, SHA1_BLOCK_SIZE);
- error = sha1_block_partial(NULL, sess->auth.hmac.o_key_pad,
- partial, SHA1_BLOCK_SIZE);
+ error = armv8_sha1_block_partial(NULL,
+ sess->auth.hmac.o_key_pad,
+ partial, SHA1_BLOCK_SIZE);
if (error != 0)
return -1;
memcpy(sess->auth.hmac.o_key_pad, partial, SHA1_BLOCK_SIZE);
* Calculate partial hash values for i_key_pad and o_key_pad.
* Will be used as initialization state for final HMAC.
*/
- error = sha256_block_partial(NULL, sess->auth.hmac.i_key_pad,
- partial, SHA256_BLOCK_SIZE);
+ error = armv8_sha256_block_partial(NULL,
+ sess->auth.hmac.i_key_pad,
+ partial, SHA256_BLOCK_SIZE);
if (error != 0)
return -1;
memcpy(sess->auth.hmac.i_key_pad, partial, SHA256_BLOCK_SIZE);
- error = sha256_block_partial(NULL, sess->auth.hmac.o_key_pad,
- partial, SHA256_BLOCK_SIZE);
+ error = armv8_sha256_block_partial(NULL,
+ sess->auth.hmac.o_key_pad,
+ partial, SHA256_BLOCK_SIZE);
if (error != 0)
return -1;
memcpy(sess->auth.hmac.o_key_pad, partial, SHA256_BLOCK_SIZE);
struct rte_mbuf *mbuf_src, struct rte_mbuf *mbuf_dst)
{
crypto_func_t crypto_func;
- crypto_arg_t arg;
+ armv8_cipher_digest_t arg;
struct rte_mbuf *m_asrc, *m_adst;
uint8_t *csrc, *cdst;
uint8_t *adst, *asrc;