Java Security: Illegal key size or default parameters?

前端 未结 19 1488
日久生厌
日久生厌 2020-11-22 03:34

I had asked a question about this earlier, but it didn\'t get answered right and led nowhere.

So I\'ve clarified few details on the problem and I would really like t

相关标签:
19条回答
  • 2020-11-22 03:52

    You need to go there

    /jdk1.8.0_152 | /jre | /lib | /security | java.security and uncomment the

    #crypto.policy=unlimited
    

    to

    crypto.policy=unlimited
    
    0 讨论(0)
  • 2020-11-22 03:55

    Download the JCE Files from below Link for Java 6

    https://www.oracle.com/java/technologies/jce-6-download.html
    

    Download the JCE Files from below Link for Java 8

    https://www.oracle.com/java/technologies/javase-jce8-downloads.html
    

    Copy the files downloaded from the above Link and Go to JDK Installed Directory

    /Users/ik/jdk1.8.0_72/jre/lib/security
    

    Paste & Replace the files from the directory. Restart your application & the error must be resolved.

    0 讨论(0)
  • 2020-11-22 03:57

    there are two options to solve this issue

    option number 1 : use certificate with less length RSA 2048

    option number 2 : you will update two jars in jre\lib\security whatever you use java http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html

    or you use IBM websphere or any application server that use its java . the main problem that i faced i used certification with maximum length ,when i deployed ears on websphere the same exception is thrown

    Java Security: Illegal key size or default parameters?
    

    i updated java intsalled folder in websphere with two jars https://www14.software.ibm.com/webapp/iwm/web/reg/pick.do?source=jcesdk&lang=en_US

    you can check reference in link https://www-01.ibm.com/support/docview.wss?uid=swg21663373

    0 讨论(0)
  • 2020-11-22 03:58

    Most likely you don't have the unlimited strength file installed now.

    You may need to download this file:

    Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6

    Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 Download

    Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8 Download (only required for versions before Java 8 u162)

    Extract the jar files from the zip and save them in ${java.home}/jre/lib/security/.

    0 讨论(0)
  • 2020-11-22 03:58

    Default JDK supports encryption only through 128 bit keys becuase of American restrictions. So to support encryption from 256 bit long key we have to replace local_policy.jar and US_export_policy.jars in $JAVA_HOME/java-8-oracle/jre/lib/security folder otherwise it will give:

    java.security.InvalidKeyException: Illegal key size or default

    0 讨论(0)
  • 2020-11-22 03:59

    For JAVA 7 the download link is jce-7-download

    Copy the two downloaded jars in Java\jdk1.7.0_10\jre\lib\security
    Take a backup of older jars to be on safer side.

    For JAVA 8 the download link is jce-8-download
    Copy the downloaded jars in Java\jdk1.8.0_45\jre\lib\security
    Take a backup of older jars to be on safer side.

    0 讨论(0)
提交回复
热议问题