secp256k1 0.3.0 copy "secp256k1: ^0.3.0" to clipboard
secp256k1: ^0.3.0 copied to clipboard

Pure secp256k1 signature algorithm implement for dart language which uses pure dart and basic types to represent all matters

dart-secp256k1 #

Pure secp256k1 implement for dart language.

secp256k1 refers to the parameters of the elliptic curve used in Bitcoin's public-key cryptography, and is defined in Standards for Efficient Cryptography (SEC) (Certicom Research, http://www.secg.org/sec2-v2.pdf). Currently Bitcoin uses secp256k1 with the ECDSA algorithm, though the same curve with the same public/private keys can be used in some other algorithms such as Schnorr.

Usage #

A simple usage example:

var pk = PrivateKey.fromHex('c37c299bb7f5ffd8d9329d052983342a8c3234ff3b3fa32a292187341f7146d7');
var pub = pk.publicKey;
print(pub.toHex());
print(pub.toCompressedHex());

var messageHash = 'b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9';
var sig = pk.signature(messageHash);
print(sig.verify(pub, messageHash)); // true
copied to clipboard

Features and bugs #

WARN: This lib does not not provide deterministic ECDSA signature!

Please file feature requests and bugs at the issue tracker.

10
likes
150
points
6.26k
downloads

Publisher

verified publisherc0mm4nd.com

Weekly Downloads

2024.09.16 - 2025.03.31

Pure secp256k1 signature algorithm implement for dart language which uses pure dart and basic types to represent all matters

Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on secp256k1