Noise-C
|
Noise-C is a plain C implementation of the Noise Protocol, intended as a reference implementation. It can also be referred to as "Noisy", which is what you get when you say "Noise-C" too fast. The code is distributed under the terms of the MIT license, with the code available from github.
The initial target is GNU/Linux systems, because that's what I have, but contributions are definitely welcome to make the code work on other platforms. Desktop systems will be targeted first and then embedded systems. "Make It Work And Then Make It Work Better" is my motto.
Note that the post-quantum "NewHope" algorithm only works with the "NN" handshake pattern because it does not support long-term static keys. For more information, see the Post-Quantum Noise with New Hope page on the Noise wiki.
include/noise/
- Public API definitions for inclusion into applications. src/protocol/
- Source code for the core Noise-C protocol library. src/protobufs/
- Source code for the Noise-C protobufs library. src/keys/
- Source code for the key and certificate management library. src/crypto/
- Public domain and open source reference implementations of the cryptographic primitives. src/backend/ref/
- Backends for CipherState, HashState, DHState, and SignState that use the reference cryptographic primitives. src/backend/openssl/
- OpenSSL crypto backend src/backend/sodium/
- libsodium crypto backend tools/protoc/
- Source code for the Noise-C protobufs compiler. tools/keytool/
- Command-line key and certificate management tool. tests/unit/
- Unit tests to exercise the library's functionality. tests/vector/
- Public JSON test vectors and test harness for the Noise protocol. tests/vector-gen/
- Generates test vectors in JSON format. tests/performance/
- Performance tests for the cryptographic primitives. examples/
- Source code for examples. doc/
- Overview and example documentation.The library uses autoconf and automake for the Makefile structure. You will need to have these installed to build from the sources in the git repository. Bison and Flex are also requred to build the noise-protoc
protobuf compiler.
To build the library under GNU/Linux and run the tests, type the following:
The following parameters can be supplied to configure
to select other crypto back ends:
–with-libsodium
- Use libsodium to provide crypto primitives, falling back to the reference back end where libsodium does not have an implementation. –with-openssl
- Use the AESGCM implementation from OpenSSL.Both options can be combined to get the best of both worlds.
In no particular order:
Contributions are welcome to help implement any of these.
For more information on this library, to report bugs, to contribute, or to suggest improvements, please contact the author Rhys Weatherley via e-mail.