Giter VIP home page Giter VIP logo

ed25519_dart's Introduction

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.

ed25519_dart's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ed25519_dart's Issues

ed25519_dart isn't compatible with dart 2

I tried using ed25519_dart in my Flutter project, but the app doesn't even start due to this error (which is also pointed out by the dart analyzer):
integer literal can't be represented in 64 bits

I suspect that this library isn't compatible with dart 2. Is there any plan to update it?

Update to Dart 2.0.0?

when I try to use it I get this error:

package: ed25519_dart / src / ed25519_dart_base.dart': error: line 16 pos 1: integer literal 15112221349535400772501151409588531511454012693041857206046113283949847762202 is out of range
15112221349535400772501151409588531211454012693041857206046113283949847762202;

I think it is because I am using dart 2.0.0, try to change all the int to BigInt and other things but it did not work for me, I am new using dart.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.