Skip to content

Commit

Permalink
hkdf: migrate to hmac v0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Nov 23, 2021
1 parent 1a89dc2 commit 40f5265
Show file tree
Hide file tree
Showing 14 changed files with 702 additions and 625 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

174 changes: 59 additions & 115 deletions Cargo.lock

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

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
members = [
"hkdf",
]

[patch.crates-io]
digest = { git = "https://github.com/RustCrypto/traits/", branch = "digest/v0.10" }
block-buffer = { git = "https://github.com/RustCrypto/utils", branch = "block-buffer/v0.10" }
sha-1 = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }
sha2 = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }
hmac = { git = "https://github.com/RustCrypto/MACs/", branch = "hmac/v0.12" }
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# RustCrypto KDFs ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]
# RustCrypto: Key Derivation Functions [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]

Collection of key derivation functions (KDFs) written in pure Rust.
Collection of [Key Derivation Functions][KDF] (KDF) written in pure Rust.

## Crates
## Supported Algorithms

| Name | Algorithm | Crates.io | Documentation | Build Status |
|--------|-----------|---------------|---------------|--------------|
| `hkdf` | [HKDF] | [![crates.io](https://img.shields.io/crates/v/hkdf.svg)](https://crates.io/crates/hkdf) | [![Documentation](https://docs.rs/hkdf/badge.svg)](https://docs.rs/hkdf) | [![Build](https://github.com/RustCrypto/KDFs/workflows/hkdf/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/KDFs/actions?query=workflow:hkdf+branch:master)
| Algorithm | Crate | Crates.io | Documentation | MSRV |
|-----------|--------|:-------------:|:-------------:|:----:|
| [HKDF] | `hkdf` | [![crates.io](https://img.shields.io/crates/v/hkdf.svg)](https://crates.io/crates/hkdf) | [![Documentation](https://docs.rs/hkdf/badge.svg)](https://docs.rs/hkdf) | ![MSRV 1.41][msrv-1.41] |

*NOTE: for password-based KDFs (e.g. Argon2, PBKDF2, scrypt), please see [RustCrypto/password-hashes]*

### Minimum Supported Rust Version (MSRV) Policy

MSRV bumps are considered breaking changes and will be performed only with minor version bump.

## License

All crates licensed under either of
Expand All @@ -21,19 +25,18 @@ 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.
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)

[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260043-KDFs
[deps-image]: https://deps.rs/repo/github/RustCrypto/KDFs/status.svg
[deps-link]: https://deps.rs/repo/github/RustCrypto/KDFs
[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg

[//]: # (algorithms)

[KDF]: https://en.wikipedia.org/wiki/Key_derivation_function
[HKDF]: https://en.wikipedia.org/wiki/HKDF
[RustCrypto/password-hashes]: https://github.com/RustCrypto/password-hashes
36 changes: 15 additions & 21 deletions hkdf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
[package]
name = "hkdf"
version = "0.11.0"
authors = ["vladikoff", "warner", "RustCrypto Developers"]
license = "MIT/Apache-2.0"
version = "0.12.0" # Also update html_root_url in lib.rs when bumping this
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/RustCrypto/KDFs/"
repository = "https://github.com/RustCrypto/KDFs/"
description = "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)"
keywords = [ "HKDF", "Crypto" ]
keywords = ["crypto", "HKDF", "KDF"]
categories = ["cryptography", "no-std"]
readme = "README.md"
edition = "2018"

[features]
std = []

[lib]
name = "hkdf"
path = "src/hkdf.rs"

[dependencies]
digest = "0.9"
hmac = "0.11"
hmac = "0.12"

[dev-dependencies]
blobby = "0.3"
crypto-tests = "0.5.*"
hex = "0.4"
sha-1 = "0.9"
sha2 = "0.9"
bencher = "0.1"
hex-literal = "0.2"
sha-1 = { version = "0.10", default-features = false }
sha2 = { version = "0.10", default-features = false }

[[bench]]
name = "hkdf"
harness = false
[features]
std = ["hmac/std"]

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

0 comments on commit 40f5265

Please sign in to comment.