diff mbox series

[API-NEXT,2/2] api: crypto: add AAD operation parameters

Message ID 20170504125557.21688-2-petri.savolainen@linaro.org
State New
Headers show
Series [API-NEXT,1/2] api: crypto: add digest length session parameter | expand

Commit Message

Petri Savolainen May 4, 2017, 12:55 p.m. UTC
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.savolainen@linaro.org>

---
 include/odp/api/spec/crypto.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.11.0
diff mbox series

Patch

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;