Skip to content
This crate implements ChaCha20-IETF, Poly1305 and ChachaPoly-IETF for `crypto_api`
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
tests Better formatting and removed the unnecessary macros from documentation Apr 3, 2019
.appveyor.yml Initial commit Mar 8, 2019
.gitignore Initial commit Mar 8, 2019
.travis.yml
Cargo.toml Forbid unsafe code in crate Jun 7, 2019
LICENSE BSD 2-CLAUSE.md
LICENSE MIT.md Bumped copyright year Mar 8, 2019
README.md

README.md

License License Travis CI AppVeyor CI

crypto_api_chachapoly

Welcome to crypto_api_chachapoly 🎉

About

This crate implements the IETF version of ChaCha20, Poly1305 and the ChachaPoly-IETF AEAD construction.

Security

⚠️ Some words of warning ahead: This library is alpha and has not been audited yet – use at your own risk! ⚠️

However we try to do things right from the start – this library is KISS, tested against various test vectors and uses constant time implementations only.

Test Vectors

All implementations pass all reference test vectors and are assumed to produce correct results even in corner cases. We also use API test vectors (to test input validation) and failure test vectors to test our MAC verification.

Constant Time Implementations

All implementations are designed to be invulnerable against timing side-channel attacks by performing all secret-dependent computations in constant time:

For more information about constant time implementations, take a look here and here.

Memory Hygiene

crypto_api_chachapoly does not perform any attempts to erase sensitive contents from memory. However all sensitive contents are stored in heap-allocated memory, so if you're using an erasing memory-allocator like MAProper they will be erased nontheless.

Using an erasing memory allocator is a good idea anyway, because Rust makes it pretty hard to keep track on how the memory is managed under the hood – the memory allocator on the other hand sees everything that happens on the heap and can take care of it accordingly.

Dependencies

Because this code implements the crypto_api, it depends on the crypto_api-crate. Otherwise, it's dependency less.

(There are optional dependencies forrand and sodiumoxide for the example which are only compiled if the feature run_examples is specified.)

You can’t perform that action at this time.