Simple improvements

This commit is contained in:
Gregor Pogačnik
2021-09-11 14:44:47 +02:00
parent 9d5647fc54
commit 488adc94d9
4 changed files with 27 additions and 4 deletions

View File

@@ -1,14 +1,37 @@
# schnorr-intro # schnorr-intro
A gentle introduction to Schnorr signatures A gentle introduction to Schnorr signature scheme using Eliptic Curve Cryptograph (ECC)
It was invented by german mathematician Claus-Peter Schnorr. Unfortunately he patented the scheme in 1988 (patend expired in February 2008). So during the creation of Bitcoin it was "free", unfortunately the space lacked any kind of libraries. Therefore ECDSA scheme was used.
## Eliptic Curve Cryptography 101 ## Eliptic Curve Cryptography 101
An elliptic curve is defined by formula An elliptic curve is defined by formula:
![equation](http://www.sciweavers.org/tex2img.php?eq=y%5E2x%5E3&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=) ![equation](http://www.sciweavers.org/tex2img.php?eq=y%5E2%3Dx%5E3%2Bax%2Bb&bc=Black&fc=White&im=jpg&fs=12&ff=arev&edit=)
![image](ecc.png)
a and b are parameters that define the curve and are carefully tuned.
Secp256k1 curve used by Bitcoin (and others) has the formula
![equation](http://www.sciweavers.org/tex2img.php?eq=y%5E2%3Dx%5E3%2B7&bc=Black&fc=White&im=jpg&fs=12&ff=arev&edit=) (a = 0, b = 7) and looks like this:
![image](Secp256k1.png)
### Operations
We operate on points on the curve A, B, C, G, P (upper-case letters) all define points on the curve with an (x, y) coordinate.
#### Addition
We can define addition of two points A and B by drawing a line through those two points and where the line intersects the curve is the negative of the new point. After transposition over the x axis (y = 0) we get the actual result
![image](addition.gif)
The operation is commutative (A + B = B + A)
#### Multiplications with a scalar
### Addition
## Schnorr signature scheme ## Schnorr signature scheme

BIN
Secp256k1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
addition.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

BIN
ecc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB