🌑

Explore / Study / Computer Science / Cryptography 1.2k words | 7 minutes

§18 Digital Signatures, Hash-and-Sign Paradigm, and RSA-based Digital Signatures

  1. Digital Signatures
    1. Digital Signature scheme
    2. Digital Signature Experiment Sig-Forge⁡A,Π(n)\operatorname{Sig-Forge}_{\mathscr{A}, \Pi}(n)Sig-ForgeA,Π​(n)
  2. Hash-and-Sign Paradigm
    1. Hash-and-Sign Digital Signature Scheme
    2. Hash-and-Sign Digital Signature: Security
  3. RSA-based Digital Signatures
    1. Textbook RSA Digital Signature Scheme
    2. The RSA-FDH Digital Signature Scheme
    3. Security of the RSA-FDH Signature Scheme

Digital Signatures

Digital Signature scheme

  • A digital signature scheme Π\Pi is defined by three PPT algorithms (Gen,Sign,Vrfy)(Gen, Sign, Vrfy):
    • GenGen: Key generation algorithm that on input 1n1^n, outputs public-private key pair (pk,sk)(pk, sk). Each key has length at least nn, and nn can be determined from pk,skpk, sk.
    • SignSign: Signing algorithm that on input private key sksk and message m{0,1}m \in \{0,1\}^*, outputs a signature σ\sigma. We write this as σSignsk(m)\sigma \leftarrow Sign_{sk}(m). Note that the message space may depend on pkpk.
    • VrfyVrfy: Verification algorithm that on input public key pkpk, message mm, and signature σ\sigma, outputs a bit bb with b=1b = 1 indicating validity, and b=0b = 0 meaning signature is invalid. We write b:=Vrfypk(m,σ)b := Vrfy_{pk}(m, \sigma).

Digital Signature Experiment Sig-ForgeA,Π(n)\operatorname{Sig-Forge}_{\mathscr{A}, \Pi}(n)

  • Fix a signature scheme Π=(Gen,Sign,Vrfy)\Pi = (Gen, Sign, Vrfy), an adversary A\mathscr A, and security parameter nn. Define the randomized experiment Sig-ForgeA,Π(n)\operatorname{Sig-Forge}_{\mathscr{A}, \Pi}(n) as:

    1. Run Gen(1n)Gen(1^n) to obtain keys (pk,sk)(pk, sk).
    2. Adversary A\mathscr A is given 1n1^n, pkpk and oracle access to Signsk()Sign_{sk}( \cdot ). Let Q={m1,,mq}Q = \{m_1,\ldots, m_q\} denote the set of message queries submitted by A\mathscr A to the signing oracle.
    3. A\mathscr A outputs (m,σ)(m, \sigma).
    4. The adversary A\mathscr A succeeds, and the experiment Sig-ForgeA,Π(n)\operatorname{Sig-Forge}_{\mathscr{A}, \Pi}(n) evaluates to 11, if and only if
      1. Vrfypk(m,σ)=1Vrfy_{pk}(m, \sigma) = 1, and
      2. mQm \notin Q.
  • Definition: A Digital Signature scheme Π=(Gen,Sign,Vrfy)\Pi = (Gen, Sign, Vrfy) is existentially unforgeable under an adaptive chosen-message attack, or just secure, if for all PPT adversaries A\mathscr A, there is a negligible function ϵ\epsilon such that

    Pr[Sig-ForgeA,Π(n)=1]ϵ(n)\Pr[\operatorname{Sig-Forge}_{\mathscr{A}, \Pi}(n) = 1] \le \epsilon(n)

Hash-and-Sign Paradigm

Hash-and-Sign Digital Signature Scheme

  • Let Π=(Gen,Sign,Vrfy)\Pi = (Gen, Sign, Vrfy) be a signature scheme for messages of length l(n)l(n), and let ΠH=(GenH,H)\Pi_H = (Gen_H, H) be a hash function with output length l(n)l(n).

    Construct a signature scheme Π=(Gen,Sign,Vrfy)\Pi' = (Gen' , Sign' , Vrfy') as follows:

    • GenGen': On input 1n1^n, run Gen(1n)Gen(1^n) to obtain (pk,sk)(pk, sk) and run GenH(1n)Gen_H(1^n) to obtain ss. The public key is pk,s\langle pk, s \rangle, and the private key is sk,s\langle sk, s \rangle.
    • SignSign': On input a private key sk,s\langle sk, s \rangle and a message m{0,1}m \in \{0,1\}^*, output σSignsk(Hs(m))\sigma \leftarrow Sign_{sk} (H^s(m)).
    • VrfyVrfy': On input a public key pk,s\langle pk, s \rangle, a message m{0,1}m \in \{0,1\}^*, and a signature σ\sigma, output 11 if and only if Vrfypk(Hs(m),σ)=1Vrfy_{pk} (H^s(m), \sigma) = 1.

Hash-and-Sign Digital Signature: Security

  • Theorem. If Π\Pi is a secure signature scheme for messages of length ll and ΠH\Pi_H is collision resistant, then the constructed scheme ΠΠ' is a secure signature scheme for arbitrary-length messages.

RSA-based Digital Signatures

Textbook RSA Digital Signature Scheme

  • Let GenRSAGenRSA be a PPT algorithm that on input 1n1^n outputs a modulus NN that is the product of two nn-bit primes (except with negligible probability), along with integers e,de, d, satisfying ed=1modϕ(N)ed = 1 \bmod \phi(N).

    Define the plain RSA signature scheme Π\Pi as follows.

    • GenGen: On input 1n1^n, run GenRSA(1n)GenRSA(1^n) to obtain (N,e,d)(N, e, d).

      The public key is N,e\langle N, e\rangle, and private key is N,d\langle N, d\rangle.

    • SignSign: On input a private key sk=N,dsk = \langle N, d \rangle and a message mZNm \in \mathbb{Z}^*_N,

      Output the signature as σ:=[mdmodN]\sigma := [m^d \bmod N].

    • VrfyVrfy: On input a public key pk=N,epk = \langle N, e \rangle, a message mZNm \in \mathbb{Z}^*_N, and a signature σZN\sigma \in \mathbb{Z}^*_N,

      Output 11 if and only if m=[σemodN]m = [\sigma^e \bmod N].

The RSA-FDH Digital Signature Scheme

  • Let GenRSAGenRSA be a PPT algorithm that on input 1n1^n outputs a modulus NN that is the product of two nn-bit primes (except with negligible probability), along with integers e,de, d, satisfying ed=1modϕ(N)ed = 1 \bmod \phi(N).

    Construct the RSA-FDH signature scheme as follows.

    • GenGen: On input 1n1^n, run GenRSA(1n)GenRSA(1^n) to compute (N,e,d)(N, e, d).

      The public key is N,e\langle N, e\rangle and the private key is N,d\langle N, d\rangle.

    • SignSign: On input a private key N,d\langle N, d \rangle and a message m{0,1}m \in \{0,1\}^*,

      Output σ:=[H(m)dmodN]\sigma := [H(m)^d \bmod N].

    • VrfyVrfy: On input a public key N,e\langle N, e\rangle, a message m{0,1}m \in \{0,1\}^*, and a signature σ\sigma,

      Output 11 if and only if σe=H(m)modN\sigma^e = H(m) \bmod N.

Security of the RSA-FDH Signature Scheme

  • Theorem. If the RSA problem is hard relative to GenRSAGenRSA and HH is modeled as a random oracle, then the RSA-FDH signature scheme is secure.

— Apr 11, 2023

Creative Commons License
§18 Digital Signatures, Hash-and-Sign Paradigm, and RSA-based Digital Signatures by Lu Meng is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at About.