• Stars
    star
    883
  • Rank 51,702 (Top 2 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Rust implementation of the Noise Protocol Framework

Snow

Crates.io Docs.rs Build Status dependency status

totally official snow logo

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

πŸ”₯ Warning πŸ”₯ This library has not received any formal audit.

What's it look like?

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

let mut noise = snow::Builder::new("Noise_NN_25519_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 tracking against Noise spec revision 34.

However, a not all features have been implemented yet (pull requests welcome):

Crypto

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

Other Providers

ring

ring is a crypto library based off of BoringSSL and is significantly faster than most of the pure-Rust implementations.

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

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

libsodium

libsodium is a fork of NaCl focused on improved usability and regular maintenance.

Compatibility caveat

libsodium blacklists a set of low-order points that it deems unsafe because they would output an all-zeroes result.

Noise does not validate Curve25519 points, so if another Noise implementation provides an all-zero (or another low-order) public key for some reason (be it testing, or a real life foot-shot), if you use the libsodium backend of snow, it will error in a way that's not fully compatible with the specification.

Resolver primitives supported

default ring libsodium
CSPRNG βœ” βœ” βœ”
25519 βœ” βœ” βœ”
448
AESGCM βœ” βœ”
ChaChaPoly βœ” βœ” βœ”
SHA256 βœ” βœ” βœ”
SHA512 βœ” βœ”
BLAKE2s βœ”
BLAKE2b βœ”

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

shoop

scp has a run-in with mosh (alpha)
Rust
457
star
2

material-colors

Android XML resource with the full material color palette.
45
star
3

noise.js

ambient sound synthesis library for not going crazy
JavaScript
11
star
4

android-obd-reader

A Bluetooth OBDII client for Android devices.
Java
11
star
5

mio-utun

A userspace tunnel wrapper for mio.
Rust
8
star
6

tokio-utun

Tokio bindings for userspace tunnels in macOS
Rust
5
star
7

voyager

DEPRECATED - no longer maintained since 2012. Update your friends on your road trip in real-time online and keep track of the marks you've made on the road over your lifetime.
JavaScript
5
star
8

voyager-android

DEPRECATED - no longer maintained since 2012. Update your friends on your road trip in real-time online and keep track of the marks you've made on the road over your lifetime.
Java
4
star
9

hevc-datamosh

an application to assist in HEVC/H.264 datamoshing
Rust
3
star
10

Eightdroid

Android video streaming application for CS414 @ UIUC
Java
2
star
11

alti2

A rust tool for reading from the Alti-2 Atlas (and possibly others)
Rust
2
star
12

InternBot

InternBot
Ruby
2
star
13

ofnoise.com

Ambient noise for the masses.
1
star
14

wireguard-control

A high-level control library to get and set configurations for WireGuard interfaces.
1
star
15

Eightdesktop

Java
1
star
16

Notifox

Python
1
star
17

craigsgraph.jakemcginty.com

JavaScript
1
star
18

catlogcat

Prettify logcat output in gists
JavaScript
1
star
19

RattusWeb

Python
1
star
20

flower

JavaScript
1
star
21

spritegen

Go
1
star
22

jakemcginty.com

initial push to github
JavaScript
1
star
23

twock

A (surprisingly functional) experiment to see if we can guess what time of day it is by what is being tweeted.
JavaScript
1
star
24

Pormanteau

It makes even less sense with just this word as the project title! Like a spork! And Pokemon!
Java
1
star