snow icon indicating copy to clipboard operation
snow copied to clipboard

Consider `aead::Aead` as an alternative to (or building block for) `Cipher`

Open tarcieri opened this issue 5 years ago • 4 comments

The aead crate provides abstractions for AEAD algorithms (including no_std-friendly ones) with several implementations including adapters for the AEAD algorithms in ring.

Aside from the rekey method, it seems like it's close to a drop-in replacement for the existing Cipher trait.

tarcieri avatar Jan 27 '20 14:01 tarcieri

Thanks for the issue @tarcieri!

These types should hardly be touched except for the rare cases where people need to implement their own providers of crypto algorithms not provided by snow itself, so I'm not sure if I can currently justify the extra dependency in my head, especially if only Cipher gets this treatment, and we don't also start relying on RngCore to replace Random, etc.

mcginty avatar Feb 06 '20 15:02 mcginty

Currently, snow already depends on crates which depend on aead, so this wouldn't really change the amount of crates pulled in.

fogti avatar Mar 30 '20 19:03 fogti

There is one problem with using the aead crate's traits for Snow's purposes right now: they aren't object safe, but easily could be with some small changes.

tarcieri avatar Mar 30 '20 20:03 tarcieri

that specific issue with aead is fixed now.

fogti avatar May 30 '20 22:05 fogti