Skip to content
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
4 changes: 4 additions & 0 deletions aead/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Added
- Re-export `crypto_common` as `common` ([#2237])
Comment on lines +9 to +10
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: aead didn't previously re-export crypto-common itself, only select things from it


### Fixed
- Minor documentation error in `AeadCore::TagSize` ([#1351])
- Fixup `hybrid-array` migration ([#1531])
Expand Down Expand Up @@ -43,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#1531]: https://github.com/RustCrypto/traits/pull/1531
[#1759]: https://github.com/RustCrypto/traits/pull/1759
[#1999]: https://github.com/RustCrypto/traits/pull/1999
[#2237]: https://github.com/RustCrypto/traits/pull/2237

## 0.5.2 (2023-04-02)
### Added
Expand Down
6 changes: 3 additions & 3 deletions aead/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ such as AES-GCM as ChaCha20Poly1305, which provide a high-level API
"""

[dependencies]
crypto-common = "0.2.0-rc.13"
common = { version = "0.2.0-rc.13", package = "crypto-common" }
inout = "0.2.2"

# optional dependencies
Expand All @@ -28,8 +28,8 @@ bytes = { version = "1", optional = true, default-features = false }
default = ["rand_core"]
alloc = []
dev = ["blobby", "alloc"]
getrandom = ["crypto-common/getrandom"]
rand_core = ["crypto-common/rand_core"]
getrandom = ["common/getrandom"]
rand_core = ["common/rand_core"]

[package.metadata.docs.rs]
all-features = true
2 changes: 1 addition & 1 deletion aead/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
Aead, AeadInOut, Payload, Tag, TagPosition, array::typenum::Unsigned, inout::InOutBuf,
};
pub use blobby;
use crypto_common::KeyInit;
use common::KeyInit;

/// AEAD test vector
#[derive(Debug, Clone, Copy)]
Expand Down
8 changes: 4 additions & 4 deletions aead/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ extern crate alloc;
#[cfg(feature = "dev")]
pub mod dev;

pub use crypto_common::{
Key, KeyInit, KeySizeUser,
pub use common::{
self, Key, KeyInit, KeySizeUser,
array::{self, typenum::consts},
};

Expand All @@ -29,11 +29,11 @@ pub use arrayvec;
#[cfg(feature = "bytes")]
pub use bytes;
#[cfg(feature = "rand_core")]
pub use crypto_common::{Generate, rand_core};
pub use common::{Generate, rand_core};
pub use inout;

use common::array::{Array, ArraySize, typenum::Unsigned};
use core::fmt;
use crypto_common::array::{Array, ArraySize, typenum::Unsigned};
use inout::InOutBuf;

#[cfg(feature = "alloc")]
Expand Down
2 changes: 2 additions & 0 deletions cipher/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 0.5.0 (UNRELEASED)
### Changed
- Edition changed to 2024 and MSRV bumped to 1.85 ([#1759])
- Re-export of `crypto-common` moved to `cipher::common` ([#2237])

### Fixed
- Seeking implementation in the stream cipher wrapper ([#2052])

[#1759]: https://github.com/RustCrypto/traits/pull/1759
[#2052]: https://github.com/RustCrypto/traits/pull/2052
[#2237]: https://github.com/RustCrypto/traits/pull/2237

## 0.4.4 (2022-03-09)
### Changed
Expand Down
8 changes: 4 additions & 4 deletions cipher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["cryptography", "no-std"]
description = "Traits for describing block ciphers and stream ciphers"

[dependencies]
crypto-common = "0.2.0-rc.13"
common = { version = "0.2.0-rc.13", package = "crypto-common" }
inout = "0.2.2"

# optional dependencies
Expand All @@ -29,10 +29,10 @@ alloc = []
block-padding = ["inout/block-padding"]
stream-wrapper = ["block-buffer"]
# Enable random key and IV generation methods
getrandom = ["crypto-common/getrandom"]
rand_core = ["crypto-common/rand_core"]
getrandom = ["common/getrandom"]
rand_core = ["common/rand_core"]
dev = ["blobby"]
zeroize = ["dep:zeroize", "crypto-common/zeroize", "block-buffer?/zeroize"]
zeroize = ["dep:zeroize", "common/zeroize", "block-buffer?/zeroize"]

[package.metadata.docs.rs]
all-features = true
6 changes: 3 additions & 3 deletions cipher/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#[cfg(all(feature = "block-padding", feature = "alloc"))]
use alloc::{vec, vec::Vec};
use crypto_common::{Block, BlockSizeUser};
use common::{Block, BlockSizeUser};
use inout::{InOut, InOutBuf, NotEqualError};
#[cfg(feature = "block-padding")]
use inout::{
Expand Down Expand Up @@ -136,8 +136,8 @@ pub trait BlockCipherEncrypt: BlockSizeUser + Sized {
#[inline]
fn encrypt_padded_vec<P: Padding>(&self, msg: &[u8]) -> Vec<u8> {
use block_padding::{NoPadding, ZeroPadding};
use common::typenum::Unsigned;
use core::any::TypeId;
use crypto_common::typenum::Unsigned;

let bs = Self::BlockSize::USIZE;
let msg_len = msg.len();
Expand Down Expand Up @@ -404,8 +404,8 @@ pub trait BlockModeEncrypt: BlockSizeUser + Sized {
#[inline]
fn encrypt_padded_vec<P: Padding>(self, msg: &[u8]) -> Vec<u8> {
use block_padding::{NoPadding, ZeroPadding};
use common::typenum::Unsigned;
use core::any::TypeId;
use crypto_common::typenum::Unsigned;

let bs = Self::BlockSize::USIZE;
let msg_len = msg.len();
Expand Down
2 changes: 1 addition & 1 deletion cipher/src/block/backends.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crypto_common::{Block, BlockSizeUser, ParBlocks, ParBlocksSizeUser, typenum::Unsigned};
use common::{Block, BlockSizeUser, ParBlocks, ParBlocksSizeUser, typenum::Unsigned};
use inout::{InOut, InOutBuf};

/// Trait implemented by block cipher mode encryption backends.
Expand Down
2 changes: 1 addition & 1 deletion cipher/src/block/ctx.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crypto_common::{Block, BlockSizeUser, BlockSizes, typenum::Unsigned};
use common::{Block, BlockSizeUser, BlockSizes, typenum::Unsigned};
use inout::{InOut, InOutBuf};

use super::{
Expand Down
9 changes: 6 additions & 3 deletions cipher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ extern crate alloc;

#[cfg(feature = "dev")]
pub use blobby;
pub use crypto_common;
pub use common;
#[cfg(feature = "rand_core")]
pub use crypto_common::rand_core;
pub use common::rand_core;
pub use inout;
#[cfg(feature = "block-padding")]
pub use inout::block_padding;
Expand All @@ -43,10 +43,13 @@ pub use block::*;
pub use stream::*;
pub use tweak::*;

pub use crypto_common::{
pub use common::{
AlgorithmName, Block, BlockSizeUser, InnerIvInit, InvalidLength, Iv, IvSizeUser, IvState, Key,
KeyInit, KeyIvInit, KeySizeUser, ParBlocks, ParBlocksSizeUser,
array::{self, Array},
typenum::{self, consts},
};
pub use inout::{InOut, InOutBuf};

#[deprecated(since = "0.5.0", note = "use `cipher::common` instead")]
pub use common as crypto_common;
2 changes: 1 addition & 1 deletion cipher/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! for ciphers implementation.

use crate::block::{BlockModeDecrypt, BlockModeEncrypt};
use crypto_common::Block;
use common::Block;
use inout::{InOutBuf, NotEqualError};

mod core_api;
Expand Down
2 changes: 1 addition & 1 deletion cipher/src/stream/core_api.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::StreamCipherError;
use crate::{array::Array, typenum::Unsigned};
use crypto_common::{Block, BlockSizeUser, BlockSizes, ParBlocks, ParBlocksSizeUser};
use common::{Block, BlockSizeUser, BlockSizes, ParBlocks, ParBlocksSizeUser};
use inout::{InOut, InOutBuf};

/// Trait implemented by stream cipher backends.
Expand Down
4 changes: 2 additions & 2 deletions cipher/src/stream/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use super::{
errors::StreamCipherError,
};
use block_buffer::ReadBuffer;
use core::fmt;
use crypto_common::{
use common::{
Iv, IvSizeUser, Key, KeyInit, KeyIvInit, KeySizeUser, array::Array, typenum::Unsigned,
};
use core::fmt;
use inout::InOutBuf;
#[cfg(feature = "zeroize")]
use zeroize::ZeroizeOnDrop;
Expand Down
2 changes: 1 addition & 1 deletion cipher/src/tweak.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Traits used to define functionality of [tweakable block ciphers][1].
//!
//! [1]: https://people.eecs.berkeley.edu/~daw/papers/tweak-crypto02.pdf
use crypto_common::{
use common::{
Block, BlockSizeUser,
array::{Array, ArraySize},
};
Expand Down
2 changes: 1 addition & 1 deletion cipher/src/tweak/ctx.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crypto_common::{Block, BlockSizeUser, BlockSizes, array::ArraySize};
use common::{Block, BlockSizeUser, BlockSizes, array::ArraySize};
use inout::InOut;

use super::{
Expand Down
2 changes: 1 addition & 1 deletion cipher/src/tweak/zero.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::marker::PhantomData;

use crypto_common::{Block, BlockSizes, ParBlocksSizeUser, array::ArraySize};
use common::{Block, BlockSizes, ParBlocksSizeUser, array::ArraySize};

use super::{
TweakBlockCipherDecBackend, TweakBlockCipherDecClosure, TweakBlockCipherDecrypt,
Expand Down
6 changes: 3 additions & 3 deletions crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["cryptography", "no-std"]
description = "Facade crate for all of the RustCrypto traits (e.g. `aead`, `cipher`, `digest`)"

[dependencies]
crypto-common = { version = "0.2.0-rc.13", path = "../crypto-common", default-features = false }
common = { version = "0.2.0-rc.13", package = "crypto-common", path = "../crypto-common", default-features = false }

# optional dependencies
aead = { version = "0.6.0-rc.5", path = "../aead", optional = true }
Expand All @@ -26,8 +26,8 @@ universal-hash = { version = "0.6.0-rc.4", path = "../universal-hash", optional

[features]
std = ["elliptic-curve/std"]
getrandom = ["crypto-common/getrandom"]
rand_core = ["crypto-common/rand_core"]
getrandom = ["common/getrandom"]
rand_core = ["common/rand_core"]

[package.metadata.docs.rs]
all-features = true
2 changes: 1 addition & 1 deletion crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#![forbid(unsafe_code)]
#![warn(rust_2018_idioms, missing_debug_implementations)]

pub use crypto_common as common;
pub use common;

#[cfg(feature = "aead")]
pub use aead;
Expand Down
2 changes: 2 additions & 0 deletions digest/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed the OID type parameter from `CtOutWrapper` ([#1799])
- Implementations of the `SerializableState` trait ([#1953])
- `new_test!` and `new_mac_test!` macros ([#1958])
- Re-export of `crypto-common` moved to `digest::common` ([#2237])

### Removed
- `Mac::new`, `Mac::new_from_slice`, and `Mac::generate_key` methods ([#1173])
Expand All @@ -36,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#1953]: https://github.com/RustCrypto/traits/pull/1953
[#1958]: https://github.com/RustCrypto/traits/pull/1958
[#2043]: https://github.com/RustCrypto/traits/pull/2043
[#2237]: https://github.com/RustCrypto/traits/pull/2237

## 0.10.7 (2023-05-19)
### Changed
Expand Down
6 changes: 3 additions & 3 deletions digest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["cryptography", "no-std"]
description = "Traits for cryptographic hash functions and message authentication codes"

[dependencies]
crypto-common = "0.2.0-rc.13"
common = { version = "0.2.0-rc.13", package = "crypto-common" }

# optional dependencies
block-buffer = { version = "0.11", optional = true }
Expand All @@ -26,8 +26,8 @@ zeroize = { version = "1.7", optional = true, default-features = false }
default = ["block-api"]
block-api = ["block-buffer"] # Enable block API traits
mac = ["subtle"] # Enable MAC traits
rand_core = ["crypto-common/rand_core"] # Enable random key generation methods
getrandom = ["crypto-common/getrandom", "rand_core"]
rand_core = ["common/rand_core"] # Enable random key generation methods
getrandom = ["common/getrandom", "rand_core"]
oid = ["const-oid"]
zeroize = ["dep:zeroize", "block-buffer?/zeroize"]
alloc = []
Expand Down
4 changes: 2 additions & 2 deletions digest/src/block_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
use crate::{Digest, HashMarker, InvalidOutputSize};

pub use block_buffer::{Eager, Lazy};
pub use crypto_common::{AlgorithmName, Block, BlockSizeUser, OutputSizeUser, Reset};
pub use common::{AlgorithmName, Block, BlockSizeUser, OutputSizeUser, Reset};

use block_buffer::{BlockBuffer, BufferKind};
use crypto_common::Output;
use common::Output;

mod ct_variable;
pub use ct_variable::CtOutWrapper;
Expand Down
4 changes: 2 additions & 2 deletions digest/src/block_api/ct_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ use super::{
#[cfg(feature = "mac")]
use crate::MacMarker;
use crate::{CollisionResistance, CustomizedInit, HashMarker};
use core::{fmt, marker::PhantomData};
use crypto_common::{
use common::{
Block, BlockSizeUser, OutputSizeUser,
array::{Array, ArraySize},
hazmat::{DeserializeStateError, SerializableState, SerializedState},
typenum::{IsLessOrEqual, True},
};
use core::{fmt, marker::PhantomData};

/// Wrapper around [`VariableOutputCore`] which selects output size at compile time.
#[derive(Clone)]
Expand Down
Loading