@@ -316,11 +316,11 @@ typedef struct odp_crypto_capability_t {
/** Maximum number of crypto sessions */
uint32_t max_sessions;
- /** Supported chipher algorithms */
- odp_crypto_cipher_algos_t chiphers;
+ /** Supported cipher algorithms */
+ odp_crypto_cipher_algos_t ciphers;
- /** Chipher algorithms implemented with HW offload */
- odp_crypto_cipher_algos_t hw_chiphers;
+ /** Cipher algorithms implemented with HW offload */
+ odp_crypto_cipher_algos_t hw_ciphers;
/** Supported authentication algorithms */
odp_crypto_auth_algos_t auths;
@@ -597,6 +597,31 @@ int process_sha256_params(odp_crypto_generic_session_t *session,
return 0;
}
+int odp_crypto_capability(odp_crypto_capability_t *capa)
+{
+ if (NULL == capa)
+ return -1;
+
+ capa->ciphers.bit.null = 1;
+ capa->ciphers.bit.des = 1;
+ capa->ciphers.bit.trides_cbc = 1;
+ capa->ciphers.bit.aes128_cbc = 1;
+ capa->ciphers.bit.aes128_gcm = 1;
+
+ capa->auths.bit.null = 1;
+ capa->auths.bit.md5_96 = 1;
+ capa->auths.bit.sha256_128 = 1;
+ capa->auths.bit.aes128_gcm = 1;
+
+ /* turn off the hw offload capability */
+ capa->hw_ciphers.all_bits = 0;
+ capa->hw_auths.all_bits = 0;
+
+ capa->max_sessions = MAX_SESSIONS;
+
+ return 0;
+}
+
int
odp_crypto_session_create(odp_crypto_session_params_t *params,
odp_crypto_session_t *session_out,
Get the available cipher and authentication algorithms in the odp sw implementation. Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> --- include/odp/api/spec/crypto.h | 8 ++++---- platform/linux-generic/odp_crypto.c | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-)