Skip to content

aureleoules/ecdsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECDSA in Go

This repository contains a set of tools to compute operations on an elliptic curve.

Elliptic Curve

An elliptic curve is defined by the equation:

Elliptic Curve Equation

It looks something like this:
secp256k1 curve
secp256k1 curve used by Bitcoin
a
b

Point operations

See ECDSA point operations.

Point at infinity

Point at infinity is defined by
O

  • O + O = O
  • P + O = P

Point negation

  • P - P = O
  • P - Q = 0

Point addition

P + Q = R
Where R is the negation of the intersection of the straight line defined by P and Q, and the curve.

Illustration

lambda

R

Point doubling

P + P = R
Where R is the negation of the intersection of the curve's tangent at P, and the curve.

lambda

R

Point multiplication

Point multiplication is the repetition of point addition.
Equation

Montgomery ladder algorithm

R00
  R1P
  for i from m downto 0 do
     if di = 0 then
        R1point_add(R0, R1)
        R0point_double(R0)
     else
        R0point_add(R0, R1)
        R1point_double(R1)
  return R0

About

ecdsa operations in go

Topics

Resources

Stars

Watchers

Forks

Languages