In cryptography, a Schnorr signature is a digital signature produced by the Schnorr signature algorithm. Its security is based on the intractability of certain discrete logarithm problems. It is considered the simplest digital signature scheme to be provably secure in a random oracle model. It is efficient and generates short signatures. It is covered by Template:US patent, which expired in February 2008.

## Algorithm

### Choosing parameters

• All users of the signature scheme agree on a group ${\displaystyle G}$ with generator ${\displaystyle g}$ of prime order ${\displaystyle q}$ in which the discrete log problem is hard. Typically a Schnorr group is used.
• All users agree on a cryptographic hash function H.

### Key generation

• Choose a private key ${\displaystyle x}$ such that ${\displaystyle 0.
• The public key is ${\displaystyle y}$ where y = gx.

### Signing

To sign a message M:

• Choose a random ${\displaystyle k}$ such that ${\displaystyle 0
• Let ${\displaystyle r=g^{k}\,}$
• Let ${\displaystyle e=H(M||r),\,}$ (where || denotes concatenation)
• Let ${\displaystyle s=(k-xe)\;{\text{mod }}q}$

The signature is the pair ${\displaystyle (e,s)}$. Note that ${\displaystyle 0\leq e and ${\displaystyle 0\leq s; if a Schnorr group is used and ${\displaystyle q<2^{160}}$, then the signature can fit into 40 bytes.

### Verifying

• Let ${\displaystyle r_{v}=g^{s}y^{e}\,}$
• Let ${\displaystyle e_{v}=H(M||r_{v})\,}$

If ${\displaystyle e_{v}=e}$ then the signature is verified.

Public elements: ${\displaystyle G,g,q,y,s,e,r}$. Private elements: ${\displaystyle k,x}$.