#noise #protocols #framework

no-std noise-protocol

Noise Protocol Framework implementation

10 releases

0.2.0 Nov 1, 2023
0.2.0-rc1 Apr 7, 2023
0.1.4 Oct 17, 2022
0.1.3 Apr 10, 2020
0.0.3 Mar 2, 2017

#567 in Cryptography

Download history 623/week @ 2024-10-24 822/week @ 2024-10-31 638/week @ 2024-11-07 585/week @ 2024-11-14 481/week @ 2024-11-21 415/week @ 2024-11-28 408/week @ 2024-12-05 374/week @ 2024-12-12 376/week @ 2024-12-19 359/week @ 2024-12-26 380/week @ 2025-01-02 559/week @ 2025-01-09 543/week @ 2025-01-16 411/week @ 2025-01-23 849/week @ 2025-01-30 281/week @ 2025-02-06

2,152 downloads per month
Used in 15 crates (9 directly)

Unlicense

51KB
1K SLoC

Noise-Rust

Crates.io Docs.rs

Implementation of the Noise Protocol Framework in Rust.

Status

Revision 34 is implemented.

Test vectors from cacophony and snow are successfully verified.

Philosophy

  • Simple: straightforward implementation, small amount of code, almost no dependencies, supports no_std. Feature use_alloc can optionallly be used as an alternative to std.
  • Fast: static dispatch, no heap allocation necessary.
  • Unopinionated: flexible, primitive API, does not dictate how it should be used.

Documentation

Crates

This repository contains several crates. The noise-protocol crate contains the abstract implementation of the protocol framework. noise-rust-crypto provides concrete implementations of the needed crypto primitives. It is a wrapper for x25519-dalek and RustCrypto crates.

The following table shows what primitives each of these crates supports:

X25519 AES-256-GCM Chacha20-Poly1305 SHA-256 SHA-512 BLAKE2s BLAKE2b
rust-ring
rust-crypto

You can also plug in other primitive implementations by implementing the DH, Cipher and Hash traits.

no_std usage

The noise-protocol crate supports no_std, if default features are disabled.

License

Unlicense.

Dependencies

~68KB