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

SunJCE DESKeyFactory does not accept SecretKeySpec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.2.1
    • security-libs
    • None
    • merlin
    • generic
    • solaris_2.6

      com.sun.crypto.provider.DESKeyFactory contains the following code:

         protected SecretKey engineGenerateSecret(KeySpec keySpec)
      throws InvalidKeySpecException {
      DESKey desKey = null;

      try {
      if (keySpec == null ||
      !(keySpec instanceof DESKeySpec)) {
      throw new InvalidKeySpecException
      ("Inappropriate key specification");
      }

      If an instance of javax.crypto.spec.SecretKeySpec is passed in to DESKeyFactory.engineGenerateSecret(), it throws an InvalidKeySpecException which may not be necessary.

            shihliu Sharon Liu (Inactive)
            mupadhyasunw Mayank Upadhyay (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: