From c040d3d514181b19da0d14e7b36e7aaa83264293 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Fri, 27 Sep 2024 16:53:13 -0700 Subject: [PATCH] bump [aes, cipher, pmac, cmac] dependencies (#632) - aes 0.9.0-pre.1 -> 0.9.0-pre.2 - cipher 0.5.0-pre.6 -> 0.5.0-pre.7 - cmac 0.8.0-pre.1 -> 0.8.0-pre.2 - pmac 0.8.0-pre.1 -> 0.8.0-pre.2 --- .github/workflows/aes-gcm-siv.yml | 2 +- .github/workflows/aes-gcm.yml | 2 +- Cargo.lock | 23 +++++++++++------------ Cargo.toml | 4 ++++ aes-gcm-siv/Cargo.toml | 8 ++++---- aes-gcm-siv/src/lib.rs | 16 ++++++++-------- aes-gcm/Cargo.toml | 8 ++++---- aes-gcm/src/lib.rs | 8 ++++---- aes-siv/Cargo.toml | 8 ++++---- aes-siv/src/lib.rs | 8 ++++---- aes-siv/src/siv.rs | 12 ++++++------ ccm/Cargo.toml | 6 +++--- ccm/src/lib.rs | 21 ++++++++++----------- chacha20poly1305/Cargo.toml | 2 +- deoxys/Cargo.toml | 2 +- eax/Cargo.toml | 8 ++++---- eax/src/lib.rs | 15 ++++++++------- eax/src/online.rs | 23 ++++++++++++----------- ocb3/Cargo.toml | 6 +++--- ocb3/src/lib.rs | 3 ++- 20 files changed, 95 insertions(+), 90 deletions(-) diff --git a/.github/workflows/aes-gcm-siv.yml b/.github/workflows/aes-gcm-siv.yml index c5c2e581..68fa4a70 100644 --- a/.github/workflows/aes-gcm-siv.yml +++ b/.github/workflows/aes-gcm-siv.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.65.0 # MSRV + - 1.72.0 # MSRV - stable target: - armv7a-none-eabi diff --git a/.github/workflows/aes-gcm.yml b/.github/workflows/aes-gcm.yml index c371627f..5d03b0c8 100644 --- a/.github/workflows/aes-gcm.yml +++ b/.github/workflows/aes-gcm.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.65.0 # MSRV + - 1.72.0 # MSRV - stable target: - armv7a-none-eabi diff --git a/Cargo.lock b/Cargo.lock index eb9addf8..09174617 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.9.0-pre.1" +version = "0.9.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3b4639f8f7237857117abb74f3dc8648b77e67ff78d9cb6959fd7e76f387" +checksum = "e7856582c758ade85d71daf27ec6bcea6c1c73913692b07b8dffea2dc03531c9" dependencies = [ "cfg-if", "cipher", @@ -161,8 +161,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" version = "0.10.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6a99ac5abed8864eaedd3b95efdab3e10f41f008f0967bb9c53b093eeb3c62" +source = "git+https://github.com/RustCrypto/stream-ciphers.git#9fcbf802c3ec29672f6fa2f22fc6ac1abce24996" dependencies = [ "cfg-if", "cipher", @@ -183,9 +182,9 @@ dependencies = [ [[package]] name = "cipher" -version = "0.5.0-pre.6" +version = "0.5.0-pre.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71c893d5a1e8257048dbb29954d2e1f85f091a150304f1defe4ca2806da5d3f" +checksum = "5b1425e6ce000f05a73096556cabcfb6a10a3ffe3bb4d75416ca8f00819c0b6a" dependencies = [ "crypto-common", "inout", @@ -193,9 +192,9 @@ dependencies = [ [[package]] name = "cmac" -version = "0.8.0-pre.1" +version = "0.8.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16deb366a100cbd9ecd84d1ec674168385f769c95ec3841179663b0f2e6ff4b1" +checksum = "02a53c8815f718726c448e4e83b86806245fb37bfaa82ad50893d9f01ad3a503" dependencies = [ "cipher", "dbl", @@ -224,9 +223,9 @@ dependencies = [ [[package]] name = "ctr" -version = "0.10.0-pre.1" +version = "0.10.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f1637b299862a663dd5af70ee109d53555eff68b99b454fe535ed6599b0e9b3" +checksum = "77e1482d284b80d7fddb211666d513dc5e23b0cc3a03ad398ff70543827c789f" dependencies = [ "cipher", ] @@ -367,9 +366,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "pmac" -version = "0.8.0-pre.1" +version = "0.8.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b944724c703d6337fd6fe54f72a24e56565efcf64a67b77364eaeabfe7a4c10c" +checksum = "943dc8a86690cc9d8049e5b9597762a99baa240e1a9a90facc65012799764e3f" dependencies = [ "cipher", "dbl", diff --git a/Cargo.toml b/Cargo.toml index d6f1c0df..0ce36247 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,3 +12,7 @@ members = [ "ocb3", ] resolver = "2" + +[patch.crates-io] +# https://github.com/RustCrypto/stream-ciphers/pull/368 +chacha20 = { git = "https://github.com/RustCrypto/stream-ciphers.git" } diff --git a/aes-gcm-siv/Cargo.toml b/aes-gcm-siv/Cargo.toml index f3c4c6b7..e597e3c6 100644 --- a/aes-gcm-siv/Cargo.toml +++ b/aes-gcm-siv/Cargo.toml @@ -14,13 +14,13 @@ documentation = "https://docs.rs/aes-gcm-siv" repository = "https://github.com/RustCrypto/AEADs" keywords = ["aead", "aes", "aes-gcm", "encryption", "siv"] categories = ["cryptography", "no-std"] -rust-version = "1.65" +rust-version = "1.72" [dependencies] aead = { version = "0.6.0-rc.0", default-features = false } -aes = { version = "=0.9.0-pre.1", optional = true } -cipher = "=0.5.0-pre.6" -ctr = "=0.10.0-pre.1" +aes = { version = "=0.9.0-pre.2", optional = true } +cipher = "=0.5.0-pre.7" +ctr = "0.10.0-pre.2" polyval = { version = "0.7.0-rc.0", default-features = false } subtle = { version = "2", default-features = false } zeroize = { version = "1", default-features = false } diff --git a/aes-gcm-siv/src/lib.rs b/aes-gcm-siv/src/lib.rs index 29ee1d71..ee614c59 100644 --- a/aes-gcm-siv/src/lib.rs +++ b/aes-gcm-siv/src/lib.rs @@ -92,7 +92,7 @@ pub use aes; use cipher::{ array::Array, consts::{U0, U12, U16}, - BlockCipher, BlockCipherEncrypt, InnerIvInit, StreamCipherCore, + BlockCipherEncrypt, BlockSizeUser, InnerIvInit, StreamCipherCore, }; use polyval::{universal_hash::UniversalHash, Polyval}; use zeroize::Zeroize; @@ -143,7 +143,7 @@ where impl KeyInit for AesGcmSiv where - Aes: BlockCipher + BlockCipherEncrypt + KeyInit, + Aes: BlockSizeUser + BlockCipherEncrypt + KeyInit, { fn new(key_bytes: &Key) -> Self { Self { @@ -154,7 +154,7 @@ where impl From for AesGcmSiv where - Aes: BlockCipher + BlockCipherEncrypt, + Aes: BlockSizeUser + BlockCipherEncrypt, { fn from(key_generating_key: Aes) -> Self { Self { key_generating_key } @@ -163,7 +163,7 @@ where impl AeadCore for AesGcmSiv where - Aes: BlockCipher + BlockCipherEncrypt + KeyInit, + Aes: BlockSizeUser + BlockCipherEncrypt + KeyInit, { type NonceSize = U12; type TagSize = U16; @@ -172,7 +172,7 @@ where impl AeadInPlace for AesGcmSiv where - Aes: BlockCipher + BlockCipherEncrypt + KeyInit, + Aes: BlockSizeUser + BlockCipherEncrypt + KeyInit, { fn encrypt_in_place_detached( &self, @@ -202,7 +202,7 @@ where /// AES-GCM-SIV: Misuse-Resistant Authenticated Encryption Cipher (RFC8452). struct Cipher where - Aes: BlockCipher + BlockCipherEncrypt, + Aes: BlockSizeUser + BlockCipherEncrypt, { /// Encryption cipher. enc_cipher: Aes, @@ -216,7 +216,7 @@ where impl Cipher where - Aes: BlockCipher + BlockCipherEncrypt + KeyInit, + Aes: BlockSizeUser + BlockCipherEncrypt + KeyInit, { /// Initialize AES-GCM-SIV, deriving per-nonce message-authentication and /// message-encryption keys. @@ -352,7 +352,7 @@ where #[inline] fn init_ctr(cipher: Aes, nonce: &cipher::Block) -> Ctr32LE where - Aes: BlockCipher + BlockCipherEncrypt, + Aes: BlockSizeUser + BlockCipherEncrypt, { let mut counter_block = *nonce; counter_block[15] |= 0x80; diff --git a/aes-gcm/Cargo.toml b/aes-gcm/Cargo.toml index f9bedcd5..0a680061 100644 --- a/aes-gcm/Cargo.toml +++ b/aes-gcm/Cargo.toml @@ -14,13 +14,13 @@ documentation = "https://docs.rs/aes-gcm" repository = "https://github.com/RustCrypto/AEADs" keywords = ["aead", "aes", "encryption", "gcm", "ghash"] categories = ["cryptography", "no-std"] -rust-version = "1.65" +rust-version = "1.72" [dependencies] aead = { version = "0.6.0-rc.0", default-features = false } -aes = { version = "=0.9.0-pre.1", optional = true } -cipher = "=0.5.0-pre.6" -ctr = "=0.10.0-pre.1" +aes = { version = "=0.9.0-pre.2", optional = true } +cipher = "=0.5.0-pre.7" +ctr = "0.10.0-pre.2" ghash = { version = "0.6.0-rc.0", default-features = false } subtle = { version = "2", default-features = false } zeroize = { version = "1", optional = true, default-features = false } diff --git a/aes-gcm/src/lib.rs b/aes-gcm/src/lib.rs index feb8902a..cbb94e6b 100644 --- a/aes-gcm/src/lib.rs +++ b/aes-gcm/src/lib.rs @@ -118,7 +118,7 @@ pub use aes; use cipher::{ array::{Array, ArraySize}, consts::{U0, U16}, - BlockCipher, BlockCipherEncrypt, BlockSizeUser, InnerIvInit, StreamCipherCore, + BlockCipherEncrypt, BlockSizeUser, InnerIvInit, StreamCipherCore, }; use core::marker::PhantomData; use ghash::{universal_hash::UniversalHash, GHash}; @@ -152,7 +152,7 @@ pub trait TagSize: private::SealedTagSize {} impl TagSize for T {} mod private { - use cipher::{array::ArraySize, consts, Unsigned}; + use cipher::{array::ArraySize, consts, typenum::Unsigned}; // Sealed traits stop other crates from implementing any traits that use it. pub trait SealedTagSize: ArraySize + Unsigned {} @@ -268,7 +268,7 @@ where impl AeadInPlace for AesGcm where - Aes: BlockCipher + BlockSizeUser + BlockCipherEncrypt, + Aes: BlockSizeUser + BlockCipherEncrypt, NonceSize: ArraySize, TagSize: self::TagSize, { @@ -321,7 +321,7 @@ where impl AesGcm where - Aes: BlockCipher + BlockSizeUser + BlockCipherEncrypt, + Aes: BlockSizeUser + BlockCipherEncrypt, NonceSize: ArraySize, TagSize: self::TagSize, { diff --git a/aes-siv/Cargo.toml b/aes-siv/Cargo.toml index 23d24258..84a3b7d7 100644 --- a/aes-siv/Cargo.toml +++ b/aes-siv/Cargo.toml @@ -18,10 +18,10 @@ rust-version = "1.72" [dependencies] aead = "0.6.0-rc.0" -aes = "=0.9.0-pre.1" -cipher = "=0.5.0-pre.6" -cmac = "=0.8.0-pre.1" -ctr = "=0.10.0-pre.1" +aes = "=0.9.0-pre.2" +cipher = "=0.5.0-pre.7" +cmac = "0.8.0-pre.2" +ctr = "0.10.0-pre.2" dbl = "0.4.0-rc.0" digest = { version = "=0.11.0-pre.9", features = ["mac"] } zeroize = { version = "1", default-features = false } diff --git a/aes-siv/src/lib.rs b/aes-siv/src/lib.rs index 74cfe44a..9b01b90e 100644 --- a/aes-siv/src/lib.rs +++ b/aes-siv/src/lib.rs @@ -98,7 +98,7 @@ use aead::{ Buffer, }; use aes::{Aes128, Aes256}; -use cipher::{typenum::IsGreaterOrEqual, ArraySize, BlockCipher, BlockCipherEncrypt}; +use cipher::{array::ArraySize, typenum::IsGreaterOrEqual, BlockCipherEncrypt, BlockSizeUser}; use cmac::Cmac; use core::{marker::PhantomData, ops::Add}; use digest::{FixedOutputReset, Mac}; @@ -121,7 +121,7 @@ pub type Tag = Array; pub struct SivAead where Self: KeySizeUser, - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac + FixedOutputReset + KeyInit, ::KeySize: Add, NonceSize: ArraySize + IsGreaterOrEqual, @@ -199,7 +199,7 @@ where impl AeadCore for SivAead where Self: KeySizeUser, - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac + FixedOutputReset + KeyInit, ::KeySize: Add, NonceSize: ArraySize + IsGreaterOrEqual, @@ -217,7 +217,7 @@ impl AeadInPlace for SivAead where Self: KeySizeUser, Siv: KeyInit + KeySizeUser::KeySize>, - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac + FixedOutputReset + KeyInit, ::KeySize: Add, NonceSize: ArraySize + IsGreaterOrEqual, diff --git a/aes-siv/src/siv.rs b/aes-siv/src/siv.rs index be754ff0..380db74d 100644 --- a/aes-siv/src/siv.rs +++ b/aes-siv/src/siv.rs @@ -75,7 +75,7 @@ use aead::{ }; use aes::{Aes128, Aes256}; use cipher::{ - BlockCipher, BlockCipherEncrypt, InnerIvInit, Key, KeyInit, KeySizeUser, StreamCipherCore, + BlockCipherEncrypt, BlockSizeUser, InnerIvInit, Key, KeyInit, KeySizeUser, StreamCipherCore, }; use cmac::Cmac; use core::ops::Add; @@ -105,7 +105,7 @@ pub type KeySize = <::KeySize as Add>::Output; /// authenticated encryption (MRAE). pub struct Siv where - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac, { encryption_key: Key, @@ -138,7 +138,7 @@ pub type Aes256PmacSiv = PmacSiv; impl KeySizeUser for Siv where - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac + FixedOutputReset + KeyInit, ::KeySize: Add, KeySize: ArraySize, @@ -148,7 +148,7 @@ where impl KeyInit for Siv where - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac + FixedOutputReset + KeyInit, ::KeySize: Add, KeySize: ArraySize, @@ -168,7 +168,7 @@ where impl Siv where - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac + FixedOutputReset + KeyInit, { /// Encrypt the given plaintext, allocating and returning a `Vec` for @@ -325,7 +325,7 @@ where impl Drop for Siv where - C: BlockCipher + BlockCipherEncrypt + KeyInit + KeySizeUser, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit + KeySizeUser, M: Mac, { fn drop(&mut self) { diff --git a/ccm/Cargo.toml b/ccm/Cargo.toml index 0ebf7311..d90ce885 100644 --- a/ccm/Cargo.toml +++ b/ccm/Cargo.toml @@ -15,13 +15,13 @@ rust-version = "1.65" [dependencies] aead = { version = "0.6.0-rc.0", default-features = false } -cipher = { version = "=0.5.0-pre.6", default-features = false } -ctr = { version = "=0.10.0-pre.1", default-features = false } +cipher = { version = "=0.5.0-pre.7", default-features = false } +ctr = { version = "0.10.0-pre.2", default-features = false } subtle = { version = "2", default-features = false } [dev-dependencies] aead = { version = "0.6.0-rc.0", features = ["dev"], default-features = false } -aes = { version = "=0.9.0-pre.1" } +aes = { version = "=0.9.0-pre.2" } hex-literal = "0.4.1" [features] diff --git a/ccm/src/lib.rs b/ccm/src/lib.rs index 77114363..364ec01d 100644 --- a/ccm/src/lib.rs +++ b/ccm/src/lib.rs @@ -49,8 +49,7 @@ use aead::{ consts::{U0, U16}, }; use cipher::{ - Block, BlockCipher, BlockCipherEncrypt, BlockSizeUser, InnerIvInit, StreamCipher, - StreamCipherSeek, + Block, BlockCipherEncrypt, BlockSizeUser, InnerIvInit, StreamCipher, StreamCipherSeek, }; use core::marker::PhantomData; use ctr::{Ctr32BE, Ctr64BE, CtrCore}; @@ -95,7 +94,7 @@ impl NonceSize for T {} #[derive(Clone)] pub struct Ccm where - C: BlockCipher + BlockSizeUser + BlockCipherEncrypt, + C: BlockSizeUser + BlockCipherEncrypt, M: ArraySize + TagSize, N: ArraySize + NonceSize, { @@ -105,7 +104,7 @@ where impl Ccm where - C: BlockCipher + BlockSizeUser + BlockCipherEncrypt, + C: BlockSizeUser + BlockCipherEncrypt, M: ArraySize + TagSize, N: ArraySize + NonceSize, { @@ -171,7 +170,7 @@ where impl From for Ccm where - C: BlockCipher + BlockSizeUser + BlockCipherEncrypt, + C: BlockSizeUser + BlockCipherEncrypt, M: ArraySize + TagSize, N: ArraySize + NonceSize, { @@ -185,7 +184,7 @@ where impl KeySizeUser for Ccm where - C: BlockCipher + BlockSizeUser + BlockCipherEncrypt + KeyInit, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit, M: ArraySize + TagSize, N: ArraySize + NonceSize, { @@ -194,7 +193,7 @@ where impl KeyInit for Ccm where - C: BlockCipher + BlockSizeUser + BlockCipherEncrypt + KeyInit, + C: BlockSizeUser + BlockCipherEncrypt + KeyInit, M: ArraySize + TagSize, N: ArraySize + NonceSize, { @@ -205,7 +204,7 @@ where impl AeadCore for Ccm where - C: BlockCipher + BlockSizeUser + BlockCipherEncrypt, + C: BlockSizeUser + BlockCipherEncrypt, M: ArraySize + TagSize, N: ArraySize + NonceSize, { @@ -216,7 +215,7 @@ where impl AeadInPlace for Ccm where - C: BlockCipher + BlockSizeUser + BlockCipherEncrypt, + C: BlockSizeUser + BlockCipherEncrypt, M: ArraySize + TagSize, N: ArraySize + NonceSize, { @@ -285,14 +284,14 @@ where } } -struct CbcMac<'a, C: BlockCipher + BlockCipherEncrypt> { +struct CbcMac<'a, C: BlockCipherEncrypt> { cipher: &'a C, state: Block, } impl<'a, C> CbcMac<'a, C> where - C: BlockCipher + BlockCipherEncrypt, + C: BlockCipherEncrypt, { fn from_cipher(cipher: &'a C) -> Self { Self { diff --git a/chacha20poly1305/Cargo.toml b/chacha20poly1305/Cargo.toml index 24ad4c59..c458ea15 100644 --- a/chacha20poly1305/Cargo.toml +++ b/chacha20poly1305/Cargo.toml @@ -22,7 +22,7 @@ rust-version = "1.65" [dependencies] aead = { version = "0.6.0-rc.0", default-features = false } chacha20 = { version = "=0.10.0-pre.1", default-features = false, features = ["xchacha", "zeroize"] } -cipher = "=0.5.0-pre.6" +cipher = "=0.5.0-pre.7" poly1305 = "0.9.0-rc.0" zeroize = { version = "1.8", default-features = false } diff --git a/deoxys/Cargo.toml b/deoxys/Cargo.toml index 1aedef4d..385b1d78 100644 --- a/deoxys/Cargo.toml +++ b/deoxys/Cargo.toml @@ -19,7 +19,7 @@ rust-version = "1.72" [dependencies] aead = { version = "0.6.0-rc.0", default-features = false } -aes = { version = "=0.9.0-pre.1", features = ["hazmat"], default-features = false } +aes = { version = "=0.9.0-pre.2", features = ["hazmat"], default-features = false } subtle = { version = "2", default-features = false } zeroize = { version = "1", default-features = false } diff --git a/eax/Cargo.toml b/eax/Cargo.toml index 04996764..34993f2d 100644 --- a/eax/Cargo.toml +++ b/eax/Cargo.toml @@ -21,14 +21,14 @@ rust-version = "1.71" [dependencies] aead = { version = "0.6.0-rc.0", default-features = false } -cipher = "=0.5.0-pre.6" -cmac = "=0.8.0-pre.1" -ctr = "=0.10.0-pre.1" +cipher = "=0.5.0-pre.7" +cmac = "0.8.0-pre.2" +ctr = "0.10.0-pre.2" subtle = { version = "2", default-features = false } [dev-dependencies] aead = { version = "0.6.0-rc.0", features = ["dev"], default-features = false } -aes = "=0.9.0-pre.1" +aes = "=0.9.0-pre.2" [features] default = ["alloc", "getrandom"] diff --git a/eax/src/lib.rs b/eax/src/lib.rs index 67a3655f..1323bd73 100644 --- a/eax/src/lib.rs +++ b/eax/src/lib.rs @@ -131,7 +131,8 @@ use cipher::{ array::Array, consts::{U0, U16}, crypto_common::OutputSizeUser, - BlockCipher, BlockCipherEncrypt, InnerIvInit, StreamCipherCore, Unsigned, + typenum::Unsigned, + BlockCipherEncrypt, BlockSizeUser, InnerIvInit, StreamCipherCore, }; use cmac::{digest::Output, Cmac, Mac}; use core::marker::PhantomData; @@ -175,7 +176,7 @@ type Ctr128BE = ctr::CtrCore; #[derive(Clone)] pub struct Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { /// Encryption key @@ -185,7 +186,7 @@ where impl KeySizeUser for Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { type KeySize = Cipher::KeySize; @@ -193,7 +194,7 @@ where impl KeyInit for Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { fn new(key: &Key) -> Self { @@ -206,7 +207,7 @@ where impl AeadCore for Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { type NonceSize = Cipher::BlockSize; @@ -216,7 +217,7 @@ where impl AeadInPlace for Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { fn encrypt_in_place_detached( @@ -311,7 +312,7 @@ where impl Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { /// CMAC/OMAC1 diff --git a/eax/src/online.rs b/eax/src/online.rs index 334b14e4..3498a951 100644 --- a/eax/src/online.rs +++ b/eax/src/online.rs @@ -60,7 +60,8 @@ use crate::{Cmac, Error, Nonce, Tag, TagSize}; use aead::consts::U16; use cipher::{ - array::Array, BlockCipher, BlockCipherEncrypt, Key, KeyInit, KeyIvInit, StreamCipher, Unsigned, + array::Array, typenum::Unsigned, BlockCipherEncrypt, BlockSizeUser, Key, KeyInit, KeyIvInit, + StreamCipher, }; use cmac::Mac; use core::marker::PhantomData; @@ -149,7 +150,7 @@ impl CipherOp for Decrypt {} /// [`finish`]: #method.finish pub struct Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, Op: CipherOp, M: TagSize, { @@ -160,7 +161,7 @@ where impl Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, Op: CipherOp, M: TagSize, { @@ -195,7 +196,7 @@ where impl Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { /// Applies encryption to the plaintext. @@ -216,7 +217,7 @@ where impl Eax where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { /// Applies decryption to the ciphertext **without** verifying the @@ -264,7 +265,7 @@ where #[doc(hidden)] struct EaxImpl where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { @@ -280,7 +281,7 @@ where impl EaxImpl where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { /// Creates a stateful EAX instance that is capable of processing both @@ -407,7 +408,7 @@ mod test_impl { impl KeySizeUser for EaxImpl where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { type KeySize = Cipher::KeySize; @@ -415,7 +416,7 @@ mod test_impl { impl KeyInit for EaxImpl where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { fn new(key: &Key) -> Self { @@ -432,7 +433,7 @@ mod test_impl { impl AeadCore for super::EaxImpl where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { type NonceSize = Cipher::BlockSize; @@ -442,7 +443,7 @@ mod test_impl { impl AeadMutInPlace for super::EaxImpl where - Cipher: BlockCipher + BlockCipherEncrypt + Clone + KeyInit, + Cipher: BlockSizeUser + BlockCipherEncrypt + Clone + KeyInit, M: TagSize, { fn encrypt_in_place_detached( diff --git a/ocb3/Cargo.toml b/ocb3/Cargo.toml index e4b221b2..ada9400b 100644 --- a/ocb3/Cargo.toml +++ b/ocb3/Cargo.toml @@ -17,15 +17,15 @@ rust-version = "1.72" [dependencies] aead = { version = "0.6.0-rc.0", default-features = false } -cipher = "=0.5.0-pre.6" -ctr = "=0.10.0-pre.1" +cipher = "=0.5.0-pre.7" +ctr = "0.10.0-pre.2" dbl = "=0.4.0-rc.0" subtle = { version = "2", default-features = false } zeroize = { version = "1", optional = true, default-features = false } [dev-dependencies] aead = { version = "0.6.0-rc.0", features = ["dev"], default-features = false } -aes = { version = "=0.9.0-pre.1", default-features = false } +aes = { version = "=0.9.0-pre.2", default-features = false } hex-literal = "0.4" [features] diff --git a/ocb3/src/lib.rs b/ocb3/src/lib.rs index 01fb8396..2cfea945 100644 --- a/ocb3/src/lib.rs +++ b/ocb3/src/lib.rs @@ -22,7 +22,8 @@ pub use aead::{ use aead::array::ArraySize; use cipher::{ consts::{U0, U12, U16}, - BlockCipherDecrypt, BlockCipherEncrypt, BlockSizeUser, Unsigned, + typenum::Unsigned, + BlockCipherDecrypt, BlockCipherEncrypt, BlockSizeUser, }; use core::marker::PhantomData; use dbl::Dbl;