From 8d8446e3e2e13e986f5880b1ec77449397b99269 Mon Sep 17 00:00:00 2001 From: Koushik Thirupattur Date: Thu, 12 Jun 2025 10:01:11 -0700 Subject: [PATCH] 8349946:Cipher javadoc could describe AEAD reuse better --- src/java.base/share/classes/javax/crypto/Cipher.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/java.base/share/classes/javax/crypto/Cipher.java b/src/java.base/share/classes/javax/crypto/Cipher.java index 49c0784787d..4d3b5c517e7 100644 --- a/src/java.base/share/classes/javax/crypto/Cipher.java +++ b/src/java.base/share/classes/javax/crypto/Cipher.java @@ -114,7 +114,8 @@ import sun.security.util.KnownOIDs; * {@code DECRYPT_MODE}) and the algorithm. AEAD algorithms may not reset to prevent * forgery attacks due to Key and IV uniqueness requirements. * An {@link IllegalStateException} will be thrown when calling {@code update} - * or {@code doFinal} methods when a reset did not occur. + * or {@code doFinal} methods when a reset did not occur. {@code init} may + * re-initialize the {@code Cipher} object with new parameters. * * @see javax.crypto.Cipher * @see javax.crypto.spec.GCMParameterSpec @@ -147,8 +148,6 @@ import sun.security.util.KnownOIDs; * * @spec https://www.rfc-editor.org/info/rfc5116 * RFC 5116: An Interface and Algorithms for Authenticated Encryption - * @spec https://www.rfc-editor.org/info/rfc7539 - * RFC 7539: ChaCha20 and Poly1305 for IETF Protocols * @spec security/standard-names.html Java Security Standard Algorithm Names * @author Jan Luehe * @see KeyGenerator