chap9-公钥密码.ppt

  1. 1、本文档共55页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* The RSA algorithm is vulnerable to a chosen ciphertext attack (CCA). CCA is defined as an attack in which adversary chooses a number of ciphertexts and is then given the corresponding plaintexts, decrypted with the target’s private key. The adversary exploits properties of RSA and selects blocks of data that, when processed using the target’s private key, yield information needed for cryptanalysis. Can counter simple attacks with random pad of plaintext. More sophisticated variants need to modify the plaintext using a procedure known as optimal asymmetric encryption padding (OAEP). RSA算法的实现 实现的步骤如下:Bob为实现者 (1) Bob寻找出两个大素数p和q (2) Bob计算出n=pq 和φ(n)=(p-1)(q-1) (3) Bob选择一个随机数e (0e φ(n)),满足(e,φ(n))=1 (4) Bob使用辗转相除法计算d=e-1(modφ(n)),即ed?1(mod(p-1)(q-1)) (5) Bob在目录中(e,n)作为公钥. (6)(d,n)或者d作为私钥. 密码分析者攻击RSA体制的关键点在于如何分解n。若分 解成功使n=pq,则可以算出φ(n)=(p-1)(q-1),然后由公 开的e,解出秘密的d RSA算法编制 参数T={N}; 私钥SK=D; 公钥PK=E; 设:明文M,密文C,那么: 用公钥作业:ME mod N = C 用私钥作业:CD mod N = M RSA Example Select primes: p=17 q=11 Compute n = pq =17×11=187 Compute ?(n)=(p–1)(q-1)=16×10=160 Select e : gcd(e,160)=1; choose e=7 Determine d: de=1 mod 160 and d 160 Value is d=23 since 23×7=161= 1×160+1 Publish public key KU={7,187} Keep secret private key KR={23} RSA Example cont sample RSA encryption/decryption is: given message M = 88 (nb. 88187) encryption: C = 887 mod 187 = 11 decryption: M = 1123 mod 187 = 88 加密计算C=887 mod 187 887 mod 187 =[(884mod187)x882mod187)x881mod187)]mod187 881mod187=88 882mod187=7744mod187=77 884mod187=77*77mod187=5929mod187=132 887mod187=(88x77x132)mod187=894432mod187=11 加密算法: 假设 M 是明文(Mn),那么密文就是 C = Memod n。 解密算法: 假设 C 是密文,那么明文就是 M = Cd mod n。 证明: (1)由于 Cd = Me*d = Mk*Φ(n)+1 (mod n)= Mk*Φ(n)+1 。 如果 M 和 n 是互素的,显然直接由欧拉定理我们就能得到: Cd = Mk*Φ(n)*M1 = M (mod n) = M。 ed?1(mod(p-1)(q-1)) 2)如果 M 和 n 不互素,由于 n 是两个素数 p 和 q 的乘积且 Mn,e*d = 1(mod Φ(n)) = 1(mod (p-1)(q-1)) ,可以得到: Me*d = Mk*(p-1)*(q-1)+1 = Mk*Φ(n)+k-(k-1) =

文档评论(0)

js1180 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档