Java 加密算法

1. Glossary

DES: Data Encryption Standard
DSA: Data signal algorithm

2. Message Digest

The algorithm names in this section can be specified when generating an instance of Messagedigest.

MD2: The MD2 message digest algorithm as defined in RFC 1319.

MD5: The MD5 message digest algorithm as defined in RFC 1321.

SHA-1: The Secure Hash Algorithm, as defined in Secure Hash Standard, NIST FIPS 180-1.

Algorithm The length of Digest

MD2, MD5 16bytes

SHA-1 20bytes

SHA-256 32bytes

SHA-384 48bytes

SHA-512 64bytes

3 对称算法

主要算法包括:DES,DESede,Blowfish

4.Diffie-Hellman密钥一致协议

公开密钥密码体制的奠基人DiffieHellman所提出的 "指数密钥一致协议"(Exponential Key Agreement Protocol),该协议不要求别的安全性先决条件,允许两名用户在公开媒体上交换信息以生成"一致",可以共享的密钥。在JCE的中实现用户alice生成DH类型的密钥对,如果长度用1024生成的时间请,推荐第一次生成后保存DHParameterSpec,以便下次使用直接初始化.使其速度加快.

5.非对称算法和公钥体系

主要算法包括:RSA,DSA

RSA 可用于加密和生成签名,而 DSA 只能用于生成签名

DSA 不使用私钥加密消息摘要,也不使用公钥解密消息摘要。相反,DSA 使用特殊的数学函数生成数字签名,该签名由两个 160 位数字组成,这两个数字是从消息摘要和私钥中派生出来的。

使用非对称密钥算法进行加密速度非常慢,尤其是当数据比较大时;因此它们不能用于大批量加密。大批量加密应该使用对称算法。非对称算法可以用来进行密钥交换。

DSA 也使用公钥来验证签名,但验证过程比 RSA 更复杂。

6.数字签名

MD2withRSA: The MD2 with RSA Encryption signature algorithm which uses the MD2 digest algorithm and RSA to create and verify RSA digital signatures as defined in PKCS #1.

MD5withRSA: The MD5 with RSA Encryption signature algorithm which uses the MD5 digest algorithm and RSA to create and verify RSA digital signatures as defined in PKCS #1.

SHA1withDSA: The DSA with SHA-1 signature algorithm which uses the SHA-1 digest algorithm and DSA to create and verify DSA digital signatures as defined in FIPS PUB 186.

SHA1withRSA: The signature algorithm with SHA-1 and the RSA encryption algorithm as defined in the OSI Interoperability Workshop, using the padding conventions described in PKCS #1.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值