Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump [aes, cipher, pmac, cmac] dependencies #632

Merged
merged 2 commits into from
Sep 27, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/aes-gcm-siv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.65.0 # MSRV
- 1.72.0 # MSRV
- stable
target:
- armv7a-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aes-gcm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.65.0 # MSRV
- 1.72.0 # MSRV
- stable
target:
- armv7a-none-eabi
Expand Down
23 changes: 11 additions & 12 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 @@ -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" }
8 changes: 4 additions & 4 deletions aes-gcm-siv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
16 changes: 8 additions & 8 deletions aes-gcm-siv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -143,7 +143,7 @@ where

impl<Aes> KeyInit for AesGcmSiv<Aes>
where
Aes: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
{
fn new(key_bytes: &Key<Self>) -> Self {
Self {
Expand All @@ -154,7 +154,7 @@ where

impl<Aes> From<Aes> for AesGcmSiv<Aes>
where
Aes: BlockCipher<BlockSize = U16> + BlockCipherEncrypt,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
{
fn from(key_generating_key: Aes) -> Self {
Self { key_generating_key }
Expand All @@ -163,7 +163,7 @@ where

impl<Aes> AeadCore for AesGcmSiv<Aes>
where
Aes: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
{
type NonceSize = U12;
type TagSize = U16;
Expand All @@ -172,7 +172,7 @@ where

impl<Aes> AeadInPlace for AesGcmSiv<Aes>
where
Aes: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
{
fn encrypt_in_place_detached(
&self,
Expand Down Expand Up @@ -202,7 +202,7 @@ where
/// AES-GCM-SIV: Misuse-Resistant Authenticated Encryption Cipher (RFC8452).
struct Cipher<Aes>
where
Aes: BlockCipher<BlockSize = U16> + BlockCipherEncrypt,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
{
/// Encryption cipher.
enc_cipher: Aes,
Expand All @@ -216,7 +216,7 @@ where

impl<Aes> Cipher<Aes>
where
Aes: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
{
/// Initialize AES-GCM-SIV, deriving per-nonce message-authentication and
/// message-encryption keys.
Expand Down Expand Up @@ -352,7 +352,7 @@ where
#[inline]
fn init_ctr<Aes>(cipher: Aes, nonce: &cipher::Block<Aes>) -> Ctr32LE<Aes>
where
Aes: BlockCipher<BlockSize = U16> + BlockCipherEncrypt,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
{
let mut counter_block = *nonce;
counter_block[15] |= 0x80;
Expand Down
8 changes: 4 additions & 4 deletions aes-gcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
8 changes: 4 additions & 4 deletions aes-gcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -152,7 +152,7 @@ pub trait TagSize: private::SealedTagSize {}
impl<T: private::SealedTagSize> 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 {}
Expand Down Expand Up @@ -268,7 +268,7 @@ where

impl<Aes, NonceSize, TagSize> AeadInPlace for AesGcm<Aes, NonceSize, TagSize>
where
Aes: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
NonceSize: ArraySize,
TagSize: self::TagSize,
{
Expand Down Expand Up @@ -321,7 +321,7 @@ where

impl<Aes, NonceSize, TagSize> AesGcm<Aes, NonceSize, TagSize>
where
Aes: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
Aes: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
NonceSize: ArraySize,
TagSize: self::TagSize,
{
Expand Down
8 changes: 4 additions & 4 deletions aes-siv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
8 changes: 4 additions & 4 deletions aes-siv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -121,7 +121,7 @@ pub type Tag = Array<u8, U16>;
pub struct SivAead<C, M, NonceSize = U16>
where
Self: KeySizeUser,
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16> + FixedOutputReset + KeyInit,
<C as KeySizeUser>::KeySize: Add,
NonceSize: ArraySize + IsGreaterOrEqual<U1>,
Expand Down Expand Up @@ -199,7 +199,7 @@ where
impl<C, M, NonceSize> AeadCore for SivAead<C, M, NonceSize>
where
Self: KeySizeUser,
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16> + FixedOutputReset + KeyInit,
<C as KeySizeUser>::KeySize: Add,
NonceSize: ArraySize + IsGreaterOrEqual<U1>,
Expand All @@ -217,7 +217,7 @@ impl<C, M, NonceSize> AeadInPlace for SivAead<C, M, NonceSize>
where
Self: KeySizeUser,
Siv<C, M>: KeyInit + KeySizeUser<KeySize = <Self as KeySizeUser>::KeySize>,
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16> + FixedOutputReset + KeyInit,
<C as KeySizeUser>::KeySize: Add,
NonceSize: ArraySize + IsGreaterOrEqual<U1>,
Expand Down
12 changes: 6 additions & 6 deletions aes-siv/src/siv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -105,7 +105,7 @@ pub type KeySize<C> = <<C as KeySizeUser>::KeySize as Add>::Output;
/// authenticated encryption (MRAE).
pub struct Siv<C, M>
where
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16>,
{
encryption_key: Key<C>,
Expand Down Expand Up @@ -138,7 +138,7 @@ pub type Aes256PmacSiv = PmacSiv<Aes256>;

impl<C, M> KeySizeUser for Siv<C, M>
where
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16> + FixedOutputReset + KeyInit,
<C as KeySizeUser>::KeySize: Add,
KeySize<C>: ArraySize,
Expand All @@ -148,7 +148,7 @@ where

impl<C, M> KeyInit for Siv<C, M>
where
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16> + FixedOutputReset + KeyInit,
<C as KeySizeUser>::KeySize: Add,
KeySize<C>: ArraySize,
Expand All @@ -168,7 +168,7 @@ where

impl<C, M> Siv<C, M>
where
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16> + FixedOutputReset + KeyInit,
{
/// Encrypt the given plaintext, allocating and returning a `Vec<u8>` for
Expand Down Expand Up @@ -325,7 +325,7 @@ where

impl<C, M> Drop for Siv<C, M>
where
C: BlockCipher<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit + KeySizeUser,
M: Mac<OutputSize = U16>,
{
fn drop(&mut self) {
Expand Down
6 changes: 3 additions & 3 deletions ccm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading
Loading