Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

A 100% native C# implementation of TweetNaCl for .NET

License

Notifications You must be signed in to change notification settings

TheJustLink/TweetNaCl-CSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

209 Commits

Repository files navigation

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/.

About

A 100% native C# implementation of TweetNaCl for .NET

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%

AltStyle によって変換されたページ (->オリジナル) /