Various cipher and authentication algorithms support multiple key/IV/digest 
lengths. It's not a scalable solution to define these lengths as part of 
algorithm enumeration. This patch set deprecates enumerations (e.g. 
ODP_CIPHER_ALG_AES128_CBC) with length definitions. Those are still supported 
but will be removed in next API version. New enumerations define only
algorithm names, with the exception of SHA-2 family of algorithms which are 
commonly referred with their digest length (such as SHA-256). The supported 
key/IV/digest lengths are requested with two new functions 
odp_crypto_cipher_capa() and odp_crypto_auth_capa(). Usage of HMAC is included 
into authentication algorithm name (it used to be implicit). Only currently 
supported and validation tested algorithms are defined, but later on e.g. MD5 
or SHA-256 (without HMAC) may be defined as well as a set of new algorithms.

Supported key/IV/digest lengths are set to values that pass current validation 
test suite. Some tests may need to be updated with their key/IV/digest length 
usage. For example, AES-GCM authentication test uses key length of zero bytes 
(since it's paired with AES-GCM cipher).


Petri Savolainen (7):
  api: crypto: decouple key length from algorithm enumeration
  linux-gen: crypto: add algo capability functions
  linux-gen: crypto: add support to new enumerations
  api: crypto: added session params init
  api: crypto: documentation clean up
  test: crypto: use odp_crypto_session_params_init
  validation: crypto: use algorithm capability

 example/ipsec/odp_ipsec_cache.c                    |   2 +
 include/odp/api/spec/crypto.h                      | 418 +++++++++++++++------
 .../linux-generic/include/odp_crypto_internal.h    |  19 +-
 platform/linux-generic/odp_crypto.c                | 293 +++++++++++----
 test/common_plat/performance/odp_crypto.c          |   1 +
 .../validation/api/crypto/odp_crypto_test_inp.c    | 115 ++++--
 6 files changed, 619 insertions(+), 229 deletions(-)

-- 
2.8.1

Reply via email to