Awesome Open Source
Awesome Open Source

Latest Version Build Status Build status Docs license

.NET Standard 1.3 implementation of the Noise Protocol Framework (revision 33 of the spec). It features:

  • AESGCM and ChaChaPoly ciphers
  • Curve25519 Diffie-Hellman function
  • SHA256, SHA512, BLAKE2s, and BLAKE2b hash functions
  • Support for multiple pre-shared symmetric keys
  • All known one-way and interactive patterns from the specification
  • XXfallback handshake pattern


  1. Include the Noise namespace.
using Noise;
  1. Choose the handshake pattern and cryptographic functions.
var protocol = new Protocol(
  1. Start the handshake by instantiating the protocol with the necessary parameters.
// s is communicated out-of-band
// psk is a 32-byte pre-shared symmetric key

var initiator = protocol.Create(
  initiator: true,
  rs: rs,
  psks: new byte[][] { psk }

var responder = protocol.Create(
  initiator: false,
  s: s,
  psks: new byte[][] { psk }
  1. Send and receive messages.
(written, hash, transport) = state.WriteMessage(message, outputBuffer);
(read, hash, transport) = state.ReadMessage(received, inputBuffer);

written = transport.WriteMessage(message, outputBuffer);
read = transport.ReadMessage(received, inputBuffer);

See Noise.Examples for the complete example.


> dotnet add package Noise.NET --version 1.0.0
Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Sharp (178,694
Security (32,276
Encryption (12,025
Crypto (11,445
Cryptography (11,445
Handshake (962
Noise Protocol (15
Noise Protocol Framework (12