SunJCE DESKeyFactory does not accept SecretKeySpec

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.4.0
    • Affects Version/s: 1.2.1
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: