-
Notifications
You must be signed in to change notification settings - Fork 143
Closed
Description
Recently added Threefish is a tweakable block cipher, thus we need an appropriate trait for it.
Currently I am thinking of using this:
pub trait TweakableBlockCipher {
type BlockSize: ArrayLength<u8>;
type TweakSize: ArrayLength<u8>;
fn encrypt(&self, block: &mut Block<Self::BlockSize>, tweak: &Block<Self::TweakSize>);
fn decrypt(&self, block: &mut Block<Self::BlockSize>, tweak: &Block<Self::TweakSize>);
}In addition to it I think tweakable ciphers should auto implement BlockCipher using zero tweak.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels