Skip to content

Commit 1e4f6ae

Browse files
newpavlovtarcieri
authored andcommitted
universal-hash v0.5.0-pre
1 parent ea33e32 commit 1e4f6ae

File tree

11 files changed

+149
-164
lines changed

11 files changed

+149
-164
lines changed

.github/workflows/universal-hash.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
rust:
25-
- 1.41.0 # MSRV
25+
- 1.56.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
matrix:
5252
rust:
53-
- 1.41.0 # MSRV
53+
- 1.56.0 # MSRV
5454
- stable
5555
steps:
5656
- uses: actions/checkout@v2

Cargo.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RustCrypto: Traits
22

3-
[![Project Chat][chat-image]][chat-link] ![Apache2/MIT licensed][license-image] [![dependency status][deps-image]][deps-link]
3+
[![Project Chat][chat-image]][chat-link] ![Apache2/MIT licensed][license-image] [![dependency status][deps-image]][deps-link]
44

55
Collection of traits which describe functionality of cryptographic primitives.
66

@@ -17,7 +17,7 @@ Collection of traits which describe functionality of cryptographic primitives.
1717
| [`kem`] | [Key encapsulation mechanism] | [![crates.io](https://img.shields.io/crates/v/kem.svg)](https://crates.io/crates/kem) | [![Documentation](https://docs.rs/kem/badge.svg)](https://docs.rs/kem) | ![MSRV 1.56][msrv-1.56] |
1818
| [`password-hash`] | [Password hashing] | [![crates.io](https://img.shields.io/crates/v/password-hash.svg)](https://crates.io/crates/password-hash) | [![Documentation](https://docs.rs/password-hash/badge.svg)](https://docs.rs/password-hash) | ![MSRV 1.57][msrv-1.57] |
1919
| [`signature`] | [Digital signature] | [![crates.io](https://img.shields.io/crates/v/signature.svg)](https://crates.io/crates/signature) | [![Documentation](https://docs.rs/signature/badge.svg)](https://docs.rs/signature) | ![MSRV 1.41][msrv-1.41] |
20-
| [`universal‑hash`] | [Universal hash function] | [![crates.io](https://img.shields.io/crates/v/universal-hash.svg)](https://crates.io/crates/universal-hash) | [![Documentation](https://docs.rs/universal-hash/badge.svg)](https://docs.rs/universal-hash) | ![MSRV 1.41][msrv-1.41] |
20+
| [`universal‑hash`] | [Universal hash function] | [![crates.io](https://img.shields.io/crates/v/universal-hash.svg)](https://crates.io/crates/universal-hash) | [![Documentation](https://docs.rs/universal-hash/badge.svg)](https://docs.rs/universal-hash) | ![MSRV 1.56][msrv-1.56] |
2121

2222
### Additional Crates
2323

cipher/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "cipher"
33
description = "Traits for describing block ciphers and stream ciphers"
4-
version = "0.4.3" # Also update html_root_url in lib.rs when bumping this
4+
version = "0.4.4" # Also update html_root_url in lib.rs when bumping this
55
authors = ["RustCrypto Developers"]
66
license = "MIT OR Apache-2.0"
77
readme = "README.md"
@@ -13,7 +13,7 @@ keywords = ["crypto", "block-cipher", "stream-cipher", "trait"]
1313
categories = ["cryptography", "no-std"]
1414

1515
[dependencies]
16-
crypto-common = { version = "0.1.3", path = "../crypto-common" }
16+
crypto-common = { version = "0.1.6", path = "../crypto-common" }
1717
inout = "0.1"
1818

1919
# optional dependencies

cipher/src/lib.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#![doc(
1111
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
1212
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
13-
html_root_url = "https://docs.rs/cipher/0.4.3"
13+
html_root_url = "https://docs.rs/cipher/0.4.4"
1414
)]
1515
#![warn(missing_docs, rust_2018_idioms)]
1616

@@ -51,21 +51,11 @@ pub use crypto_common::{
5151
generic_array,
5252
typenum::{self, consts},
5353
AlgorithmName, Block, InnerIvInit, InvalidLength, Iv, IvSizeUser, Key, KeyInit, KeyIvInit,
54-
KeySizeUser,
54+
KeySizeUser, ParBlocks, ParBlocksSizeUser,
5555
};
56-
use generic_array::{ArrayLength, GenericArray};
5756

5857
/// Trait for loading current IV state.
5958
pub trait IvState: IvSizeUser {
6059
/// Returns current IV state.
6160
fn iv_state(&self) -> Iv<Self>;
6261
}
63-
64-
/// Types which process blocks in parallel.
65-
pub trait ParBlocksSizeUser: BlockSizeUser {
66-
/// Number of blocks which can be processed in parallel.
67-
type ParBlocksSize: ArrayLength<Block<Self>>;
68-
}
69-
70-
/// Parallel blocks on which [`ParBlocksSizeUser`] implementors operate.
71-
pub type ParBlocks<T> = GenericArray<Block<T>, <T as ParBlocksSizeUser>::ParBlocksSize>;

crypto-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "crypto-common"
33
description = "Common cryptographic traits"
4-
version = "0.1.5"
4+
version = "0.1.6"
55
authors = ["RustCrypto Developers"]
66
license = "MIT OR Apache-2.0"
77
readme = "README.md"

crypto-common/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use rand_core::{CryptoRng, RngCore};
2525

2626
/// Block on which [`BlockSizeUser`] implementors operate.
2727
pub type Block<B> = GenericArray<u8, <B as BlockSizeUser>::BlockSize>;
28+
/// Parallel blocks on which [`ParBlocksSizeUser`] implementors operate.
29+
pub type ParBlocks<T> = GenericArray<Block<T>, <T as ParBlocksSizeUser>::ParBlocksSize>;
2830
/// Output array of [`OutputSizeUser`] implementors.
2931
pub type Output<T> = GenericArray<u8, <T as OutputSizeUser>::OutputSize>;
3032
/// Key used by [`KeySizeUser`] implementors.
@@ -51,6 +53,12 @@ impl<T: BlockSizeUser> BlockSizeUser for &mut T {
5153
type BlockSize = T::BlockSize;
5254
}
5355

56+
/// Types which can process blocks in parallel.
57+
pub trait ParBlocksSizeUser: BlockSizeUser {
58+
/// Number of blocks which can be processed in parallel.
59+
type ParBlocksSize: ArrayLength<Block<Self>>;
60+
}
61+
5462
/// Types which return data with the given size.
5563
pub trait OutputSizeUser {
5664
/// Size of the output in bytes.

crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ elliptic-curve = { version = "0.12", optional = true, path = "../elliptic-curve"
2222
mac = { version = "0.11", package = "crypto-mac", optional = true }
2323
password-hash = { version = "0.4", optional = true, path = "../password-hash" }
2424
signature = { version = "1.5", optional = true, default-features = false, path = "../signature" }
25-
universal-hash = { version = "0.4", optional = true, path = "../universal-hash" }
25+
universal-hash = { version = "=0.5.0-pre", optional = true, path = "../universal-hash" }
2626

2727
[features]
2828
std = [

universal-hash/Cargo.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
[package]
22
name = "universal-hash"
3-
version = "0.4.1" # Also update html_root_url in lib.rs when bumping this
3+
version = "0.5.0-pre"
4+
description = "Traits which describe the functionality of universal hash functions (UHFs)"
45
authors = ["RustCrypto Developers"]
56
license = "MIT OR Apache-2.0"
6-
description = "Trait for universal hash functions"
7+
edition = "2021"
8+
rust-version = "1.56"
9+
readme = "README.md"
710
documentation = "https://docs.rs/universal-hash"
811
repository = "https://github.com/RustCrypto/traits"
912
keywords = ["crypto", "mac"]
1013
categories = ["cryptography", "no-std"]
11-
readme = "README.md"
12-
edition = "2018"
1314

1415
[dependencies]
15-
generic-array = "0.14"
16+
crypto-common = { version = "0.1.4", path = "../crypto-common" }
1617
subtle = { version = "=2.4", default-features = false }
1718

1819
[features]
19-
std = []
20+
std = ["crypto-common/std"]
2021

2122
[package.metadata.docs.rs]
2223
all-features = true
24+
rustdoc-args = ["--cfg", "docsrs"]

universal-hash/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
[![Project Chat][chat-image]][chat-link]
88
[![Build Status][build-image]][build-link]
99

10-
Traits which define functionality of [universal hash functions].
10+
Traits which describe functionality of [universal hash functions] (UHFs).
1111

1212
See [RustCrypto/universal-hashes] for implementations which use this trait.
1313

1414
[Documentation][docs-link]
1515

1616
## Minimum Supported Rust Version
1717

18-
Rust **1.41** or higher.
18+
Rust **1.56** or higher.
1919

2020
Minimum supported Rust version can be changed in the future, but it will be
2121
done with a minor version bump.
@@ -47,7 +47,7 @@ dual licensed as above, without any additional terms or conditions.
4747
[docs-image]: https://docs.rs/universal-hash/badge.svg
4848
[docs-link]: https://docs.rs/universal-hash/
4949
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
50-
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
50+
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
5151
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
5252
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260051-universal-hashes
5353
[build-image]: https://github.com/RustCrypto/traits/workflows/universal-hash/badge.svg?branch=master&event=push

0 commit comments

Comments
 (0)