Introduction

Schnorr signatures are a type of digital signature scheme that provides a secure method for signing and verifying messages. They were proposed by Claus-Peter Schnorr and are known for their simplicity, efficiency, and strong security properties. Schnorr signatures are widely regarded for their compact size and the computational efficiency they offer compared to other signature schemes.

Design

The design of Schnorr signatures is based on the difficulty of solving the discrete logarithm problem in cyclic groups, a common hard problem in cryptography. The scheme involves three key components: a private key, a public key, and a signature generation and verification process. The private key is a randomly chosen number, while the public key is derived from the private key using a predefined base point on an elliptic curve or a large prime number in a finite field.

Global parameters

Schnorr signatures work with the prime modulo p such that p-1 has a prime factor q. Usually, the appropriate size of p and q is 1024 bits and 160 bits, respectively. Both parties should agree on a group and its cyclic subgroup , whose generator is such that .

How it works

Interactive version (Schnorr Identification Protocol)

  1. Key Generation: A prover generates a private key by selecting a random integer. The corresponding public key is computed as .
  2. Commitment
    • The prover selects a random value and computes and sends to the verifier.
  3. Challenge
    • The verifier sends a random challenge number to the prover.
    • The prover calculates the response .
    • is the order of the cyclic subgroup and divides . ( is a prime number)
  4. Verification
    • The verifier checks if is equal to .
    • Here, holds.
    • Therefore, if the equality holds, the signature is valid; otherwise, it is invalid.

This verification ensures that the prover has knowledge of the private key , without revealing the private key itself. That is why this protocol can be regarded as one of the zero-knowledge protocols.

Non-interactive version (Schnorr Signature)

The interactive version of the Schnorr protocol can be revised to a non-interactive version using the Fiat-Shamir transform. This is what is called the Schnorr signature, whose process involves the following steps:

  1. Key Generation: A prover generates a private key by selecting a random integer. The corresponding public key is computed as .
  2. Signature Generation: To sign a message , the signer:
    • Selects a random value and computes .
    • Computes the hash , where is a cryptographic hash function.
    • Calculates the signature . The signature on the message is the pair .
  3. Signature Verification: To verify the signature on a message :
    • The verifier computes .
    • Checks if is equal to .
    • If the equality holds, the signature is valid; otherwise, it is invalid.

This ensures that the signature could only have been produced by someone with knowledge of the private key .