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 Dec 7, 2021
1 parent 1a89dc2 commit 6d93d8a
Show file tree
Hide file tree
Showing 15 changed files with 711 additions and 622 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

172 changes: 61 additions & 111 deletions Cargo.lock

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

30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# RustCrypto KDFs ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]
# RustCrypto: Key Derivation Functions

Collection of key derivation functions (KDFs) written in pure Rust.
[![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link] ![Apache2/MIT licensed][license-image]

## Crates
Collection of [Key Derivation Functions][KDF] (KDF) written in pure Rust.

| 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)
## Supported Algorithms

| 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 +27,23 @@ 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
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[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

[//]: # (crates)

[`hkdf`]: ./hkdf

[//]: # (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
6 changes: 6 additions & 0 deletions hkdf/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
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).

## 0.12.0 (2021-12-07)
### Changed
- Bump `hmac` crate dependency to v0.12 ([#52])

[#52]: https://github.com/RustCrypto/KDFs/pull/52

## 0.11.0 (2021-04-29)
### Added
- Wycheproof HKDF test vectors ([#49])
Expand Down
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"]
2 changes: 1 addition & 1 deletion hkdf/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2015-2018 Vlad Filippov
Copyright (c) 2018 RustCrypto Developers
Copyright (c) 2018-2021 RustCrypto Developers

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down

0 comments on commit 6d93d8a

Please sign in to comment.