ecdsa-wasm
ecdsa/secp256k1 + SHA-256 for Node.js by WebAssembly
Last updated 2 years ago by herumi .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ecdsa-wasm 
SYNC missed versions from official npm registry.

Build Status

ECSSA/secp256k1 + SHA-256

Abstract

This is a wasm version of mcl/ecdsa.h

for Node.js

node test.js

how to use

const ecdsa = require('ecdsa-wasm')

// create secret key
const sec = new ecdsa.SecretKey()

// initialize sec
sec.setByCSPRNG()

// get public key
const pub = sec.getPublicKey()

// make signature
const sig = sec.sign("abc")

// verify signatpure by pub
> pub.verify(sig, "abc")
true
> pub.verify(sig, "abcd")
false

// create precomputed public key(faster than pub)
const ppub = new ecdsa.PrecomputedPublicKey()
// initialize ppub
ppub.init(pub)

// verify signature by ppub
> ppub.verify(sig, "abc")
true
> ppub.verify(sig, "abcd")
false

// destroy ppub if unnecessary
ppub.destroy()

how to build

mkdir work
cd work
git clone git@github.com:herumi/mcl
git clone git@github.com:herumi/cybozulib
mkdir ecdsa-wasm
cd mcl
make ecdsa-wasm

License

modified new BSD License http://opensource.org/licenses/BSD-3-Clause

Author

光成滋生 MITSUNARI Shigeo(herumi@nifty.com)

Current Tags

  • 0.0.6                                ...           latest (2 years ago)

5 Versions

  • 0.0.6                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |