Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

NaclKeys Build status Build Status NuGet Version License

Small library to generate libsodium-net compatible KeyPair`s and encoded public keys based on predefined formats.

Code Status

NaclKeys was subjected to a source code audit carried out by Paragon Initiative Enterprises, LLC.

Final report (Web): Audit-Report NaclKeys 07.2015 Final report (PDF): Audit-Report NaclKeys 07.2015

Installation

There is a NuGet package available.

Supported Formats

CurveLock Format

Project: CurveLock

Methods

public static KeyPair GenerateCurveLockKeyPair(string email, string password)
public static string EncodeCurveLockPublicKey(byte[] publicKey)
public static byte[] DecodeCurveLockPublicKey(string encodedPublicKey)

Example

const string email = "someone@example.com";
const string password = "magnetometers payee induce tangibly polonaises unrestricted oilfield";
var keyPair = KeyGenerator.GenerateCurveLockKeyPair(email, password);
var encodedPublicKey = KeyGenerator.EncodeCurveLockPublicKey(keyPair.PublicKey);

MrDDGk7GYEypr93LMgJn4Av3c98fWamRKvAKbjrTEvjtz5kRxj

miniLock Format

Project: miniLock

Methods

public static KeyPair GenerateMiniLockKeyPair(string email, string password)
public static string EncodeMiniLockPublicKey(byte[] publicKey)
public static byte[] DecodeMiniLockPublicKey(string encodedPublicKey)

Example

const string email = "someone@example.com";
const string password = "magnetometers payee induce tangibly polonaises unrestricted oilfield";
var keyPair = KeyGenerator.GenerateMiniLockKeyPair(email, password);
var encodedPublicKey = KeyGenerator.EncodeMiniLockPublicKey(keyPair.PublicKey);

Cz5bEJLKdSib9kWxkmskExaaLdRg8tVA2qsFBnfdQwkMe

bytejail Format

Project: bytejail

Methods

public static KeyPair GenerateBytejailKeyPair(string userInputPartOne, string userInputPartTwo)
public static string EncodeBytejailPublicKey(byte[] publicKey)
public static byte[] DecodeBytejailPublicKey(string encodedPublicKey)

Example

const string email = "someone@example.com";
const string password = "magnetometers payee induce tangibly polonaises unrestricted oilfield";
var keyPair = KeyGenerator.GenerateBytejailKeyPair(email, password);
var encodedPublicKey = KeyGenerator.EncodeBytejailPublicKey(keyPair.PublicKey);

2PNPvrfYAQxhaGYaAzsWTYgEzymmQZ37jG2vJThBJHDcY4SABnH

##Helper It`s also possible to recognize an identity format

public static KeyType TryRecognizeIdentityFormat(string encodedPublicKey, bool validate = true)

More Examples

see Unit Tests

License

MIT

About

Library to generate libsodium-net compatible KeyPair`s

Resources

License

Packages

No packages published
You can’t perform that action at this time.