@@ -310,6 +310,19 @@ typedef struct odp_crypto_session_param_t {
*/
uint32_t auth_digest_len;
+ /** Authentication Additional Authenticated Data (AAD) length in bytes
+ *
+ * This parameter is used when AAD length is constant for all
+ * operations (packets) of the session. When AAD length varies, this
+ * must be set to zero and operation level AAD length parameter is
+ * used instead. Both session and operation level parameters must not
+ * be used simultaneously.
+ *
+ * Use odp_crypto_auth_capability() for supported AAD lengths.
+ * The default value is zero.
+ */
+ uint32_t auth_aad_len;
+
/** Async mode completion event queue
*
* The completion queue is used to return completions from
@@ -381,8 +394,15 @@ typedef struct odp_crypto_op_param_t {
/** Pointer to ADD */
uint8_t *ptr;
- /** AAD length in bytes. Use odp_crypto_auth_capability() for
- * supported AAD lengths. */
+ /** AAD length in bytes.
+ *
+ * Used only when AAD length is variable within the session.
+ * When AAD length is constant, this must be set to zero and
+ * session level AAD length parameter is used instead.
+ *
+ * Use odp_crypto_auth_capability() for supported AAD lengths.
+ * The default value is zero.
+ */
uint32_t length;
} aad;
@@ -422,8 +442,15 @@ typedef struct odp_crypto_packet_op_param_t {
/** Pointer to ADD */
uint8_t *ptr;
- /** AAD length in bytes. Use odp_crypto_auth_capability() for
- * supported AAD lengths. */
+ /** AAD length in bytes.
+ *
+ * Used only when AAD length is variable within the session.
+ * When AAD length is constant, this must be set to zero and
+ * session level AAD length parameter is used instead.
+ *
+ * Use odp_crypto_auth_capability() for supported AAD lengths.
+ * The default value is zero.
+ */
uint32_t length;
} aad;