Hi,

since DPDK 21.11 is out, we should start discussion to make asymmetric API stable.

 

-              Struct rte_crypto_vec vs struct rte_crypto_param_t

 

We have two almost identical functionally structs, one in _sym.h another in asym.h so we probably should pick one of them.

“rte_crypto_vec” additionally contains total length which will be useful information as PMD will overwrite “len” in many cases.

Unfortunately as “rte_crypto.h” includes “_sym.h” and “_asym.h” not other way around we cannot move it to “rte_crypto.h” but asymmetric will include symmetric anyway so it probably will not be that big of an issue.

[Akhil ] +1

 

-              Network byte order

 

               rte_crypto_param dP; /**<

               /**< dP - Private CRT component

               * Private CRT component of RSA parameter  required for CRT method

               * RSA private key operations in Octet-string network byte order

               * format.

               * dP = d mod ( p - 1 )

               */

We have plenty of these (sometimes in places where should not be, and not in places where should). Every member that contains this comment here is a big integer in big-endian format.

We could simplify it to:

 

/** Big integer in big-endian format */

typedef struct rte_crypto_vec rte_crypto_bigint;

 

               rte_crypto_bigint dP; /**< d mod ( p - 1 ) */

 

ED related algorithms like (EDDSA) will use little-endian bit integers so it will have to use different approach.

 

[Akhil] Using different approaches for endianness may not be a good idea. Why can’t we use rte_crypto_vec for LE? It has a void * data. Right?