curve25519_vrf 1.0.0

Dart native
Flutter Android iOS

Curve25519 Library for cryptographic signing and verifying. Supports VRF signatures and agreements.

Curve25519 Dart #

A native Dart Library for Curve25519 suite, including x25519 key pairs, shared secrets, x25519 signatures and the XVEdDSA VRF signature algorithm.

Installing #

import 'curve25519/curve25519.dart';

The package requires the following dependencies:

dependencies:
  pointycastle:
  collection:

Usage #

Below is the syntax for using the Curve25519 Package.

Messages

All messages must be given in the form of Uint8List.

var message = "message".codeUnits;

Key Pairs

All KeyPairs are stored in the KeyPair object.

var keyPair = Curve25519().newKeyPair();

var publicKey = keyPair.publicKey;
var privateKey = keyPair.privateKey;

var publicKeyBytes = publicKey.bytes;
var privateKeyBytes = privateKey.bytes;

Signing

var signatureStandard = Curve25519().sign(keyPair, message, SignatureType.STANDARD);
var signatureVRF = Curve25519().sign(keyPair, message, SignatureType.VRF);

Verifying

Standard verification returns Boolean.

VRF verification returns false if failure or VRF output byte array if valid.

var isValid = signature.isValid(message);

License #

Licensed under the FreeBSD License: https://opensource.org/licenses/bsd-license.php

0
likes
70
pub points
26%
popularity

Curve25519 Library for cryptographic signing and verifying. Supports VRF signatures and agreements.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

kabir.sethi3@gmail.com

License

BSD (LICENSE)

Dependencies

collection, pointycastle

More

Packages that depend on curve25519_vrf