Library

5.6.4 Digital Signatures

A digital signature provides a means of verifying the authenticity and integrity of a message or document in an electronic communications system. Whereas encryption ensures confidentiality by transforming data into an unreadable form, a digital signature ensures that the message was created by a specific sender and has not been altered during transmission. The underlying principle is that only the legitimate sender possesses the private key used to generate the signature, while any receiver can verify it using the corresponding public key.

The process of creating a digital signature is illustrated conceptually in Figure 5.14. First, the sender computes a message digest—a fixed-length numerical representation of the message—using a cryptographic hash function such as SHA-256. The sender applies the signature algorithm to the message digest using the private key. The signature is transmitted along with the original message. At the receiver, the message digest is recomputed from the received data and compared with the decrypted signature (obtained by decrypting the received signature with the sender’s public key). If the two digests match, the receiver is assured both that the message was not altered and that it originated from the claimed sender.

Figure 5.14. Digital-signature generation and verification process.

This technique therefore supports two key network-security services defined earlier: authentication (verifying identity) and integrity (detecting modification).

In the RSA digital-signature scheme, the same mathematical structure used for encryption is applied in reverse. The sender computes the signature s as:

s=hdmod(n)
(5.17)

where h is the message digest and d is the sender’s private key.

The receiver verifies by using the public key e:

h'=semod(n)
(5.18)

and confirming that h’=h. Since only the sender’s private key could have generated s, a valid verification implies authenticity. In practice, rather than signing an entire message, the sender signs only the digest, both to reduce computation and to ensure that the signature length is independent of message size.

The same concept applies to elliptic-curve systems via the elliptic-curve digital signature algorithm (ECDSA), which provides equivalent security to RSA signatures with much shorter key lengths.

Digital signatures using RSA (RSASSA-PKCS#1) and elliptic-curve variants (ECDSA and Ed25519) are widely used in software distribution, email authentication, and secure protocols such as TLS, SSH, and S/MIME, and blockchain smart-contract verification.