Electronic Payment Systems20-763Lecture 5- ePayment .ppt
《Electronic Payment Systems20-763Lecture 5- ePayment .ppt》由会员分享,可在线阅读,更多相关《Electronic Payment Systems20-763Lecture 5- ePayment .ppt(37页珍藏版)》请在麦多课文档分享上搜索。
1、ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,Electronic Payment Systems 20-763 Lecture 5: ePayment Security II,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,Outline,Public-key Cryptography One-way trapdoor functions RSA Protocol Fail
2、ure Discrete Logarithms Diffie-Hellman El Gamal Elliptic Curve Cryptosystems,Public Key Encryption,Encryption,“The quick brown fox jumps over the lazy dog”,“Py75c%bn&*)9|fDebDFaq#xzjFrg5=&nmdFg$5knvMdrkvegMs”,“The quick brown fox jumps over the lazy dog”,Decryption,Clear-text Input,Clear-text Output
3、,Cipher-text,Different but mathematically linked keys,Recipients public key,Recipients private key,public,SOURCE: ALBERTO PACE,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,One-Way Trapdoor Function,A function that is easy to compute Computationally difficult to inve
4、rt without knowing the secret (the “trapdoor”) Easy to invert with the secret Example: f x (y) = x y Given f x (y), it is difficult to find either x or y Given f x (y) and x (the secret), it is easy to find y: y = x y / x ANY one-way trapdoor function can be used in public-key cryptography.,ELECTRON
5、IC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,Trapdoor Functions for Cryptogrpahy,Alice wants to send message m to Bob Bobs public key e is a parameter to the trapdoor function fe(x) The inverse fe -1(y) is easy to compute knowing Bobs private key d but difficult without d A
6、lice computes fe(m), sends it to Bob Bob computes fe -1(fe(m) = m (easy if d is known) Eavesdropper Eve cant compute m = fe -1(fe(m) without the trapdoor d to find the inverse fe -1 Symmetric encryption satisfies the trapdoor criteria except that e and d are the same, so neither can be made public,E
7、LECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,Rivest-Shamir-Adelman (RSA),It is easy to multiply two numbers but apparently hard to factor a number into a product of two others. Given p, q, it is easy to compute n = p q Example: p = 5453089; q = 3918067Easy to find n
8、= 21365568058963 Given n, hard to find two numbers p, q with p q = n Now suppose n = 7859112349338149 What are p and q such that p q = n ? Multiplication is a one-way function RSA exploits this fact in public-key encryption,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAM
9、OS,RSA Encryption,Select two large prime numbers p, q (e.g. 1024 bits) Let n = p q Choose a small odd integer e that does not divide m = (p - 1)(q - 1). Then x(p-1)(q-1) = 1 (mod n) Compute d = e-1(mod m) That is, d e gives remainder 1 when divided by m Then xe d = x (mod n) (by Fermats “Little” The
10、orem) Public key is the pair (e, n) Private key is the pair (d, n) d cannot be calculated quickly from (e, n) Still need p and q, which involves factoring n,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,RSA Encryption,Message M is a numberTo encrypt message M using k
11、ey (e, n): Compute E(M) = M e (mod n)To decrypt message E(M) using key (d, n): Compute D(E(M) = E(M) d (mod n) Note that D(E(M) = E(D(M) = (M e)d (mod n) = M ed (mod n) = M because e d = 1 (mod m) and m = (p-1)(q-1) DEMO,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,
12、Protocol Failure,A “secure” cryptosystem is not secure if used carelessly Protocols must be followed carefully or a “protocol failure” occurs Example: “common modulus” failure Bob and Carol have the same public-key modulus n with encryption exponents eBOB and eCAROL having no common factor Alice sen
13、ds the same plaintext M to both Bob and Carol Bob gets yBOB = MeBOB mod n Carol gets yCAROL = MeCAROL mod n If Eve intercepts both, she can read the message WARNING: NEVER SEND THE SAME MESSAGE TWICE!,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,Protocol Failure,Eve
14、 computes: c1 = eBOB-1 (mod eCAROL ) c2 = (c1 eBOB) - 1 )/ eCAROL M = yBOBc1 ( yCAROLc2 )-1 (mod n) = (MeBOB)c1 (MeCAROL)c2)-1 (mod n) = (MeBOB)c1 (MeCAROL)(c1(eBOB)-1)/eCAROL)-1 (mod n) = (MeBOB)c1 (M(c1eBOB-1)-1 (mod n) = M (Mc1(eBOB)-1) (M( c1(eBOB)-1)-1 (mod n) = M mod n So Eve recovers the orig
15、inal message!,KNOWN QUANTITIES:neBOBeCAROLyBOByCAROL,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,Discrete Logarithms,If ab = c, we say that logac = b Example: 232 = 4294927296 so log2(4294927296) = 32 Computing ab and logac are both easy for real numbersIn a finite
16、 field, it is easy to calculate c = ab mod p but given c, a and p it is very difficult to find b This is the “discrete logarithm” problem Analogy: Given x it is easy to find two real numbers y, z such that x = yz Given an integer n it is hard to find two integers p, q such that n = pq,ELECTRONIC PAY
17、MENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,Diffie-Hellman Key Exchange,Object: allow Alice and Bob to exchange a secret key Protocol has two public parameters: a prime p and a number g p such that given 0 n p there is some k such that gk = n (g is called a generator) Alice and
18、Bob generate random private values a, b between 1 and p-2 Alices public value is ga (mod p); Bobs is gb (mod p) Alice and Bob share their public values Alice computes (gb)a (mod p) = gba (mod p) Bob computes (ga)b (mod p) = gab = gba (mod p) Let key = gab. Now both Alice and Bob have it. No one else
19、 can compute it - they dont know a or b,ELECTRONIC PAYMENT SYSTEMS 20-763 SPRING 2004 COPYRIGHT 2004 MICHAEL I. SHAMOS,El Gamal Encryption,Based on the discrete logarithm Bobs public key is (p, q, r) Bobs private key is s such that r = qs mod pAlice sends Bob the message m by picking a random secret
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ELECTRONICPAYMENTSYSTEMS20763LECTURE5EPAYMENTPPT

链接地址:http://www.mydoc123.com/p-374402.html