This package has been deprecated

Author message:

use secp256k1

ecdsa-native

0.0.1 • Public • Published

ecdsa-native Build Status

A Native Ecdsa Module

Usage

Check out the tests

Test

Tests use mocha
npm test

API

new Ecdsa()

Creates an new Ecdsa Key object

sign(hash, priv)

Signs a hash

Parameters

hash: Buffer, a Buffer of the length 32 that will be signed

priv: Buffer, a private key that is a Buffer of the length 32

Returns: Object, - a object with a r and s propety both of which are Buffer

signCompressed(hash, priv)

Parameters

hash: Buffer, a Buffer of the length 32 that will be signed

priv: Buffer, the private key, A Buffer with the length of 32

verifyCompressed(hash, sig)

Parameters

hash: Buffer, the hash to verify

sig: Object, the signature as an Object that has a r, s and i property

Returns: Boolean,

parseDERsig(sig)

Parameters

sig: Buffer,

Returns: Object,

rs2DER(r, s)

Parameters

r: Buffer,

s: Buffer,

Returns: Buffer,

recoverPubKey(e, r, s, i)

Parameters

e: Buffer,

r: Buffer,

s: Buffer,

i: Number,

Returns: Object,

calcPubKeyRecoveryParam(e , r, s, q)

Calculate pubkey extraction parameter. Parameters

e: Buffer,

r: Buffer,

s: Buffer,

q: Buffer ,

Returns: Object

History

I attemped to track down the all contrubitures and list them but I gave up. So instead I list the history if the cpp code.

Package Sidebar

Install

npm i ecdsa-native

Weekly Downloads

1

Version

0.0.1

License

GPL3

Last publish

Collaborators

  • null_radix