Skip to content

secp256k1 implementation without dependencies for node and browser

Notifications You must be signed in to change notification settings

danneu/schnorr-minimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

schnorr-minimal build status

A simple but naive Typescript implementation of Schnorr signatures on the secp256k1 elliptical curve.

Use at your own risk.

Features

  • Schnorr signatures (bip-schnorr)
  • Multi signatures (MuSig)
  • Blind signatures
  • Jacobian optimization

Goals

  1. Zero dependencies
  2. Works in Node and web browsers (https://caniuse.com/#feat=bigint 💀)

Plans

  • Migrate from bigint to uint8array internally.

Usage

(TODO) See tests for now.

import { Scalar, Point } from 'schnorr-minimal'

const priv = Scalar.fromHex('e47d79c74106dbc026a8e672ced54c3f23c7a001a2ef9318be3f338db4edba2d')
const pub = Point.fromPrivKey(priv)
assert(Point.toHex(pub) === '0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798')

About

secp256k1 implementation without dependencies for node and browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published