Skip to content

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

turbogiants/curve25519-kotlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks