curve25519 0.1.0

  • README.md
  • Example
  • Installing
  • Versions
  • new46

Introduction #

A Dart package that implements X25519 key exchange (RFC 7748). X25519 is Elliptic Curve Diffie-Hellman (ECDH) over Curve25519.

This package was created by Gohilla.com team and licensed under the Apache License 2.0.

Issues and contributing #

example/curve25519.dart

import 'package:curve25519/curve25519.dart';

void main() async {
  // Let's generate two asymmetric keypair.
  final keypair1 = await X25519().generateKeyPair();
  final keypair2 = await X25519().generateKeyPair();

  // We can now calculate a shared secret using the (sender's) private key and
  // the (recipient's) public key.
  var sharedSecret = await X25519().calculateSharedSecret(
    keypair1.secretKey,
    keypair2.publicKey,
  );
  print("#1 -> #2: ${sharedSecret.toHex()}");

  sharedSecret = await X25519().calculateSharedSecret(
    keypair2.secretKey,
    keypair1.publicKey,
  );
  print("#2 -> #1: ${sharedSecret.toHex()}"); // Same as #1 --> #2
}

Use this package as a library

1. Depend on it

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


dependencies:
  curve25519: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:curve25519/curve25519.dart';
  
Version Uploaded Documentation Archive
0.1.0 Apr 2, 2019 Go to the documentation of curve25519 0.1.0 Download curve25519 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Apr 12, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:curve25519/curve25519.dart.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
benchmark_harness ^1.0.0
pedantic ^1.0.0
raw ^0.2.0
test ^1.4.0