martindisch / aes-ccm

Rust port of TinyCrypt's CCM mode implementation using RustCrypto's AES
Other
13 stars 4 forks source link

Consider using traits from the `aead` crate? #2

Closed tarcieri closed 4 years ago

tarcieri commented 4 years ago

Hello! Glad to see there's a Rust implementation of aes-ccm, which I may consider using soon for a particular project.

The aead crate provides traits which abstract over various AEAD modes:

https://github.com/RustCrypto/traits/tree/master/aead

Namely the Aead (and AeadMut) traits:

https://docs.rs/aead/latest/aead/trait.Aead.html

As of the 0.2 release, they now support an optional alloc feature (in addition to always being #![no_std]) along with a heapless feature to support usage in heapless (e.g. microcontroller) environments.

Is this something you'd be interested in using? If so, I can send a PR.

martindisch commented 4 years ago

Hi Tony, I'm very happy you're interested in doing that. When I first ported this, I did check the RustCrypto traits to see if I could use something like that to provide a reusable interface, but at the time they weren't around yet. Since you're the one who designed them in the first place, you're of course the perfect person to implement them, so I'll gladly accept any related PRs.

tarcieri commented 4 years ago

Awesome! I also have an open PR to mention heapless AEAD support in the rust-embedded newsletter. Mind if I link to this issue in case people are interested in aes-ccm too?

martindisch commented 4 years ago

Sure thing! I haven't discovered that newsletter yet, it's nice to see people pushing embedded Rust forward.

tarcieri commented 4 years ago

Opened a draft PR for discussion: https://github.com/martindisch/aes-ccm/pull/3

tarcieri commented 4 years ago

Closing this as #3 is merged

tarcieri commented 4 years ago

@martindisch thanks for merging the PR! I added a link to your crate from the README.md here:

https://github.com/RustCrypto/AEADs

martindisch commented 4 years ago

Thanks, that will make it easier to find for people who need it.