4.3. Cryptographic Coding (Part 3)
4.3. Cryptographic Coding (Part 3)
ិ ជី ថ
ី លកម្ពុជា
Cambodia Academy of Digital and Technology
2
4- Digital Signature
• Manually signing a document and transferring it to different
locations is time-consuming. By digitally signing documents,
the business transaction will be completed on time.
• It consists of 3 algorithms:
Key generation
Signing
Signing verifying
3
4.1- Model of Digital Signature
4
4.1- Model of Digital Signature
5
4.1- Model of Digital Signature
6
4.2- Encryption with Digital Signature
7
4.2- Encryption with Digital Signature
8
4.2- Encryption with Digital Signature
9
4.3- RSA Digital Signature
10
4.3- RSA Digital Signature
Example:
RSA Signature Key Creation
• Samantha chooses two secret primes p = 1223 and q = 1987
and computes her public modulus
N = p · q = 1223 · 1987 = 2430101.
• Samantha chooses a public verification exponent v = 948047
with the property that
gcd(v, (p − 1)(q − 1)) = gcd(948047, 2426892) = 1.
11
4.3- RSA Digital Signature
RSA Signing
• Samantha computes her private signing key s using the secret
values of p and q to compute (p−1)(q −1) = 1222 · 1986 = 2426892
and then solving the congruence
vs ≡ 1 mod(p − 1)(q − 1);
948047 · s ≡ 1 (mod 2426892)
She finds that s = 1051235.
• Samantha selects a digital document to sign,
D = 1070777 with 1 ≤ D < N.
She computes the digital signature
S ≡ Ds (mod N), S≡ 10707771051235 ≡ 153337 (mod 2430101).12
4.3- RSA Digital Signature
RSA Verification
• Victor uses Samantha’s public modulus N and verification
exponent v to compute
Sv mod N, 153337948047 ≡ 1070777 (mod 2430101).
He verifies that the value of Sv modulo N is the same as the value of
the digital document D = 1070777.
13
Thank You
14