diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2017-12-19 19:47:54 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-02-26 12:17:31 +0300 |
commit | 7d516d5280b0aee67a69a2dd1c36684ad5f391a4 (patch) | |
tree | 473a8b4553041398f4bff2210c4d7d5f843fdf01 /include | |
parent | 1daae94dca6e72dff370df136550d40757d6c8e6 (diff) |
api: crypto: add separate auth IV
GMAC auth algorithm requires IV to work. Instead of hacking the
ODP_CIPHER_ALG_NULL iv to include value for ODP_AUTH_ALG_GMAC, provide
separate iv (in auth capability, session params and operation params).
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/spec/crypto.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 6688879ab..d2a1d1dd1 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -333,6 +333,9 @@ typedef struct odp_crypto_session_param_t { */ odp_crypto_key_t auth_key; + /** Authentication Initialization Vector (IV) */ + odp_crypto_iv_t auth_iv; + /** Authentication digest length in bytes * * Use odp_crypto_auth_capability() for supported digest lengths. @@ -408,6 +411,9 @@ typedef struct odp_crypto_op_param_t { uint8_t *cipher_iv_ptr; }; + /** Override session authentication IV pointer */ + uint8_t *auth_iv_ptr; + /** Offset from start of packet for hash result * * Specifies the offset where the hash result is to be stored. In case @@ -449,6 +455,9 @@ typedef struct odp_crypto_packet_op_param_t { uint8_t *cipher_iv_ptr; }; + /** Override session IV pointer for authentication */ + uint8_t *auth_iv_ptr; + /** Offset from start of packet for hash result * * Specifies the offset where the hash result is to be stored. In case @@ -614,6 +623,9 @@ typedef struct odp_crypto_auth_capability_t { /** Key length in bytes */ uint32_t key_len; + /** IV length in bytes */ + uint32_t iv_len; + /** Additional Authenticated Data (AAD) lengths */ struct { /** Minimum AAD length in bytes */ |