-
Notifications
You must be signed in to change notification settings - Fork 225
Open
Labels
cipherBlock and stream cipher crateBlock and stream cipher crate
Description
Some hardware implementations (e.g. of AES) need particular alignment of blocks to operate directly over AHB (e.g. NXP LPC55's HASHCRYPT wants 32-bit alignment, I can imagine this is a typical case for ARM microcontrollers). If a large chunk of data needs to be en/de-crypted that's aligned, it would be neat to pass this information through on the type level to avoid stack copies for each block.
The aligned
crate (which is sadly missing an A1
type) would be one approach to do it, set
pub type Block<B> = aligned::Aligned<
<B as BlockCipher>::BlockAlignment,
GenericArray<u8, <B as BlockCipher>::BlockSize>
>;
Splitting this out from #43 for possible discussion.
Metadata
Metadata
Assignees
Labels
cipherBlock and stream cipher crateBlock and stream cipher crate