-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ChaCha20 cipher reuse with same key/IV or without init after decryption #50
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The expected behaviour for reuse of NativeChaCha20Cipher for decryption is altered to match the existing Sun implementation in ChaCha20Cipher, as updated in OpenJDK21. The following scenarios are now allowed for decryption: - Reinitialize with same key + nonce - Update AAD after a successful doFinal() without reinitializing - Update AAD after an AEADBadTagException Those scenarios are not allowed (i.e., an exception is thrown) in OpenJDK20 and earlier. Signed-off by: Kostas Tsiounis <kostas.tsiounis@ibm.com>
FYI @keithc-ca |
Jenkins compile alinux jdk21 |
jdk_security3_0 failed in https://openj9-jenkins.osuosl.org/job/Grinder/2946 for reasons that seem unrelated to this change; passed in https://openj9-jenkins.osuosl.org/job/Grinder/2947. |
keithc-ca
approved these changes
Sep 29, 2023
babsingh
added a commit
to babsingh/aqa-tests
that referenced
this pull request
Oct 17, 2023
JDK-next (JDK22) fix: ibmruntimes/openj9-openjdk-jdk#661 JDK21 fix: ibmruntimes/openj9-openjdk-jdk21#50 Closes: eclipse-openj9/openj9#17632 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh
added a commit
to babsingh/aqa-tests
that referenced
this pull request
Oct 17, 2023
JDK-next (JDK22) fix: ibmruntimes/openj9-openjdk-jdk#661 JDK21 fix: ibmruntimes/openj9-openjdk-jdk21#50 Closes: eclipse-openj9/openj9#17632 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
smlambert
pushed a commit
to adoptium/aqa-tests
that referenced
this pull request
Oct 17, 2023
JDK-next (JDK22) fix: ibmruntimes/openj9-openjdk-jdk#661 JDK21 fix: ibmruntimes/openj9-openjdk-jdk21#50 Closes: eclipse-openj9/openj9#17632 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
llxia
pushed a commit
to llxia/aqa-tests
that referenced
this pull request
Nov 22, 2023
JDK-next (JDK22) fix: ibmruntimes/openj9-openjdk-jdk#661 JDK21 fix: ibmruntimes/openj9-openjdk-jdk21#50 Closes: eclipse-openj9/openj9#17632 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
llxia
pushed a commit
to llxia/aqa-tests
that referenced
this pull request
Nov 22, 2023
JDK-next (JDK22) fix: ibmruntimes/openj9-openjdk-jdk#661 JDK21 fix: ibmruntimes/openj9-openjdk-jdk21#50 Closes: eclipse-openj9/openj9#17632 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
pshipton
pushed a commit
to adoptium/aqa-tests
that referenced
this pull request
Nov 22, 2023
JDK-next (JDK22) fix: ibmruntimes/openj9-openjdk-jdk#661 JDK21 fix: ibmruntimes/openj9-openjdk-jdk21#50 Closes: eclipse-openj9/openj9#17632 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The expected behaviour for reuse of
NativeChaCha20Cipher
for decryption is altered to match the existing Sun implementation inChaCha20Cipher
, as updated in OpenJDK21.The following scenarios are now allowed for decryption:
AAD
after a successfuldoFinal()
without reinitializingAAD
after anAEADBadTagException
Those scenarios are not allowed (i.e., an exception is thrown) in OpenJDK20 and earlier.
Back-ported from: ibmruntimes/openj9-openjdk-jdk#661
Fixes: eclipse-openj9/openj9#17632
Signed-off by: Kostas Tsiounis kostas.tsiounis@ibm.com