Skip to content

Implementations of various Elliptic Curve Cryptography primitives such as ECDSA and Adaptor ECDSA over secp256k1

License

Notifications You must be signed in to change notification settings

primefactor-io/ecc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elliptic Curve Cryptography

Implementations of various Elliptic Curve Cryptography primitives.

The Elliptic Curve Digital Signature Algorithm (ECDSA) as well as its Adaptor Signature variant are implemented over the curve secp256k1. In addition to the typical r and s values, generated ECDSA signatures also include a recovery bit v that allows for public key recovery.

A Schnorr Signature implementation is available which also features an Adaptor Signature variant. Both implementations are using the secp256k1 curve.

Two proof implementations allow for proving knowledge of a discrete logarithm, as well as the equality of two discrete logarithms.

Using the provided abstractions, different curves can be easily integrated and existing algorithms reused.

Setup

  1. git clone <url>
  2. asdf install (optional)
  3. go test -count 1 -race ./...

Useful Commands

go run <package-path>
go build [<package-path>]

go test [<package-path>][/...] [-v] [-cover] [-race] [-short] [-parallel <number>]
go test -bench=. [<package-path>] [-count <number>] [-benchmem] [-benchtime 2s] [-memprofile <name>]

go test -coverprofile <name> [<package-path>]
go tool cover -html <name>
go tool cover -func <name>

go fmt [<package-path>]

go mod init [<module-path>]
go mod tidy

Useful Resources