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

4.3. Cryptographic Coding (Part 3)

This document discusses digital signatures and how they work using RSA encryption. It explains that digital signatures can authenticate messages, ensure data integrity, and provide non-repudiation. The key steps are: 1) The sender generates a public/private key pair and keeps the private key secret. 2) To sign a message, the sender hashes the message and encrypts the hash with their private key. 3) The receiver decrypts the signature with the sender's public key and verifies that the hash matches a newly computed hash of the message.

Uploaded by

Reach
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

4.3. Cryptographic Coding (Part 3)

This document discusses digital signatures and how they work using RSA encryption. It explains that digital signatures can authenticate messages, ensure data integrity, and provide non-repudiation. The key steps are: 1) The sender generates a public/private key pair and keeps the private key secret. 2) To sign a message, the sender hashes the message and encrypts the hash with their private key. 3) The receiver decrypts the signature with the sender's public key and verifies that the hash matches a newly computed hash of the message.

Uploaded by

Reach
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

បណ្ឌិត្យសភាបច្ចេកវទ្យាឌ

ិ ជី ថ
ី លកម្ពុជា
Cambodia Academy of Digital and Technology

IV. Cryptographic Coding (Part 3)

Lecturer: Cheat Morokot


4- Digital Signatures
• What is digital signature?
• A digital signature is a mathematical scheme for verifying
the authenticity of digital messages or documents.
• It solves a different problem from encryption schemes,
analogous to the purpose of a pen-and-ink signature on a
physical document.
• The tools used to construct digital signatures are very
similar to the tools used to construct asymmetric ciphers.

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

• The model of digital signature scheme is depicted in the


following illustration:

4
4.1- Model of Digital Signature

• The important of digital signature:


 Message authentication − When the verifier validates the
digital signature using public key, he is assured that
signature has been created only by sender who possess
the corresponding secret private key and no one else.
 Data Integrity − In case an attacker has access to the
data and modifies it, the digital signature verification at
receiver end fails. The hash of modified data and the
output provided by the verification algorithm will not match.

5
4.1- Model of Digital Signature

 Non-repudiation − the signer can only create unique


signature on a given data. Thus the receiver can present
data and the digital signature to a third party as evidence if
any dispute arises in the future.
 Confidentiality – the public key within the Digital Certificate
is used to encrypt data to ensure that only the intended
recipient can decrypt and read it.

6
4.2- Encryption with Digital Signature

• In many digital communications, it is desirable to


exchange an encrypted messages than plaintext to
achieve confidentiality.
• This can archived by combining digital signatures with
encryption scheme. There are two possibilities, sign-
then-encrypt and encrypt-then-sign.
• The process of encrypt-then-sign is more reliable and
widely adopted.

7
4.2- Encryption with Digital Signature

• The process of encrypt-then-sign is shown in the following


illustration:

8
4.2- Encryption with Digital Signature

• The receiver after receiving the encrypted data and


signature on it:
1. first verifies the signature using sender’s public key.
2. After ensuring the validity of the signature, he/she then
retrieves the data through decryption using his/her
private key.

9
4.3- RSA Digital Signature

• The setup is the same as for RSA encryption

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

• Samantha publishes the document and signature D = 1070777


and S = 153337.

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

You might also like