Sitemap

Member-only story

Discrete Log Implementation of Schnorr Signatures in PowerShell

4 min readAug 30, 2022

In Feb 1989, Claus Schnorr submitted a patent which was assigned to no one. It has 11 claims and allowed digital signatures to be merged for multiple signers [here]:

Press enter or click to view image in full size

This method has the great advantage that we can have multiple signers to a message or a transaction and end up with a single signature for all the signers. It is now being used in Bitcoin transactions so that we have an efficient signature for a transaction that involves multiple entities.

With the Schnorr signature, we create a signature (r,e) for a hash of the message (m). Initially, Peggy (the prover) has a private key x, and her public key will then be:

and where G is the base point on the curve. She then generates random nonce (k) for the signing of a message and defines a commitment to this value:

Next, with a message (M), she computes a challenge (e) with a hash function of:

Next, Peggy computes:

Peggy then sends e and s to Victor (the verifier). Victor then determines:

If e_v is equal to the e value that Peggy sent, the signature has been proven…

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.