Digital Signature Algorithm in Network Security

 

Digital Signature Algorithm 

A digital signature is a cryptographic technique used to verify the authenticity and integrity of a digital message, file, or document.

It confirms that:

  • The message was created by the claimed sender.
  • The message has not been modified after signing.
  • The sender cannot easily deny having signed the message.

Three Main Purposes

  1. Authentication
    Proves that the message came from the claimed sender.
  2. Message Integrity
    Confirms that the original data has not been changed.
  3. Non-repudiation
    Provides evidence that the sender signed and sent the message.

 

How DSA Works?

DSA follows three main phases:

  1. Key Generation
  2. Signature Generation
  3. Signature Verification

 

1. Key Generation

DSA uses two keys:

Private Key
The private key is used to create the digital signature.
The sender signs the message using the private key.

            x (0<x<q)

Public Key

The public key is used to verify the digital signature.
The receiver verifies the signature using the sender's public key.
           y=g x  mod  p


Parameters Used

  • p → Large prime number
  • q → Small prime number, where  q is a prime divisor of p-1
  • g → Generator

      g =h(p-1)/q mod p

where h is an integer value.

[***mod p=Large exponent values control***]

[***mod q=Fixed and small size signature***]

 


2. Signing – Signature Generation

Digital Signature Algorithm-Signing Signature verification
Let the message be M.

Step 1: Hash the Message
The message is passed through a hash function.
            H=Hash(M)
The hash function converts the message into a fixed-length hash value.

 

Step 2: Choose Random Number
Choose a random number k.
                 0<k<q
This is a secret number used only for generating that particular signature.

 

Step 3: Generate Signature
The signature consists of two values:(r, s)

            r= (g k  mod p) mod q 
             s=k-1(H+ xr) mod q

The sender sends: (M, r, s)

 


3. Signature Verification

Digital Signature Algorithm-Signature Verification


The receiver receives M, r, s and uses the sender's public key y to verify the signature.

Step 4: Hash the Message Again

                 H=Hash(M)

Step 5: Calculate Inverse of s

               w=s-1 mod q

Step 6: Calculate  u1 and  u2
Split the checking into two parts

          u1=H.w mod q 
          u2=r.w mod q 

Step 7: Calculate V

V=(g u1.yu2  mod p) mod q


Step 8: Final Check
Compare V with r.
                 V=r

  • If V = r → Valid Signature
  • If V ≠ r → Invalid Signature

Top of Form

Bottom of Form

 

Handwritten Notes-Download PDF
Video Explanation-Watch on YouTube

Comments

Popular posts from this blog

B+ Tree in DBMS | B+ Tree in Data Structure

Hashing in Data Structure | Collision Resolution Techniques | Hashing in DBMS

Normalization in DBMS,(1NF,2NF,3NF,BCNF,4NF,5NF)