-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Labels
cipherBlock and stream cipher crateBlock and stream cipher crate
Description
Threefish is an example of tweakable block cipher, thus ideally we need an appropriate trait for it.
One option is to use something like this:
pub trait TweakableBlockCipher {
type BlockSize: ArrayLength<u8>;
type TweakSize: ArrayLength<u8>;
fn encrypt(&self, b: &mut Block<Self::BlockSize>, t: &Block<Self::TweakSize>);
fn decrypt(&self, b: &mut Block<Self::BlockSize>, t: &Block<Self::TweakSize>);
}Additional context can be found in the previous issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cipherBlock and stream cipher crateBlock and stream cipher crate