ed25519_dart 1.0.2

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

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");
}

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

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
50

Platforms

Detected platforms: web, other

Primary library: package:ed25519_dart/ed25519_dart.dart with components: mirrors.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
pointycastle ^0.10.0+5 0.10.0+5 0.11.1
Transitive dependencies
analyzer 0.30.0+4 0.31.0+1
args 1.3.0
async 2.0.3
barback 0.15.2+14
bignum 0.1.0
charcode 1.1.1
cli_util 0.1.2+1
code_transformers 0.5.1+4
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
dart_style 1.0.9+1
fixnum 0.10.6
front_end 0.1.0-alpha.4.1 0.1.0-alpha.8
glob 1.1.5
html 0.13.2+2
isolate 1.1.0
kernel 0.3.0-alpha.1.1 0.3.0-alpha.5
logging 0.11.3+1
meta 1.1.2
package_config 1.0.3
path 1.4.2 1.5.1
plugin 0.2.0+2
pool 1.3.4
quiver_collection 1.0.0
quiver_iterables 1.0.1
quiver_pattern 1.0.0
reflectable 1.0.4 2.0.0-dev.1.0
source_maps 0.10.4
source_span 1.4.0
stack_trace 1.9.1
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
yaml 2.1.13
Dev dependencies
test ^0.12.0