Skip to content

Commit

Permalink
[WIP] Bump digest to v0.11.0-pre.3; MSRV 1.71
Browse files Browse the repository at this point in the history
For `hkdf`, this upgrades `hmac` to v0.13.0-pre, which transitively
depends on `digest` v0.11.0-pre.3.

This notably includes the migration from generic-array to hybrid-array.

Also bumps edition to 2021, and hex-literal to v0.4.
  • Loading branch information
tarcieri committed Jan 9, 2024
1 parent 1ac16e8 commit edc4b9d
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/concat-kdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- 1.71.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- 1.71.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/hkdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.71.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -37,6 +37,8 @@ jobs:
- run: cargo build --no-default-features --target ${{ matrix.target }}

minimal-versions:
# Temporarily disabled until hkdf 0.13.0-pre.0 gets published
if: false
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
Expand All @@ -46,7 +48,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.71.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
Expand Down
112 changes: 84 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
[workspace]
resolver = "2"
members = [
"hkdf",
"concat-kdf",
]

[profile.dev]
opt-level = 2

[patch.crates-io.hmac]
git = "https://github.com/RustCrypto/MACs.git"
branch = "hmac/digest-v0.11.0-pre.3"
11 changes: 6 additions & 5 deletions concat-kdf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
[package]
name = "concat-kdf"
version = "0.1.0"
version = "=0.2.0-pre"
description = "Concatenation Key Derivation Function (Concat KDF)"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
edition = "2018"
edition = "2021"
documentation = "https://docs.rs/concat-kdf"
repository = "https://github.com/RustCrypto/KDFs"
keywords = ["crypto", "concat-kdf", "KDF", "NIST"]
categories = ["cryptography", "no-std"]
rust-version = "1.71"

[dependencies]
digest = "0.10.7"
digest = "=0.11.0-pre.3"

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

[features]
std = []
Expand Down
29 changes: 28 additions & 1 deletion concat-kdf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,39 @@ let mut key = [0u8; 32];
concat_kdf::derive_key_into::<sha2::Sha256>(b"shared-secret", b"other-info", &mut key).unwrap();
```

## Minimum Supported Rust Version

Rust **1.71** or higher.

Minimum supported Rust version can be changed in the future, but it will be
done with a minor version bump.

## SemVer Policy

- All on-by-default features of this library are covered by SemVer
- MSRV is considered exempt from SemVer as noted above

## License

Licensed under either of:

* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* [MIT license](http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

[crate-image]: https://img.shields.io/crates/v/concat-kdf.svg
[crate-link]: https://crates.io/crates/concat-kdf
[docs-image]: https://docs.rs/concat-kdf/badge.svg
[docs-link]: https://docs.rs/concat-kdf/
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260043-KDFs
[build-image]: https://github.com/RustCrypto/KDFs/workflows/concat-kdf/badge.svg?branch=master&event=push
Expand Down
13 changes: 7 additions & 6 deletions hkdf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hkdf"
version = "0.12.4"
version = "0.13.0-pre"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/RustCrypto/KDFs/"
Expand All @@ -9,16 +9,17 @@ description = "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)"
keywords = ["crypto", "HKDF", "KDF"]
categories = ["cryptography", "no-std"]
readme = "README.md"
edition = "2018"
edition = "2021"
rust-version = "1.71"

[dependencies]
hmac = "0.12.1"
hmac = "=0.13.0-pre"

[dev-dependencies]
blobby = "0.3"
hex-literal = "0.2.2"
sha1 = { version = "0.10", default-features = false }
sha2 = { version = "0.10", default-features = false }
hex-literal = "0.4"
sha1 = { version = "=0.11.0-pre.0", default-features = false }
sha2 = { version = "=0.11.0-pre.0", default-features = false }

[features]
std = ["hmac/std"]
Expand Down
29 changes: 28 additions & 1 deletion hkdf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,41 @@ let expected = hex!("
assert_eq!(okm, expected);
```

## Minimum Supported Rust Version

Rust **1.71** or higher.

Minimum supported Rust version can be changed in the future, but it will be
done with a minor version bump.

## SemVer Policy

- All on-by-default features of this library are covered by SemVer
- MSRV is considered exempt from SemVer as noted above

## License

Licensed under either of:

* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* [MIT license](http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

[//]: # (badges)

[crate-image]: https://img.shields.io/crates/v/hkdf.svg
[crate-link]: https://crates.io/crates/hkdf
[docs-image]: https://docs.rs/hkdf/badge.svg
[docs-link]: https://docs.rs/hkdf/
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.71+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260043-KDFs
[build-image]: https://github.com/RustCrypto/KDFs/workflows/hkdf/badge.svg?branch=master&event=push
Expand Down
Loading

0 comments on commit edc4b9d

Please sign in to comment.