Authentication capabilities list supported AAD lengths
per algorithm, but application did not have means to select which
length is used. Also pointer to AAD is added, since it may be
constructed also outside of packet data.

Signed-off-by: Petri Savolainen <petri.savolai...@linaro.org>
---
 include/odp/api/spec/crypto.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index 76977204..1f83e819 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -375,6 +375,16 @@ typedef struct odp_crypto_op_param_t {
         */
        uint32_t hash_result_offset;
 
+       /** Additional Authenticated Data (AAD) */
+       struct {
+               /** Pointer to ADD */
+               uint8_t *ptr;
+
+               /** AAD length in bytes. Use odp_crypto_auth_capa() for
+                *  supported AAD lengths. */
+               uint32_t length;
+       } aad;
+
        /** Data range to apply cipher */
        odp_crypto_data_range_t cipher_range;
 
-- 
2.11.0

Reply via email to