ecdsa 0.1.2 copy "ecdsa: ^0.1.2" to clipboard
ecdsa: ^0.1.2 copied to clipboard

Package ecdsa implements the Elliptic Curve Digital Signature Algorithm, as defined in FIPS 186-3.

Dart-ECDSA #

Package ecdsa implements the Elliptic Curve Digital Signature Algorithm, as defined in FIPS 186-3.

This implementation derives the nonce from dartlang random.Secure() temporarily.

The curves are all in elliptic package

Usage #

A simple usage example:

import 'package:ecdsa/ecdsa.dart';
import 'package:elliptic/elliptic.dart';

void main() {
  var ec = getP256();
  var priv = ec.generatePrivateKey();
  var pub = priv.publicKey;
  print(priv);
  print(pub);
  var hashHex =
      'b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9';
  var hash = List<int>.generate(hashHex.length ~/ 2,
      (i) => int.parse(hashHex.substring(i * 2, i * 2 + 2), radix: 16));
  var sig = signature(priv, hash);

  var result = verify(pub, hash, sig);
  assert(result);
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

13
likes
145
points
9.25k
downloads

Publisher

verified publisherc0mm4nd.com

Weekly Downloads

Package ecdsa implements the Elliptic Curve Digital Signature Algorithm, as defined in FIPS 186-3.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

crypto, elliptic, ninja_asn1

More

Packages that depend on ecdsa