bitcoinjs/tiny-secp256k1

Name: tiny-secp256k1

Owner: BitcoinJS

Description: null

Created: 2017-10-10 23:51:47.0

Updated: 2018-05-24 15:36:50.0

Pushed: 2018-05-24 15:36:49.0

Homepage: null

Size: 7001

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

tiny-secp256k1

Build Status NPM js-standard-style

isPoint (A)
int :: Buffer -> Bool

Returns false if

isPointCompressed (A)
intCompressed :: Buffer -> Bool

Returns false if the signature is not compressed.

isPrivate (d)
ivate :: Buffer -> Bool

Returns false if

pointAdd (A, B[, compressed])
tAdd :: Buffer -> Buffer [-> Bool] -> Maybe Buffer

Returns null if result is at infinity.

Throws:
pointAddScalar (A, tweak[, compressed])
tAddScalar :: Buffer -> Buffer [-> Bool] -> Maybe Buffer

Returns null if result is at infinity.

Throws:
pointCompress (A, compressed)
tCompress :: Buffer -> Bool -> Buffer
Throws:
pointFromScalar (d[, compressed])
tFromScalar :: Buffer [-> Bool] -> Maybe Buffer

Returns null if result is at infinity.

Throws:
pointMultiply (A, tweak[, compressed])
tMultiply :: Buffer -> Buffer [-> Bool] -> Maybe Buffer

Returns null if result is at infinity.

Throws:
privateAdd (d, tweak)
ateAdd :: Buffer -> Buffer -> Maybe Buffer

Returns null if result is equal to 0.

Throws:
privateSub (d, tweak)
ateSub :: Buffer -> Buffer -> Maybe Buffer

Returns null if result is equal to 0.

Throws:
sign (h, d)
 :: Buffer -> Buffer -> Buffer

Returns normalized signatures, each of (r, s) values are guaranteed to less than order / 2. Uses RFC6979.

Throws:
verify (h, Q, signature[, strict = false])
fy :: Buffer -> Buffer -> Buffer -> Bool

Returns false if any of (r, s) values are equal to 0, or if the signature is rejected.

If strict is true, valid signatures with any of (r, s) values greater than order / 2 are rejected.

Throws:

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.