Skip to content

Commit d75c6f0

Browse files
committed
Bump digest to v0.11.0-pre.3; MSRV 1.71
For `hkdf`, this upgrades `hmac` to v0.13.0-pre.0, which transitively depends on `digest` v0.11.0-pre.3. This notably includes the migration from generic-array to hybrid-array, and also switches `hkdf` to use the newly introduced `EagerHash` trait. Also bumps edition to 2021, and hex-literal to v0.4.
1 parent 1ac16e8 commit d75c6f0

11 files changed

Lines changed: 128 additions & 87 deletions

File tree

.github/workflows/concat-kdf.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.56.0 # MSRV
25+
- 1.71.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -40,7 +40,7 @@ jobs:
4040
strategy:
4141
matrix:
4242
rust:
43-
- 1.56.0 # MSRV
43+
- 1.71.0 # MSRV
4444
- stable
4545
steps:
4646
- uses: actions/checkout@v4

.github/workflows/hkdf.yml

Lines changed: 4 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.71.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -37,6 +37,8 @@ jobs:
3737
- run: cargo build --no-default-features --target ${{ matrix.target }}
3838

3939
minimal-versions:
40+
# Temporarily disabled until hkdf 0.13.0-pre.0 gets published
41+
if: false
4042
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
4143
with:
4244
working-directory: ${{ github.workflow }}
@@ -46,7 +48,7 @@ jobs:
4648
strategy:
4749
matrix:
4850
rust:
49-
- 1.41.0 # MSRV
51+
- 1.71.0 # MSRV
5052
- stable
5153
steps:
5254
- uses: actions/checkout@v4

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"hkdf",
45
"concat-kdf",

concat-kdf/Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
[package]
22
name = "concat-kdf"
3-
version = "0.1.0"
3+
version = "0.2.0-pre"
44
description = "Concatenation Key Derivation Function (Concat KDF)"
55
authors = ["RustCrypto Developers"]
66
license = "MIT OR Apache-2.0"
77
readme = "README.md"
8-
edition = "2018"
8+
edition = "2021"
99
documentation = "https://docs.rs/concat-kdf"
1010
repository = "https://github.com/RustCrypto/KDFs"
1111
keywords = ["crypto", "concat-kdf", "KDF", "NIST"]
1212
categories = ["cryptography", "no-std"]
13+
rust-version = "1.71"
1314

1415
[dependencies]
15-
digest = "0.10.7"
16+
digest = "=0.11.0-pre.3"
1617

1718
[dev-dependencies]
18-
hex-literal = "0.3.4"
19-
sha2 = { version = "0.10.3", default-features = false }
19+
hex-literal = "0.4"
20+
sha2 = { version = "=0.11.0-pre.0", default-features = false }
2021

2122
[features]
2223
std = []

concat-kdf/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,39 @@ let mut key = [0u8; 32];
2121
concat_kdf::derive_key_into::<sha2::Sha256>(b"shared-secret", b"other-info", &mut key).unwrap();
2222
```
2323

24+
## Minimum Supported Rust Version
25+
26+
Rust **1.71** or higher.
27+
28+
Minimum supported Rust version can be changed in the future, but it will be
29+
done with a minor version bump.
30+
31+
## SemVer Policy
32+
33+
- All on-by-default features of this library are covered by SemVer
34+
- MSRV is considered exempt from SemVer as noted above
35+
36+
## License
37+
38+
Licensed under either of:
39+
40+
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
41+
* [MIT license](http://opensource.org/licenses/MIT)
42+
43+
at your option.
44+
45+
### Contribution
46+
47+
Unless you explicitly state otherwise, any contribution intentionally submitted
48+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
49+
dual licensed as above, without any additional terms or conditions.
50+
2451
[crate-image]: https://img.shields.io/crates/v/concat-kdf.svg
2552
[crate-link]: https://crates.io/crates/concat-kdf
2653
[docs-image]: https://docs.rs/concat-kdf/badge.svg
2754
[docs-link]: https://docs.rs/concat-kdf/
2855
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
29-
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
56+
[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
3057
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
3158
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260043-KDFs
3259
[build-image]: https://github.com/RustCrypto/KDFs/workflows/concat-kdf/badge.svg?branch=master&event=push

concat-kdf/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#![cfg_attr(docsrs, feature(doc_cfg))]
2121

2222
use core::fmt;
23-
use digest::{generic_array::typenum::Unsigned, Digest, FixedOutputReset, Update};
23+
use digest::{array::typenum::Unsigned, Digest, FixedOutputReset, Update};
2424

2525
#[cfg(feature = "std")]
2626
extern crate std;

hkdf/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hkdf"
3-
version = "0.12.4"
3+
version = "0.13.0-pre"
44
authors = ["RustCrypto Developers"]
55
license = "MIT OR Apache-2.0"
66
homepage = "https://github.com/RustCrypto/KDFs/"
@@ -9,16 +9,17 @@ description = "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)"
99
keywords = ["crypto", "HKDF", "KDF"]
1010
categories = ["cryptography", "no-std"]
1111
readme = "README.md"
12-
edition = "2018"
12+
edition = "2021"
13+
rust-version = "1.71"
1314

1415
[dependencies]
15-
hmac = "0.12.1"
16+
hmac = "=0.13.0-pre.0"
1617

1718
[dev-dependencies]
1819
blobby = "0.3"
19-
hex-literal = "0.2.2"
20-
sha1 = { version = "0.10", default-features = false }
21-
sha2 = { version = "0.10", default-features = false }
20+
hex-literal = "0.4"
21+
sha1 = { version = "=0.11.0-pre.0", default-features = false }
22+
sha2 = { version = "=0.11.0-pre.0", default-features = false }
2223

2324
[features]
2425
std = ["hmac/std"]

hkdf/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,41 @@ let expected = hex!("
7171
assert_eq!(okm, expected);
7272
```
7373

74+
## Minimum Supported Rust Version
75+
76+
Rust **1.71** or higher.
77+
78+
Minimum supported Rust version can be changed in the future, but it will be
79+
done with a minor version bump.
80+
81+
## SemVer Policy
82+
83+
- All on-by-default features of this library are covered by SemVer
84+
- MSRV is considered exempt from SemVer as noted above
85+
86+
## License
87+
88+
Licensed under either of:
89+
90+
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
91+
* [MIT license](http://opensource.org/licenses/MIT)
92+
93+
at your option.
94+
95+
### Contribution
96+
97+
Unless you explicitly state otherwise, any contribution intentionally submitted
98+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
99+
dual licensed as above, without any additional terms or conditions.
100+
74101
[//]: # (badges)
75102

76103
[crate-image]: https://img.shields.io/crates/v/hkdf.svg
77104
[crate-link]: https://crates.io/crates/hkdf
78105
[docs-image]: https://docs.rs/hkdf/badge.svg
79106
[docs-link]: https://docs.rs/hkdf/
80107
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
81-
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
108+
[rustc-image]: https://img.shields.io/badge/rustc-1.71+-blue.svg
82109
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
83110
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260043-KDFs
84111
[build-image]: https://github.com/RustCrypto/KDFs/workflows/hkdf/badge.svg?branch=master&event=push

hkdf/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub use hmac;
103103
use core::fmt;
104104
use core::marker::PhantomData;
105105
use hmac::digest::{
106-
crypto_common::AlgorithmName, generic_array::typenum::Unsigned, Output, OutputSizeUser,
106+
array::typenum::Unsigned, crypto_common::AlgorithmName, Output, OutputSizeUser,
107107
};
108108
use hmac::{Hmac, SimpleHmac};
109109

0 commit comments

Comments
 (0)