Skip to content

C# Implementation of NaCl Elliptical Curve Encryption Library

Notifications You must be signed in to change notification settings

odinhaus/Saltable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##USAGE

byte[] apk, ask, bpk, bsk;
// Gets Alice's keys
NaClClient.CreateKeys(out apk, out ask);
// Gets Bob's keys
NaClClient.CreateKeys(out bpk, out bsk);

// Alice's encryptor for Bob
var clientA = NaClClient.Create(apk, ask, bpk);
// Bob's encryptor for Alice
var clientB = NaClClient.Create(bpk, bsk, apk);

// get your plaintext bytes
byte[] clear = new byte[] { 1, 2, 3, 4, 5 };
byte[] nonce;

// Alice encrypts for Bob
byte[] cipher = clientA.Encrypt(e.Buffer, 0, e.BytesRecorded, out nonce);
// Bob decrypts from Alice
clear = clientB.Decrypt(cipher, nonce);

About

C# Implementation of NaCl Elliptical Curve Encryption Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published