Setting

Fig 1. Setting of digital signature schemes
-
A signer publishes a public key \( pk \). As usual, we assume that everyone has a correct copy of \( pk \).
- To sign a message \( M \), the signer uses its private key to generate a signature \(
\sigma \).
- Anyone can verify that \( \sigma \) is a valid signature on \( M \) with respect to the signer's public key \( pk \).
- Since only the signer knows the corresponding private key, we take
this to mean the signer has "certified" \( M \).
- 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}) \):
- The key-generation algorithm \( {\sf SGen} \) takes as input a security parameter \( n \) and outputs a pair of keys \((pk,sk) \). These are called the public key and the private key, respectively. We write this procedure as \( (pk, sk) \leftarrow {\sf SGen}(n) \).
- The signing algorithm \( {\sf Sign} \) takes as input a private key \( sk \) and a message \( M \). It outputs a signature \( \sigma \), and we write this as \( \sigma \leftarrow {\sf
Sign}_{sk}(M) \).
- The verification algorithm \( {\sf Vrfy} \) takes as input a public key \( pk \), a message \( M \), and a signature \( \sigma \). It outputs a bit \( b \), with \( b = 1 \)
meaning valid and \( b = 0 \) meaning invalid. We write this as \( b \leftarrow {\sf Vrfy}_{pk}(M, \sigma) \).
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:
- 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.)
- 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.
- 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.
- \( {\sf SGen} = {\sf Gen} \).
- \( {\sf Sign}_{sk}(M) = {\sf Dec}_{sk}(M) \).
- \( {\sf Vrfy}_{pk}(M, \sigma) \): Check if \( M = {\sf Enc}_{pk}(\sigma) \).
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.
- Forging a signature on a random message:
- Choose a random number \( \sigma \) at random from \(
\mathbb{Z}_{N}^* \)
- Compute \( M = \sigma^e
\bmod N \).
- The forgery is \( (M, \sigma) \).
In other words, by first choosing the signature and then compute the message
depending on the signature, the attacker can easily forge a valid
message-signature pair. Check that the pair easily passes the verification
algorithm.
- Forging a signature on a combined message: Recall the security definition
(existential unforgeability under the chosen message attack).
- The adversary obtains two message-signature pairs \( (M_1, \sigma_1)
\) and \( (M_2, \sigma_2) \) from the box.
- The
forgery is \( ( M, \sigma )\) with \( M = M_1 \cdot M_2 \bmod N, \sigma = \sigma_1 \cdot \sigma_2
\bmod N \).
We know the following holds:
\( \sigma_1 \equiv M_1^d \pmod N, \sigma_2 \equiv
M_2^d \pmod N\).
Therefore, we know
\( \sigma \equiv \sigma_1 \cdot \sigma_2
\equiv M_1^d \cdot M_2^d \equiv (M_1 \cdot M_2)^d \equiv M^d \pmod N \),
which means \( \sigma \) is a valid signature on \( M \).
The fix is to first apply hash to the message, and then sign on the hash.
- \( {\sf SGen} = {\sf Gen} \).
- \( {\sf Sign}_{sk}(M) \).
- Parse \( sk = (N, d) \).
- Output \( H(M)^d \bmod N \).
- \( {\sf Vrfy}_{pk}(M, \sigma) \):
- Parse \( pk = (N, e) \).
- Check if \( H(M) \stackrel{?}{=} \sigma^e \bmod N \). If so, output 1; otherwise 0.
Security
- Now, the first attack becomes infeasible. The adversary will choose \( \sigma \) and compute \( \sigma^e
\), but now it has to find \( M \) that
hashes to \( \sigma^e \). From pre-image resistance,
this task is computationally infeasible.
- For the second attack, the adversary needs to three messages such that
\( H(M) = H(M_1) \cdot H(M_2) \). From pre-image
resistance, this task is computationally infeasible again.
- One additional concern arises when we change the scheme. In particular, the
adversary try to find another message \(M_1\) such that
\[H(M_1) = H(M).\]
Then, if \((M, \sigma)\) is a good message-signature pair, so is \((M_1,
\sigma)\); the adverary has made a successful forgery attack!
However, from collision resistance, this task is also computationally
infeasible.
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.