Skip to content

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

Merged
jasonkatonica merged 2 commits intoIBM:java26from
KostasTsiounis:chacha20_aad_j26
Feb 24, 2026
Merged

Use proper ByteBuffer size in ChaCha20Poly1305.updateAAD()#1208
jasonkatonica merged 2 commits intoIBM:java26from
KostasTsiounis:chacha20_aad_j26

Conversation

@KostasTsiounis
Copy link
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
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
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 cbc8a54 into IBM:java26 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