Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
/ curve25519-java Public archive

Pure Java and JNI backed Curve25519 implementation.

License

Notifications You must be signed in to change notification settings

signalapp/curve25519-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DO NOT USE THIS YET

Generating a Curve25519 keypair:

SecureRandom      secureRandom = SecureRandom.getInstance("SHA1PRNG");
Curve25519KeyPair keyPair      = Curve25519.generateKeyPair();

Calculating a shared secret:

byte[] sharedSecret = Curve25519.calculateAgreement(publicKey, privateKey);

Calculating a signature:

SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
byte[]       signature    = Curve25519.calculateSignature(secureRandom, privateKey, message);

Verifying a signature:

boolean validSignature = Curve25519.verifySignature(publicKey, message, signature);

About

Pure Java and JNI backed Curve25519 implementation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages