Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8358812

Cipher javadoc could describe AEAD reuse better

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • security-libs
    • None
    • minimal
    • Java API
    • SE

      Summary

      Cipher javadoc could better describe AEAD reuse.

      Problem

      The class documentation in javax.crypto.Cipher could better explain AEAD modes and their behavior regarding reuse. The current example is too specific to GCM and does not clarify how exceptions may occur.

      Solution

      The javadoc should state that a call to Cipher.doFinal() may not reset the object's state when used with an AEAD algorithm. The class-level Javadoc should more clearly explain why an IllegalStateException is thrown when the Cipher object has not been reinitialized, rather than relying solely on per-method documentation

      Specification

            kthirupattur Koushik Muthukrishnan Thirupattur
            ascarpino Anthony Scarpino
            Anthony Scarpino
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: