Skip to content

Use proper ByteBuffer size in ChaCha20Poly1305.updateAAD()#1209

Merged
jasonkatonica merged 2 commits intoIBM:java25from
KostasTsiounis:chacha20_aad_j25
Feb 24, 2026
Merged

Use proper ByteBuffer size in ChaCha20Poly1305.updateAAD()#1209
jasonkatonica merged 2 commits intoIBM:java25from
KostasTsiounis:chacha20_aad_j25

Conversation

@KostasTsiounis
Copy link
Copy Markdown
Member

@KostasTsiounis KostasTsiounis commented Feb 20, 2026

When performing an update of the AAD with a ByteBuffer in ChaCha20Poly1305, ensure the size of remaining data is used rather than the capacity of the buffer.

Additional tests to verify this behaviour are also added.

Back-ported from: #1196, #1213

Signed-off-by: Kostas Tsiounis kostas.tsiounis@ibm.com

When performing an update of the AAD with a ByteBuffer in
ChaCha20Poly1305, ensure the size of remaining data is
used rather than the capacity of the buffer.

Additional tests to verify this behaviour are also added.

Signed-off-by: Kostas Tsiounis <kostas.tsiounis@ibm.com>
Signed-off-by: Kostas Tsiounis <kostas.tsiounis@ibm.com>
Copy link
Copy Markdown
Collaborator

@taoliult taoliult left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@jasonkatonica jasonkatonica left a comment

Choose a reason for hiding this comment

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

LGTM

@jasonkatonica jasonkatonica merged commit 5e420f4 into IBM:java25 Feb 24, 2026
3 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