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

keytool -genkey behaviour is inconsistent when keysize = 2048.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.0
    • 1.2.0
    • security-libs
    • None
    • 1.2beta2
    • generic
    • solaris_2.5.1
    • Not verified

      If I give a wrong key size (56 for example) keytool says that 2048 is a
      valid keysize. But if I give 2048 as the keysize it does not accept.

      Here is a way to reproduce.

      TestingKey Sizes .....
                              COMMAND = keytool -genkey -alias first -keyalg DSA -key
      size 56 -sigalg DSS -dname cn=Satya -keypass keypasswd -keystore mykeystore -sto
      repass storepasswd
      java.lang.Exception: Invalid keysize. Keysize must be equal to 512, 768, 1024, o
      r 2048
                              Key size = 56 : test PASSED
       
      COMMAND = keytool -genkey -alias fourth -keyalg DSA -ke
      ysize 2048 -sigalg DSS -dname cn=Satya -keypass keypasswd -keystore mykeystore -
      storepass storepasswd
      java.lang.IllegalArgumentException: Modulus size must range from 512 to 1024 and
       be a multiple of 64
                              Key size = 2048 : test FAILED command unexpectedly fail
      ed

            jlueheorcl Jan Luehe (Inactive)
            sndodda Satya Dodda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: