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

Unexpected IllegalBlockSizeException thrown for GCM mode for certain data lengths

    Details

      Description


      JDK tested: JDK 8 b119
      OS tested: Solaris 11 sparcv9

      Tests fail and reported following stack trace when data is not in multiple of 16 bytes.

      javax.crypto.IllegalBlockSizeException: CRYPTO_DATA_LEN_RANGE
      at com.oracle.security.ucrypto.NativeCipher.doFinal(NativeCipher.java:555)
      at com.oracle.security.ucrypto.NativeCipher.engineDoFinal(NativeCipher.java:391)
      at com.oracle.security.ucrypto.NativeGCMCipher.engineDoFinal(NativeGCMCipher.java:378)
      at com.oracle.security.ucrypto.NativeGCMCipher.engineDoFinal(NativeGCMCipher.java:337)
      at javax.crypto.Cipher.doFinal(Cipher.java:2121)
      ...

      This should not happen as GCM mode does not require data to be multiple of blocks.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                valeriep Valerie Peng
                Reporter:
                kshefov Konstantin Shefov
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: