Skip to content

[PATCH v2] api: crypto: add support for AAD lengths expressed in bits - #2419

Open
JannePeltonen wants to merge 4 commits into
OpenDataPlane:masterfrom
JannePeltonen:crypto-aad-bit-mode
Open

JannePeltonen wants to merge 4 commits into
OpenDataPlane:masterfrom
JannePeltonen:crypto-aad-bit-mode

Conversation

@JannePeltonen

Copy link
Copy Markdown
Collaborator

Add a new crypto session parameter auth_aad_len_in_bits to indicate that AAD length is expressed in bits to support non-byte-divisible AAD lengths. Add a corresponding auth capability flag aad_len.bit_mode with default value false to indicate support for AAD length in bits.

@github-actions github-actions Bot changed the title api: crypto: add support for AAD lengths expressed in bits [PATCH v1] api: crypto: add support for AAD lengths expressed in bits Oct 8, 2026
@ktejasree123

Copy link
Copy Markdown

Acked-by: Tejasree Kondoj ktejasree@marvell.com

Add a new crypto session parameter auth_aad_len_in_bits to indicate that
AAD length is expressed in bits to support non-byte-divisible AAD lengths.
Add a corresponding auth capability flag aad_len.bit_mode with default
value false to indicate support for AAD length in bits.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Acked-by: Tejasree Kondoj <ktejasree@marvell.com>
Implement the new auth_aad_len_in_bits feature by not supporting it and
by failing session creation if auth_aad_len_in_bits is requested.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Acked-by: Tejasree Kondoj <ktejasree@marvell.com>
Add checking of the default value of the new auth_aad_len_in_bits crypto
session parameter.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Acked-by: Tejasree Kondoj <ktejasree@marvell.com>
Add printing of AAD bit mode when it is supported. Improve AAD length
printout by printing min, max and inc labels and by grouping all
AAD length capabilities.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
@github-actions github-actions Bot changed the title [PATCH v1] api: crypto: add support for AAD lengths expressed in bits [PATCH v2] api: crypto: add support for AAD lengths expressed in bits Oct 14, 2026
@JannePeltonen

Copy link
Copy Markdown
Collaborator Author

v2:

  • rebased
  • added a commit that prints the aad_len.bit mode auth alg capability if present

@@ -532,6 +532,11 @@ odp_crypto_session_create(const odp_crypto_session_param_t *param,
*session_out = ODP_CRYPTO_SESSION_INVALID;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_odp_crypto_session_print() could print the new auth_aad_len_in_bits parameter field.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But none of the crypto implementations in linux-gen or linux-dpdk support it, so it would always be false. I would rather add it only when/if support for the feature is added.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants