ed25519_dart 1.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 20

ed25519_dart

Pure Dart implementation of Ed25519 - public-key signature system. For more information, please follow here.

In general, code mimics behaviour of original Python implementation with some extensions from ActiveState Code Recipes. Code is not tested for security requirements, so it is good idea to use it on trusted local machines!

Usage

A simple usage example:

    import 'package:ed25519_dart/ed25519_dart.dart';
    
    void main() {
      // Create new random secret key
      var sk = secretKey();
      print("Created random secret key with length - ${sk.length}");
      // Derive public key from secret key
      var pk = publicKey(sk);
      print("Derived public key with length ${pk.length} from secret key");
      // Create simple message from list
      var msg = bytesFromList([1, 2, 3, 4]);
      print("Created simple message - $msg");
      // Sign message with pk secret ley and public key
      var signature = sign(msg, sk, pk);
      print("Message signed by secret and public key");
      // Verify message signature with public key
      var isVerified = verifySignature(signature, msg, pk);
      print("Created signature is verified - $isVerified");
    }

Package documentation

Extended package documentation can be found here.

Changelog

1.0.2

  • Release unused constants
  • Type fixes

1.0.0

  • Release version 1
  • Analysis complete
  • Described API

0.1.0

  • Test coverage
  • Explicit version bump to use Dart-like versions
  • Added ability to generate secret key from seed
  • Doc updates

0.0.1

  • Initial version

example/ed25519_dart_example.dart

import 'package:ed25519_dart/ed25519_dart.dart';

void main() {
  // Create new random secret key
  var sk = secretKey();
  print("Created random secret key with length - ${sk.length}");
// Derive public key from secret key
  var pk = publicKey(sk);
  print("Derived public key with length ${pk.length} from secret key");
// Create simple message from list
  var msg = bytesFromList([1, 2, 3, 4]);
  print("Created simple message - $msg");
// Sign message with pk secret ley and public key
  var signature = sign(msg, sk, pk);
  print("Message signed by secret and public key");
// Verify message signature with public key
  var isVerified = verifySignature(signature, msg, pk);
  print("Created signature is verified - $isVerified");
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ed25519_dart: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ed25519_dart/ed25519_dart.dart';
  
Version Uploaded Documentation Archive
1.0.2 Jan 12, 2018 Go to the documentation of ed25519_dart 1.0.2 Download ed25519_dart 1.0.2 archive
1.0.1 Jan 12, 2018 Go to the documentation of ed25519_dart 1.0.1 Download ed25519_dart 1.0.1 archive
1.0.0 Jan 12, 2018 Go to the documentation of ed25519_dart 1.0.0 Download ed25519_dart 1.0.0 archive
0.1.1 Jan 12, 2018 Go to the documentation of ed25519_dart 0.1.1 Download ed25519_dart 0.1.1 archive
0.1.0 Jan 12, 2018 Go to the documentation of ed25519_dart 0.1.0 Download ed25519_dart 0.1.0 archive
0.0.1 Jan 11, 2018 Go to the documentation of ed25519_dart 0.0.1 Download ed25519_dart 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
40
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
20
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0