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

Cipher.init throws exception if Cipher is generated using RC4 as algorithm

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • security-libs
    • None
    • beta
    • generic, x86
    • generic, windows_xp
    • Verified

        Cipher.init(int opmode, Key key) throws exception when Cipher is generated using RC4 as algorithm, but no exception were thrown if algorithm is ARCFOUR.

        The following exception is generated by the test program attached (SQE ws: .../security/src/Manual/PKCS11/TestSunJCE.java):

        --- START ---
        ... TESTING: Algorithm = ARCFOUR : KeyLength = 128 ...
        Provider: SunJCE version 1.5
        IV: null
        === STATUS: PASS
        ... TESTING: Algorithm = RC4 : KeyLength = 128 ...
        Provider: SunJCE version 1.5
        IV: null
        === STATUS: FAIL (with exception)
        java.security.InvalidKeyException: Illegal key size or default parameters
        at javax.crypto.Cipher.a(DashoA12275)
        at javax.crypto.Cipher.init(DashoA12275)
        at javax.crypto.Cipher.init(DashoA12275)
        at TestSunJCE.testSecretKey(TestSunJCE.java:213)
        at TestSunJCE.main(TestSunJCE.java:480)
        --- END: ---
        STATUS: FAIL

              valeriep Valerie Peng
              bsitu Bill Situ
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: