Download presentation
Presentation is loading. Please wait.
Published byVirgil Sullivan Modified over 9 years ago
2
Introduction Requirements for RSA Ingredients for RSA RSA Algorithm RSA Example Problems on RSA
3
Developed by Rivest, Shamir, and Adleman in 1977. Public-key encryption technique : - Public-key/two-key/asymmetric cryptography involves the use of two keys: - a public key, which may be known by anybody, and can be used to encrypt messages, and verify signatures. - a private key, known only to the recipient, used to decrypt messages, and sign (create) signatures. - is asymmetric because those who encrypt messages or verify signatures cannot decrypt messages or create signatures.
4
Block cipher scheme - A block cipher is one in which a block of plaintext is treated as a whole and used to produce a ciphertext block of equal length. - Each block having a binary value less than some number n (0 to n-1). - Typical size of block is 1024 bits or 309 decimal digits. - The block size is i bits, where 2^i < n <= 2^(i+1)
5
Encryption and Decryption are of the following form: Plaintext M Ciphertext C C=M e mod n M=C d mod n = (M e ) d mod n= M ed mod n - Both sender and receiver must know the value of n. - The sender knows the value of e, and only the receiver knows the value of d. - Public key = {e, n} - Private key = {d, n}
6
We need to find a relationship of the form M ed mod n - This relationship holds if e and d are multiplicative inverse modulo ø(n), where ø(n) is the Euler totient function. - Euler totient function ø(n), defined as number of the integers less than n and relatively prime to n. - The relationship between e and d can be expressed as e.d mod ø(n) =1 - d(and therefore e) is relatively prime to ø(n).{by the rules of moduler arithmetic} gcd(ø(n),d)=1
7
For this algorithm to be satisfactory for public key encryption, the following requirements must be met: - It is possible to find values of e, d, n such that M ed mod n = M for all M<n. - It is relatively easy to calculate M e mod n and C d mod n for all values of M<n. - It is infeasible to determine d given e and n.
8
p, q two prime numbers (private, chosen) n=pq (public, calculated) e, with gcd(ø(n),e)=1; 1<e<ø(n) (public, chosen) e.d=1 mod ø(n) (private, calculated)
9
Key Generation Select two large primes at random - p, q Calculate n=p.q Calculate ø(n)=(p-1)(q-1) Selecting at random the encryption key e where 1<e<ø(n), gcd(e,ø(n))=1 Solve following equation to find decryption key d e.d=1 mod ø(n) and 0≤d≤n Publish their Public key: PU={e,n} keep secret Private key: PR={d,n}
10
Encryption Plaintext M, 0≤M<n Ciphertext C=M e mod n Decryption Ciphertext C Plaintext M=C d mod n
11
1. Select primes: p=17 & q=11 2. Compute n = pq =17×11=187 3. Compute ø(n)=(p–1)(q-1)=16×10=160 4. Select e : gcd(e,160)=1; choose e=7 5. Determine d: de=1 mod 160 and d < 160 Value is d=23 since 23×7=161= 1×160+1 6. Publish public key PU={7,187} 7. Keep secret private key PR={23,187}
12
Given message M = 88 Encryption: C = 88 7 mod 187 = 11 Decryption: M = 11 23 mod 187 = 88
13
1. Perform encryption and decryption using RSA algorithm, for the following: ① p = 3; q = 11, e = 7; M = 5(Ans. d=3, C=14) ② p = 5; q = 11, e = 3; M = 9(Ans. d=27, C=14) 2. In a public-key system using RSA, you intercept the ciphertext C = 10 sent to a user whose public key is e = 5, n = 35. What is the plaintext M?(Ans. M=5)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.