RustCrypto / traits

Collection of cryptography-related traits
579 stars 189 forks source link

aead: move STREAM implementation into a separate crate? #1665

Closed newpavlov closed 1 month ago

newpavlov commented 1 month ago

STREAM is an authenticated encryption construction. In future we may support other similar constructions and it feels a bit weird to have an algorithm implementation in a trait crate. I suggest to move the implementation into a separate crate which will be developed in the AEADs repository. Doing so will also reduce number of crate features in the aead crate. For better discoverability we can mention the new crate in aead docs.

UPD: I see that we already have the aead-stream crate registered.

tarcieri commented 1 month ago

it feels a bit weird to have an algorithm implementation in a trait crate.

It also has important trait components: https://docs.rs/aead/latest/aead/stream/trait.StreamPrimitive.html

In future we may support other similar constructions

Well, that trait is designed to not only support a family of similar constructions, but even makes it possible to plug in your own.

That said, I'm not opposed to extracting an aead-stream crate.