cesarb / chacha20-poly1305-aead

A pure Rust implementation of the ChaCha20-Poly1305 AEAD from RFC 7539.
Apache License 2.0
26 stars 6 forks source link

Expose poly1305 and chacha20 diectly #4

Open burdges opened 7 years ago

burdges commented 7 years ago

There are numerous applications that require direct access to poly1305 and chacha20, like key derivation functions and anything meant to provide anonymity as opposed to just encryption. Anonymity tools need custom AEAD modes for onion encryption because they cannot change the cipher text size.

tarcieri commented 6 years ago

I'm a fan of @newpavlov's https://github.com/RustCrypto work modularizing cryptographic algorithms into individual crates. He also pre-emptively namesquatted on the "chacha20" and "poly1305" crates, which could live inside these projects respectively:

https://github.com/RustCrypto/stream-ciphers https://github.com/RustCrypto/MACs

What's particularly nice about this project is he has started to develop common traits for different types of algorithms, so despite being in separate crates families of algorithms can be used generically with a common trait-based API.

I might try experimentally extracting this crate into a couple of "RustCrypto"-style crates and opening some PRs.

If we were to move forward with something like that though, I'd sure like to do it with @cesarb's blessing!

cesarb commented 6 years ago

@tarcieri Sure, you can go ahead! This is exactly what was done for his blake2 crate, which is (with my blessing) a lightly modified copy of my blake2-rfc crate.