Skip to content

Update ChaCha20 and ChaCha20Poly1305 cipher to match expected Cipher behaviour#20

Closed
KostasTsiounis wants to merge 1 commit intoibmruntimes:java11from
KostasTsiounis:chacha20_reinit_j11
Closed

Update ChaCha20 and ChaCha20Poly1305 cipher to match expected Cipher behaviour#20
KostasTsiounis wants to merge 1 commit intoibmruntimes:java11from
KostasTsiounis:chacha20_reinit_j11

Conversation

@KostasTsiounis
Copy link
Copy Markdown
Collaborator

Certain changes have to be made to match the official documentation regarding Cipher instances:

  • In newer Java versions (11+), init() needs to be called after doFinal() when encrypting.
  • When performing a doFinal() with a short buffer, a call to init() is required.

Tests to validate said behaviour are also added or altered accordingly.

Back-ported from: IBM#518

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

…behaviour

Certain changes have to be made to match the official
documentation regarding Cipher instances:
- In newer Java versions (11+), init() needs to be called
  after doFinal() when encrypting.
- When performing a doFinal() with a short buffer, a call
  to init is required.

Tests to validate said behaviour are also added or altered
accordingly.

Signed-off-by: Kostas Tsiounis <kostas.tsiounis@ibm.com>
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.

1 participant