[转] DSA 和 RSA 的区别

1. RSA算法好在网络容易实现密钥管理,便进行数字签名,算法复杂,加/解速度慢,采用[color=violet]非对称加密[/color]。

1978年就出现了这种算法,它是第一个既能用于数据加密也能用于数字签名的算法。它易于理解和操作,也很流行。算法的名字以发明者的名字命名:Ron Rivest, AdiShamir 和Leonard Adleman。但RSA的安全性一直未能得到理论上的证明。 RSA的安全性依赖于大数分解。公钥和私钥都是两个大素数( 大于 100个十进制位)的函数。据猜测,从一个密钥和密文推断出明文的难度等同于分解两个大素数的积。 密钥对的产生。选择两个大素数,p 和q 。计算: n = p * q 然后随机选择加密密钥e,要求 e 和 ( p - 1 ) * ( q - 1 ) 互质。最后,利用Euclid 算法计算解密密钥d, 满足 e * d = 1 ( mod ( p - 1 ) * ( q - 1 ) ) 其中n和d也要互质。数e和n是公钥,d是私钥。两个素数p和q不再需要,应该丢弃,不要让任何人知道。 加密信息 m(二进制表示)时,首先把m分成等长数据块 m1 ,m2,..., mi ,块长s,其中 2^

2. DSA = Digital Signature Algorithm. based on discrete logarithms computation.

3.
a. DSA 用于[color=violet]签名[/color],而 RSA 可用于[color=violet]签名[/color]和[color=violet]加密[/color]。

b. DSA is faster in *[color=blue]signing[/color]*, but slower in *[color=blue]verifying[/color]*.
c. A DSA key of the same strength as RSA (1024 bits) generates a smaller signature.
d. An RSA 512 bit key has been cracked, but only a 280 DSA key.
e. It doesn’t matter because with Ssh only authentication is done using RSA or DSA algorithm, and then the “rest” is encoded using a (uh, was it block?) cipher like IDEA, DES, Blowfish, etc, etc after the authentication is done.
While SSH2 can use either DSA or RSA keys, SSH1 cannot. Ssh2 will also not use patented cypers like IDEA.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值