Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ members = [

[profile.dev]
opt-level = 2

[patch.crates-io]
crypto-common = { git = "https://github.com/RustCrypto/traits", branch = "block_sizes" }
cipher = { git = "https://github.com/RustCrypto/traits", branch = "block_sizes" }
31 changes: 15 additions & 16 deletions rc5/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use cipher::{
BlockCipherEncBackend, BlockCipherEncClosure, BlockCipherEncrypt, BlockSizeUser, KeyInit,
KeySizeUser, ParBlocksSizeUser,
array::ArraySize,
common::BlockSizes,
consts::{U1, U2, U256},
inout::InOut,
typenum::{Diff, IsLess, Le, NonZero, Sum, Unsigned},
Expand Down Expand Up @@ -51,7 +50,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand All @@ -70,7 +69,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down Expand Up @@ -156,7 +155,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down Expand Up @@ -187,7 +186,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down Expand Up @@ -219,7 +218,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand All @@ -238,7 +237,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand All @@ -256,7 +255,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand All @@ -274,7 +273,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down Expand Up @@ -303,7 +302,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down Expand Up @@ -344,7 +343,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down Expand Up @@ -373,7 +372,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down Expand Up @@ -414,7 +413,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand All @@ -440,7 +439,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand All @@ -467,7 +466,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand All @@ -484,7 +483,7 @@ where
W: Word,
// Block size
W::Bytes: Mul<U2>,
BlockSize<W>: BlockSizes,
BlockSize<W>: ArraySize,
// Rounds range
R: Unsigned,
R: IsLess<U256>,
Expand Down
3 changes: 1 addition & 2 deletions rc5/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use core::ops::{Add, BitXor, Mul};

use cipher::{
array::{Array, ArraySize},
common::BlockSizes,
typenum::{Diff, Prod, Quot, Sum, U1, U2, U4, U8, U16},
};

Expand All @@ -20,7 +19,7 @@ pub type KeyAsWordsSize<W, B> = Quot<Diff<Sum<B, <W as Word>::Bytes>, U1>, <W as
pub trait Word
where
Self: Default + Copy + From<u8> + Add<Output = Self> + Default + private::Sealed,
BlockSize<Self>: BlockSizes,
BlockSize<Self>: ArraySize,
{
type Bytes: ArraySize + Mul<U2>;

Expand Down
Loading