Setting

Fig 1. Setting of digital signature schemes

  1. A signer publishes a public key \( pk \). As usual, we assume that everyone has a correct copy of \( pk \).
  2. To sign a message \( M \), the signer uses its private key to generate a signature \( \sigma \).
  3. Anyone can verify that \( \sigma \) is a valid signature on \( M \) with respect to the signer's public key \( pk \).
  4. Since only the signer knows the corresponding private key, we take this to mean the signer has "certified" \( M \).
  5. A digital signature scheme is secure if no one should be able to generate a valid signature other than the legitimate signer.

Syntax

A digital signature scheme consists of three algorithms \( ({\sf SGen}, {\sf Sign} , {\sf Vrfy}) \): We require that for every \( n \), every \( (pk,sk) \) output by \( {\sf SGen(n)} \), and every message \( M \) in the legitimate message space, it holds that

\( {\sf Vrfy}_{pk}(M, {\sf Sign}_{sk}(M) ) = 1 \).

We say \( \sigma \) is a valid signature on a message \( M \) (with respect to some public key \( pk \) that is understood form the context) if \( {\sf Vrfy}_{pk}(M, \sigma) = 1 \).

Security

Fig 2. EU-CMA security of a digital signature scheme

Given a public key \( pk \) generated by a signer \( S \), we say an adversary outputs a forgery if it outputs a message \( M \) along with a valid signature \( \sigma \) on \( M \) such that \( M \) was not previously signed by \( S \).

As in the case of message authentication codes, security of a digital signature scheme means that an adversary cannot output a forgery even if the adversary is allowed to obtain signatures on many other messages of its choice.

Example Application: Software Patch

Consider a software company that wants to disseminate software patches in an authenticated manner: that is, when the company needs to release a software patch it should be possible for any of its clients to recognize that this patch is authentic, and a malicious third party should never be able to fool a client into accepting a patch that was not actually released by the company. To do this:

  1. The company can generate a public key \( pk \) along with a private key \( sk \), and then distribute \( pk \) in some reliable manner to its clients while keeping \( sk \) secret. (We assume that this initial distribution of the public key is carried out correctly so that all clients have a correct copy of \( pk \). In this example, \( pk \) can be included with the original software purchased by a client.)
  2. When releasing a software patch \( M \), the company can then compute a digital signature \( \sigma \) on \( M \) using its private key \( sk \); the pair \( (M, \sigma) \) is then sent to every client.
  3. Each client can verify the authenticity of \( M \) by checking that \( \sigma \) is a legitimate signature on \( M \) with respect to the public key \( pk \). Note that the same public key \( pk \) is used by all clients, and so only a single signature needs to be computed by the company and sent to everyone.

Digital Signatures vs Message Authentication Codes

Both message authentication codes and digital signature schemes are used to ensure the integrity (or authenticity) of transmitted messages. Here, we compare them.

Digital Signature By Reversing Plain RSA

Many books still say that a digital signature scheme can be obtained by reversing the roles of public-key encryption/decryption algorithms. This is unfounded. As an example, recall the plain RSA encryption scheme \(({\sf Gen}, {\sf Enc}, {\sf Dec})\). From this, consider the following digital signature scheme.

In other words, the signature is \( \sigma = M^d \bmod N \), and it can be verified by checking \( \sigma^e \bmod N \stackrel{?}{=} M \). This seems rational since it holds \( (M^d)^e \bmod N = M \).

Attacks

However, the above scheme is not secure. One can easily come up with forgeries.

Fix: Hashed RSA (aka Full Domain Hash)

The fix is to first apply hash to the message, and then sign on the hash.

Security

Hashed RSA is EU-CMA secure under the RSA assumption, if the hash is modeled as an ideal random function.

Hash and Sign Paradigm: Long Messages Can Be Signed Too

In addition to (possibly) offering some protection against certain attacks, the hashed RSA signature scheme has another advantage over textbook RSA:
Thanks to the hash function, the scheme can be used to sign arbitrary-length data, rather than just elements of \( \mathbb{Z}_N^* \).
This feature is useful in general, and the approach of hashing a message and then signing the result (using some underlying signature scheme) is a standard way to achieve it.

Other Signature Schemes

There are digital signature schemes based on hardness of discrete logarithm such as the Digital Signature Algorithm (DSA). NIST provides a standard, called Digital Signature Standard (DSS), which gives various digital signature schemes.