Cryptography

How is Digital Signature used with a Document?

A digital signature scheme is primarily a mechanism of making sure the digital documents (such as email, contract documents etc) are not forged in between (integrity) when exchanged between two entities. In addition, it solves the problem of non-repudiation (when a person disagrees that he/she did not sign the document).

A digital signature is nothing but a sequence of numbers which get generated with a document and later used to verify whether the document is signed with the appropriate private key.

Creating a document with a digital signature comprises of the following:

  • Creation of private-public key pair using key generation algorithm. The public key, as per the name, could be shared with the world. The private key remains private to the user.
  • A document signing function which generates the digital signature. The function takes the document and private key as input parameters and generates signature as output.
  • A signature verifying function which ensures that document is signed with an appropriate private key by passing the input parameters as document, signature and public key.

How is Digital Signature created?

The following are the steps for creating a digital signature of a document:

  • A key-generation algorithm is used to create a private-public key pair.
  • The document along with the private key is passed to a mathematical function (signing algorithm). The mathematical function generates a sequence of numbers/characters which represents the digital signature of the document.
  • Alternatively, instead of using the plain document with a private key, the digest of the document along with private key is used to generate the digital signature. The document is passed through a cryptographic hash function which generates the fixed-length digest.

The following diagram depicts the above-mentioned process:

Figure 1. how is digital signature generated

How does the Document with Digital Signature is verified?

The following are the steps for signing the document with digital signature:

  • The document along with digital signature is sent to the other person. In the diagram below, Alice creates a digital signature of the document and sends the document along with the digital signature to Bob. She also shares her public key to the Bob.
  • The other person, Bob in the diagram given below, passes the following to another mathematical function (signature verification algorithm) which returns the response related to whether the document is signed with the same public-private key pair.
    • Document
    • Digital signature
    • Public key

Figure 2. How is digital signature used

References

Summary

In this post, you learned about digital signature scheme including how digital signature is created and used.

Did you find this article useful? Do you have any questions or suggestions about this article? Leave a comment and ask your questions and I shall do my best to address your queries.

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

Share
Published by
Ajitesh Kumar

Recent Posts

Agentic Reasoning Design Patterns in AI: Examples

In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…

2 months ago

LLMs for Adaptive Learning & Personalized Education

Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…

3 months ago

Sparse Mixture of Experts (MoE) Models: Examples

With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…

3 months ago

Anxiety Disorder Detection & Machine Learning Techniques

Anxiety is a common mental health condition that affects millions of people around the world.…

3 months ago

Confounder Features & Machine Learning Models: Examples

In machine learning, confounder features or variables can significantly affect the accuracy and validity of…

3 months ago

Credit Card Fraud Detection & Machine Learning

Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…

3 months ago