0% found this document useful (0 votes)
7 views

Rsa

The document discusses asymmetric key cryptographic techniques, focusing on public-key encryption and the RSA algorithm. It outlines misconceptions about public-key encryption, principles of public-key cryptosystems, and provides detailed steps for RSA key generation, encryption, and decryption. Additionally, it highlights potential cryptanalysis attacks against RSA, such as factorization and timing attacks.

Uploaded by

Hey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Rsa

The document discusses asymmetric key cryptographic techniques, focusing on public-key encryption and the RSA algorithm. It outlines misconceptions about public-key encryption, principles of public-key cryptosystems, and provides detailed steps for RSA key generation, encryption, and decryption. Additionally, it highlights potential cryptanalysis attacks against RSA, such as factorization and timing attacks.

Uploaded by

Hey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Module 3

Asymmetric key cryptographic


techniques: principles, RSA
Table 9.1
Terminology Related to Asymmetric Encryption

Source: Glossary of Key Information Security Terms, NIST IR 7298 [KISS06]


Misconceptions Concerning
Public-Key Encryption

• Public-key encryption is more secure from cryptanalysis than


symmetric encryption
• Public-key encryption is a general-purpose technique that has
made symmetric encryption obsolete
• There is a feeling that key distribution is trivial when using
public-key encryption, compared to the cumbersome
handshaking involved with key distribution centers for
symmetric encryption
Principles of Public-Key Cryptosystems
• The concept of public-key cryptography evolved from an
attempt to attack two of the most difficult problems associated
with symmetric encryption:

• Whitfield Diffie and Martin Hellman from Stanford University


achieved a breakthrough in 1976 by coming up with a method
that addressed both problems and was radically different from
all previous approaches to cryptography
Public-Key Cryptosystems

• A public-key encryption scheme has six ingredients:


Table 9.2
Conventional and Public-Key
Encryption
Applications for Public-Key
Cryptosystems
• Public-key cryptosystems can be classified into
three categories:

• Some algorithms are suitable for all three


applications, whereas others can be used only for
one or two
Public-Key Cryptosystems –
Introduction_Encryption

• Encryption (Confidentiality) → Uses the receiver's public key


Ensures only the intended receiver can read the message.
Public-Key Cryptosystems – Introduction_Digital
Signatures

• Digital Signatures (Authentication & Integrity) → Uses the sender's


private key
• Ensures the message is authentic and has not been tampered with.
Public-Key Cryptosystems

Purpose Key used for Key used for Ensures


encryption decryption

Encryption Receiver’s public Receiver’s private Confidentiality


key key
Digital Signature Sender’s private Sender’s public Authentication and
key key Integrity
RSA Algorithm
• One of the first successful responses to the challenge was developed in
1977 by Ron Rivest, Adi Shamir, and Len Adleman at MIT and first
published in 1978
• The Rivest-Shamir-Adleman (RSA) scheme – most widely accepted and
implemented general-purpose approach to public-key encryption.
• It enables secure data transmission.
RSA Algorithm
Key Features:
•Asymmetric Encryption: Uses two keys—public key (for encryption) and private key
(for decryption).
•Security Based on Factoring: The strength of RSA lies in the difficulty of factoring
large prime numbers.
•Used for Encryption & Digital Signatures: Commonly used in secure
communications, digital signatures, and authentication protocols.
•Mathematical Foundation:
 Key Generation:
 Selects two large prime numbers (p and q),
 computes n = p × q, and
 selects a public exponent e.
 Encryption: Ciphertext (C) is computed as C = M^e mod n (where M is the
plaintext).
 Decryption: Plaintext (M) is retrieved using M = C^d mod n (where d is the private
key exponent).
Steps of RSA
1. p, q are prime numbers
2. Calculate n = p * q
3. Calculate ø(n) = (p - 1) * (q - 1).
• The preceding relationship holds if e (public key) and d (private key) are
multiplicative inverses modulo to ø(n), where ø(n) is the Euler totient
function
4. Select e such that e is relatively prime to ø(n) and less than ø(n);
GCD (ø(n), e) = 1
5. Find d (private key) such that de ≡ 1 mod ø(n) and d < ø(n)
• The relationship between e and d can be expressed as
• ed mod ø(n) =1
• ed ≡ 1 mod ø(n)
• d ≡ e-1 mod ø(n)
Steps of RSA

6. To encrypt, find ciphertext C = Me mod n


 Public key encryption algorithm with a public key
of PU = {e, n}
7. To decrypt, find plaintext M = Cd mod n
 private key of PR = {d, n}.
Example 1
Inputs are p = 17, q = 11 and M = 88

1. Two prime numbers such as p = 17, q=11


2. Calculate n=p*q
n = 17 * 11
n = 187
3. Calculate ø(n) = (p - 1) * (q - 1)
= (17 – 1) * (11 – 1)
= 16 * 10
ø(n) = 160
4. Select e such that e is relatively prime to ø(n) = 160 and less than
ø(n); we choose e = 7.
GCD (ø(n), e) = 1
GCD (160, 7) = 1 ------ Possible values are, 3, 7, 11,…..
Alternate Method _ Finding d value using EEA

q a b r t1 t2 t
22 160 7 6 0 1 -22

1 7 6 1 1 -22 23
6 6 1 0
Cont…
5. To do encryption
C = Me mod n PU = (e, n) = (7, 187) M = 88
C = 887 mod 187,
887 mod 187 = [(884 mod 187) * (882 mod 187)
* (881 mod 187)] mod 187
881 mod 187 = 88
882 mod 187 = 7744 mod 187 = 77
884 mod 187 = (882)2 mod 187
= 772 mod 187 = 5929 mod 187 = 132
887 mod 187 = (132 * 77 * 88) mod 187
= 894,432 mod 187
C = 11
Cont…
6. To do Decryption
M = Cd mod n PR = (d, n) = (23, 187) C = 11
M = 1123 mod 187
1123 mod 187 = [(111 mod 187) * (112 mod 187) *
(114 mod 187) * (118 mod 187) * (118 mod 187)] mod 187
111 mod 187 = 11
112 mod 187 = 121
114 mod 187 = 1212 = 14,641 mod 187 = 55
118 mod 187 = 552 = 3025 mod 187 = 33
1123 mod 187 = (11 * 121 * 55 * 33 * 33) mod 187
M = 79,720,245 mod 187
M = 88
Example 2
Inputs are p = 3, q = 5, e (public key) = 3 and m=2

1. Two prime numbers such as p = 3, q=5


2. Let n= p * q
n=3*5
n = 15
3. Let ø(n) = (p-1)*(q-1).
= (3 – 1) * (5 – 1)
ø(n) = 8
Cont…
4. Find d (private key) such that de =1 mod ø(n)
d ≡ e-1 mod ø(n)
d ≡ 3-1 mod 8
3 x d mod 8 = 1
3 x 3 mod 8 = 1
9 mod 8 = 1
d=3
Cont…
5. To do encryption
C = Me mod n
C = 23 mod 15, C = 8 mod 15, C = 8
6. To do Decryption
m = Cd mod n
m = 83 mod 15, m = 512 mod 15, m = 2
Example 3

• Inputs are p = 3, q =11, e (public key) = 7 and


m=4
Cryptanalysis Against RSA

• 🔹 Factorization Attack: Finds p and q from n=p×q to break RSA.


🔹 Timing Attack: Measures decryption time to infer private key bits.
🔹 Padding Oracle Attack: Exploits errors in padding schemes like
PKCS#1 v1.5.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy