CNS M5 Rsa DS

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

BCSE309L – Cryptography and Network

Security
RSA based digital signature
RSA
RSA digital signature
algorithm is based on RSA Asymmetric Algorithm
the RSA Asymmetric
Algorithm

Key Generation

Encryption

Decryption
RSA Digital Signature

1. Key Generation

Private key: d, p and q must also remain secret

2. Signature Generation

3. Signature Verification

4
RSA Digital Signature
1. Key Generation

Same procedure as RSA algorithm

Private key: d, p and q must also remain secret

5
RSA Digital Signature
2. Signature Generation
• Use Private key for Signing message M
• M must verify 0 < M < n
• Use private key (d)
Compute S = Md mod n

6
RSA Digital Signature
3. Signature Verification
• Use Public key for verifying the Signature
• Use public key (e,n)
Compute Se mod n = (Md mod n)e mod n = M

Note: in practice, a hash of the message is signed and not the message itself.

7
RSA Digital Signature

1. Key Generation

Private key: d, p and q must also remain secret

2. Signature Generation

3. Signature Verification

8
RSA Digital Signature
Example:

Given a prime number p=7 and q=13. Let User A chooses a


e=5 to generate the private key, Using RSA Digital
Signature algorithm,
Generate the public key of User A.
Generate a digital signature for the plain text H(M)=35.
Verify the digital signature of User A.
9
RSA Digital Signature

1. Key Generation

Private key: d, p and q must also remain secret

2. Signature Generation

3. Signature Verification

10
Example

1. Key Generation

Private key: d, p and q must also remain secret

11
2. Signature Generation

M= 35 0<35<91
Signature S = Md mod n
= 3529 mod 91
S = 42

12
2. Signature Verification

Se mod n = (Md mod n)e mod n = M


425 mod 91 = (3529 mod 91)5 mod 91
35 = (42 mod 91)5 mod 91
35 = 425 mod 91
35 = 35 = M

13
RSA Digital Signature
Example:

Given a prime number p=19 and q=2 Let User A chooses a


private key e=7. Using RSA Digital Signature algorithm,
• Generate the public key of User A.
• Generate a digital signature for the plain text H(M)=17.
• Verify the digital signature of User A.

14

You might also like