Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
/ ed25519_dart Public archive

Pure Dart implementation of Ed25519 - public-key signature system.

License

Notifications You must be signed in to change notification settings

semolex/ed25519_dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Pure Dart implementation of Ed25519 - public-key signature system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages