[转] DSA 和 RSA 的区别
程序员文章站
2022-07-04 14:38:00
...
1. RSA算法好在网络容易实现密钥管理,便进行数字签名,算法复杂,加/解速度慢,采用非对称加密。
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 用于签名,而 RSA 可用于签名和加密。
b. DSA is faster in *signing*, but slower in *verifying*.
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.
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 用于签名,而 RSA 可用于签名和加密。
b. DSA is faster in *signing*, but slower in *verifying*.
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.
上一篇: 吵架分手拉黑又复合几率大吗
下一篇: 如何辨别并脱离劈腿的困境?
推荐阅读
-
惠普hp8470p和HP8470W哪款好?8470p与8470w的区别介绍
-
Node.js 中exports 和 module.exports 的区别
-
javascript构造函数和原型(js构造函数和普通函数的区别)
-
JavaScript中的toString()和toLocaleString()方法的区别
-
虚拟化和云计算的区别分析
-
PHP中4个加速、缓存扩展的区别和选用建议
-
setInterval和setTimeout的区别以及setInterval越来越快问题的解决方法
-
PHP的压缩函数实现:gzencode、gzdeflate和gzcompress的区别
-
详谈C++引用&和指针在作为形参时的区别
-
对python中 math模块下 atan 和 atan2的区别详解