Library to generate libsodium-net compatible KeyPair`s
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.nuget Added missing nuget folder Aug 22, 2015
NaclKeys Prepare new stable release 0.3.0 Dec 10, 2015
Tests Prepare new stable release 0.3.0 Dec 10, 2015
.editorconfig Prepare new stable release 0.3.0 Dec 10, 2015
.gitattributes
.gitignore Initialisieren Sie das Commit, um ".gitIgnore"- und ".gitAttribute"-S… May 22, 2015
.travis.yml Project update Aug 22, 2015
LICENSE.md 2016 Jan 2, 2016
NaclKeys.nuspec Prepare new stable release 0.3.0 Dec 10, 2015
NaclKeys.sln Project update Aug 22, 2015
README.md Project update Aug 22, 2015
travis-build-libsodium.sh
travis-linux-deps.sh Project update Aug 22, 2015

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