Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poly1305 #29

Closed
tarcieri opened this issue Aug 13, 2019 · 5 comments
Closed

Poly1305 #29

tarcieri opened this issue Aug 13, 2019 · 5 comments

Comments

@tarcieri
Copy link
Member

tarcieri commented Aug 13, 2019

Seems like we have fairly reasonable ChaCha20 crates and Salsa20 crates now, and I see newpavlov snagged https://crates.io/crates/poly1305

A poly1305 crate seems like the next logical step, but where should it go? Right now I think the closest fit is https://github.com/RustCrypto/hashes but that seems a little weird

Should we stick it under hashes, or do we need a new toplevel project like universal-hashes or one-time-authenticators?

As it were, I have a mostly complete (but completely untested) Rust implementation of POLYVAL that needs a home and could be located in the same place: https://github.com/miscreant/miscreant.rs/blob/047ae8b3fd68d62eeb1e8510110439ba24473df3/src/polyval.rs

@newpavlov
Copy link
Member

Shouldn't it go to the RustCrypto/MACs repo? It's already listed in RustCrypto/MACs#1.

@tarcieri
Copy link
Member Author

tarcieri commented Aug 13, 2019

@newpavlov I guess that works, except Poly1305 in and of itself is not a MAC... to be used as a MAC in and of itself it needs to be paired with a cipher ala Poly1305-AES (ditto for POLYVAL/GHASH vs GMAC)

Given the main use is as a building block for a MAC, I suppose RustCrypto/MAC is the best place. I just worry someone will try to abuse a universal hash function as a MAC, but perhaps we can appropriately label them.

@newpavlov
Copy link
Member

Can't we implement Mac trait only for a structure generic over StreamCipher/BlockCipher? I don't have exact API in mind, but I think it should be doable.

@tarcieri
Copy link
Member Author

@newpavlov sure, that sounds good.

@tarcieri
Copy link
Member Author

PR to add Poly1305 to RustCrypto/MACs here: RustCrypto/MACs#12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants