GithubHelp home page GithubHelp logo

kryndex / snow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mcginty/snow

0.0 2.0 0.0 1.17 MB

A Rust implementation of the Noise Protocol (https://noiseprotocol.org)

License: The Unlicense

Rust 100.00%

snow's Introduction

Snow

Crates.io Docs.rs Build Status

totally official snow logo

An implementation of Trevor Perrin's Noise Protocol that is designed to be Hard To Fuck Up™.

🔥 This library is in the state of preview - do everyone a favor and only use this for fun or criticizing the author's code for now.

What's it look like?

See examples/simple.rs for a more complete TCP client/server example.

let mut noise = NoiseBuilder::new("Noise_NN_ChaChaPoly_BLAKE2s".parse()?)
                    .build_initiator()?;
 
let mut buf = [0u8; 65535];
 
// write first handshake message
noise.write_message(&[], &mut buf)?;
 
// receive response message
let incoming = receive_message_from_the_mysterious_ether();
noise.read_message(&incoming, &mut buf)?;
 
// complete handshake, and transition the state machine into transport mode
let mut noise = noise.into_transport_mode()?;

See the full documentation at https://docs.rs/snow.

Implemented

Snow is currently feature-frozen on its current rev32 implementation, since revision 33 will be releasing shortly.

  • Rekey()
  • pskN modifier
  • specifying PSKs after building Session
  • fallback modifier

Crypto

Cryptographic providers are swappable through NoiseBuilder::with_provider(), but by default it chooses select, artisanal pure-Rust implementations (see Cargo.toml for a quick overview).

Acceleration

If you enable the ring-accelerated feature, Snow will default to choosing ring's much faster crypto implementations when supported.

If you enable the ring-resolver feature, Snow will include a ring_wrapper module as well as a RingAcceleratedResolver available to be used with NoiseBuilder::with_resolver().

snow's People

Contributors

mcginty avatar trevp avatar zx2c4 avatar

Watchers

James Cloos avatar  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.