
Introduction
A digital signature is a mathematical technique for validating the integrity and authenticity of a message, software, or digital document.
The core concept of a digital signature is to sign a document electronically. We can sign a document when we send it electronically. A document can be signed in two ways: a whole document or a digest.
Following are the various algorithms that can be used while creating a digital signature:
-
Key Generation Algorithms:
A key pair (private and public key) is generated by employing a public key algorithm. This algorithm, in general, provides a private key along with its corresponding public key. (Also see, Difference between Public Key and Private Key)
-
Signing Algorithms: Signing algorithms, such as email programs, generate a one-way hash of the electronic data to be signed to create a digital signature. The signing algorithm then encrypts the hash value using the private key(signature key). The digital signature consists of this encrypted hash and other information such as the hashing algorithm. This digital signature is then appended with the data and sent to the verifier.
Because a hash function turns an arbitrary input into a much shorter fixed-length value, it's better to encrypt the hash rather than the entire message or document. This saves time since a shorter hash value must now be signed instead of a meaningful message, and hashing is significantly faster than signing.
- Signature verification algorithms: The data is sent to the verifier with a digital signature. The public key (verification key) and the digital signature are processed using the Verification algorithm, which generates some value. The received data is also hashed using the same hash function. The output of the verification algorithm and the hash value are then compared. The digital signature is valid if they are both equal. Else, it is invalid.

Source: Wikipedia
Recommended Topic, Basic Networking Commands
Benefits of Digital Signature
- Integrity: Digital signature ensures that the message was not tampered with during the transmission.
- Authentication: Digital signature ensures the authenticity of the sender.
- Non-Repudiation: Non-repudiation is another benefit of digital signatures. If the sender denies transmitting the message, her private key corresponding to her public key is tested on the plaintext. If the decrypted message is matching the original message, we know the sender transmitted the message.
Steps Followed While Creating Digital Signature
A hash function computes a message digest, which is a fixed size numeric representation of the contents of a message. A digital signature can be created by encrypting a message digest.
- To create a digital signature, the message digest is computed by applying a hash function to the message, and then the message digest is encrypted using the sender's private key.
- Digital signature is then appended with the message and transmitted.
- The receiver decrypted the digital signature using the sender's public key. Because only the sender possesses his private key, only the sender can encrypt using his private key, that can later be decrypted by the sender's public key, ensuring authenticity.
- Now, the receiver has the message digest.
- The message digest can be computed by the receiver from the message (the actual message is sent with the digital signature).
- For integrity, the message digest computed by the receiver and the message digest (obtained by decrypting a digital signature) must be the same.
You can also read about the Layered Architecture in Computer Network.
Digital Certificate
A trustworthy third party issues a digital certificate that validates the sender's identity to the receiver and the receiver's identity to the sender.
A digital certificate is issued by a Certificate Authority to validate the certificate holder's identity, known as a digital certificate. The CA creates an encrypted digital certificate that includes the applicant's public key and other identifying information. A digital certificate is used to link a public key to a particular person or entity.
Thing digital certificate contains
- Certificate holder’s name.
- Unique identifying serial number.
- Date of expiration.
- Public key of the certificate holder.
-
Certificate issuing authority’s digital signature.
Must Read Subnetting in Computer Networks
You can read related articles such as Congestion Control in Computer Networks here.