01 Jun 2020
jca,Java Cryptography Architecture,顾名思义,是用来提供加密的基础架构。
而jce,Java Cryptography Extension,很明显,是jca的一个部分。
JCE 提供了一个关于加密、密钥生成、密钥同意和Message Authentication Code (MAC) 算法的框架和实现。
因为如果使用limited policy,官方限制了加密的强度。看文档是针对不同加密方法限制了位数最高是64和128不等。
JDK 8u161、7u171和6u181及之后版本,都会在
关于jdk采用哪个policy的策略,配置和说明如下:
The JDK determines the policy configuration to use as follows: If the crypto.policy Security Property is defined, then the JDK uses the policy configuration specified by this Security Property. If the crypto.policy Security Property is not set, and the traditional US_export_policy.jar and local_policy.jar files (which correspond to strong but limited cryptographic strength and unlimited cryptographic strength, respectively) are found in the legacy <java_home>/lib/security directory, then the JDK uses the policy configuration specified in these JAR files. This helps preserve compatibility for users upgrading from an older version of the JDK. If the crypto.policy Security Property is not set, and the US_export_policy.jar and local_policy.jar files don't exist in the <java_home>/lib/security directory, then the JDK uses unlimited cryptographic strength, which is equivalent to cryto.policy=unlimited.
所以,综上所述