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

Extra slashes in Cipher transformation leads to NSPE instead of NSAE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 21
    • security-libs
    • None
    • Cause Known
    • generic
    • generic

      When the specified transformation string contains 3 or more slashes, e.g. AES/GCM//, the existing code in the javax.crypto.Cipher class breaks it into 3 components by lumping all input trailing the 2nd slash as padding scheme.
      Instead of passing "/" as the padding scheme which leads to NoSuchPaddingException, the expected behavior is to throw NoSuchAlgorithmException.

            valeriep Valerie Peng
            valeriep Valerie Peng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: