Skip to content

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

Merged
MatiasElo merged 4 commits into
OpenDataPlane:masterfrom
JannePeltonen:crypto-aad-bit-mode
Oct 23, 2026
Merged

MatiasElo merged 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

@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.

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.

It's for debugging purposes, no need to hide it whether it's supported or not.

@MatiasElo MatiasElo added this to the v1.52.0 milestone Oct 19, 2026
@github-actions github-actions Bot changed the title [PATCH v2] api: crypto: add support for AAD lengths expressed in bits [PATCH v3] api: crypto: add support for AAD lengths expressed in bits Oct 23, 2026
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>
Reviewed-by: Tuomas Taipale <tuomas.taipale@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>
Reviewed-by: Tuomas Taipale <tuomas.taipale@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>
Reviewed-by: Tuomas Taipale <tuomas.taipale@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>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
@MatiasElo
MatiasElo force-pushed the crypto-aad-bit-mode branch from 5e9c46d to 5c88a47 Compare October 23, 2026 12:05
@MatiasElo
MatiasElo enabled auto-merge (rebase) October 23, 2026 12:05
@github-actions github-actions Bot changed the title [PATCH v3] api: crypto: add support for AAD lengths expressed in bits [PATCH v4] api: crypto: add support for AAD lengths expressed in bits Oct 23, 2026
@MatiasElo
MatiasElo merged commit 954c9ce into OpenDataPlane:master Oct 23, 2026
135 checks passed
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.

4 participants