An implementation of Curve25519 based on Signal's using modern Java features and components of the Java Cryptographic architecture. Wrappers are reduced to zero and the library is fully modular. Java 11 or higher is required. It should work on any platform.
Add this dependency to your dependencies in the pom:
<dependencies>
<dependency>
<groupId>com.github.auties00</groupId>
<artifactId>curve25519</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
Add this dependency to your build.gradle:
implementation 'com.github.auties00:curve25519:1.2'
var keyPair = Curve25519.generateKeyPair();
var sharedSecret = Curve25519.calculateAgreement(publicKey, privateKey);
var signature = Curve25519.calculateSignature(privateKey, message);
var isValid = Curve25519.verifySignature(publicKey, message, signature);
Copyright 2015 Open Whisper Systems
Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html