Giter VIP home page Giter VIP logo

tweetnacl-csharp's Introduction

TweetNaCl-CSharp

Install

From nuget

About Project

A C# port of original TweetNaCl C language implementation version 20140427.

⚠️ The library is not stable yet and API will change and was not independently reviewed. If you can help reviewing it, please [contact me](mailto:adribeiro (at) gmail.com).

##Documentation

Public-key authenticated encryption (box)

Implements curve25519-xsalsa20-poly1305.

KeyPair CryptoBoxKeypair()

The CryptoBoxKeypair function randomly generates a secret key and a corresponding public key. The secret key array must have size equal to crypto_box_SECRETKEYBYTES

Byte[] CryptoBoxKeypair(Byte[] secretKey)

The CryptoBoxKeypair function randomly generates a secretKey and a corresponding public key. The secretKey array must have size equal to crypto_box_SECRETKEYBYTES

Byte[] CryptoBox(Byte[] message, Byte[] nonce, Byte[] publicKey, Byte[] secretKey)

The function encrypts and authenticates a message using the nonce, receiver´s publicKey and sender´s secretKey.

Byte[] CryptoBoxOpen(Byte[] cipheredMessage, Byte[] nonce, Byte[] publicKey, Byte[] secretKey)

The function verifies and decrypts a cipherMessage using the receiver's secretKey, the sender's publicKey, and a nonce.

Byte[] CryptoBoxBeforenm(Byte[] publicKey, Byte[] secretKey)

Applications that send several messages to the same receiver can gain speed by splitting CryptoBox into two steps, CryptoBoxBeforenm and CryptoBoxAfternm.

Byte[] CryptoBoxAfternm(Byte[] message, Byte[] nonce, Byte[] k)

Byte[] CryptoBoxOpenAfternm(Byte[] cipheredMessage, Byte[] nonce, Byte[] k)

Byte[] CryptoSignKeypair(Byte[] secretKey)

Byte[] CryptoSign(Byte[] message, Byte[] secretKey)

Byte[] CryptoSignOpen(Byte[] signedMessage, Byte[] publicKey)

Byte[] CryptoScalarmult(Byte[] n, Byte[] p)

Scalar multiplication is a curve25519 implementation.

Byte[] CryptoScalarmultBase(Byte[] n)

The CryptoScalarmultBase function computes the scalar product of a standard group element and an integer n

##Third-party libraries

##Who is using

##License This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

tweetnacl-csharp's People

Contributors

drr00t avatar leandrogm avatar zamabraga avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.