Giter Site home page Giter Site logo

turbogiants / curve25519-kotlin Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 4.0 6.65 MB

A synthetic Kotlin implementation of Curve25519. A fast Elliptic-curve Diffie-Hellman with Edwards curve Digital Signature Algorithm VRF support backed by Java code ported from C.

License: GNU General Public License v3.0

Kotlin 6.76% Java 93.24%
signal curve25519 eddsa25519 digitalsignature cryptography ecdh-signature elliptic-curves trevor-perrin shared-secrets signature

curve25519-kotlin's Introduction

curve25519-kotlin

A synthetic Kotlin implementation of Curve25519. A fast Elliptic Curve - Diffie-Hellman function, including x25519 key pairs, shared secrets, x25519 signatures, and the XVEdDSA VRF signature algorithm backed by Java code. Based on Signal curve25519-java.

This implementation doesn't use a native C curve25519-donna and only relies on pure Java code of Signal. Thus, this is a downgrade version of Signal curve25519-java in terms of dynamic curve provider.

Obtaining an instance

The caller initialize a singleton instance of Curve25519.

Generating a Curve25519 keypair:

Calculating a shared secret:

Calculating a signature:

Verifying a signature:

Ported Implementation

Additional implementation and improvements originated from this pull request were added in this codebase.

Implementation Author Ported To
Edwards-curve Digital Signature Algorithm Java VRF support by k-s-t-i · Pull Request #37 from C to Java

Todo

  • Add curve25519-donna C implementation [JNI] (Optional)
  • Add option to use BouncyCastle's Curve25519 DJB implementation.
  • Add native C jni implmentation of signal.

Credits

This implementation is derived from the original work of Open Whisper System Signal curve25519-java

Works

License

Copyright (C) 2015 Open Whisper Systems
Copyright (C) 2021 Creative Turbo Giants

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or 
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html

curve25519-kotlin's People

Contributors

forceporquillo avatar

Stargazers

 avatar  avatar  avatar

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.