Bouncy Castle 是一种用于 Java 平台的开放源码的轻量级密码术包。它支持大量的密码术算法,并提供 JCE 1.2.1 的实现。因为 Bouncy Castle 被设计成轻量级的,所以从 J2SE 1.4 到 J2ME(包括 MIDP)平台,它都可以运行。它是在 MIDP 上运行的唯一完整的密码术包。
Bouncy Castle的Java JCE安装方法
1、去官方站点下载Bouncy Castle的JCE Provider包 bcprov-ext-jdk15-145.jar
2、把jar文件复制到 $JAVA_HOME$\jre\lib\ext 目录下面
3、修改配置文件\jre\lib\security\java.security
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.5=sun.security.jgss.SunProvider
security.provider.6=com.sun.security.sasl.Provider
#前面是java环境已经提供的,尾部加上这一行即可
security.provider.7=org.bouncycastle.jce.provider.BouncyCastleProvider
4、可以写个小程序查看本地java系统中安装的所有的JCE提供者,和一些相应算法。
可参考:http://free0007.iteye.com/blog/1985565
-------列出加密服务提供者-----
Provider:SUN - version:1.6
SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
Provider:SunRsaSign - version:1.5
Sun RSA signature provider
Provider:SunJSSE - version:1.6
Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
Provider:SunJCE - version:1.6
SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
Provider:SunJGSS - version:1.0
Sun (Kerberos v5, SPNEGO)
Provider:SunSASL - version:1.5
Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
Provider:XMLDSig - version:1.0
XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory)
Provider:SunPCSC - version:1.6
Sun PC/SC provider
Provider:SunMSCAPI - version:1.6
Sun's Microsoft Crypto API provider
Provider:BC - version:1.5
BouncyCastle Security Provider v1.50
-------列出系统支持的消息摘要算法:
SKEIN-256-160
SKEIN-512-160
SHA3-256
RIPEMD320
SHA-384
SKEIN-1024-512
SKEIN-512-512
RIPEMD128
SHA
SHA3-512
SKEIN-256-256
SKEIN-256-128
SKEIN-512-256
WHIRLPOOL
SHA-224
RIPEMD160
SHA3-384
SHA-512/256
SM3
RIPEMD256
SKEIN-1024-1024
GOST3411
MD5
SHA3-224
TIGER
SKEIN-512-224
MD4
MD2
SHA-256
SHA-512
SKEIN-1024-384
SKEIN-512-384
SHA-512/224
SKEIN-256-224
SKEIN-512-128
SHA-1
-------列出系统支持的生成公钥和私钥对的算法:
DSTU4145
GOST3410
ECGOST3410
EC
DSA
ECDSA
RSA
ELGAMAL
ECIES
ECMQV
DIFFIEHELLMAN
ECDH
ECDHC
DH
附件中是JDK1.5-JDK1.7中需要的Jar包
- bcprov-ext-jdk15on-150.jar (2.7 MB)
- 下载次数: 355
- bcprov-jdk15on-150.jar (2.6 MB)
- 下载次数: 218
- bcpkix-jdk15on-150.jar (584.6 KB)
- 下载次数: 135
- bcpg-jdk15on-150.jar (254.3 KB)
- 下载次数: 140
- bcmail-jdk15on-150.jar (90.1 KB)
- 下载次数: 126