Skip to content

Commit

Permalink
update hmac to digest v0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Nov 23, 2021
1 parent eaf68aa commit c0dbef1
Show file tree
Hide file tree
Showing 17 changed files with 628 additions and 226 deletions.
1 change: 1 addition & 0 deletions .github/workflows/hmac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- run: cargo test --release --no-default-features
- run: cargo test --release --features reset
- run: cargo test --release
82 changes: 44 additions & 38 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ members = [
"hmac",
"pmac",
]

[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" }
md-5 = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }
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" }
streebog = { git = "https://github.com/RustCrypto/hashes/", branch = "digest/v0.10.0-pre" }

25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# RustCrypto: Message Authentication Codes ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]
# RustCrypto: Message Authentication Codes [![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link]

Collection of [Message Authentication Code][1] (MAC) algorithms written in pure Rust.

## Crates
## Supported Algorithms

| Name | Algorithm | Crates.io | Documentation | Build Status |
|--------|-----------|---------------|---------------|--------------|
| `cmac` | [CMAC] | [![crates.io](https://img.shields.io/crates/v/cmac.svg)](https://crates.io/crates/cmac) | [![Documentation](https://docs.rs/cmac/badge.svg)](https://docs.rs/cmac) | [![Build](https://github.com/RustCrypto/MACs/workflows/cmac/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:cmac+branch:master)
| `daa` | [DAA] | [![crates.io](https://img.shields.io/crates/v/daa.svg)](https://crates.io/crates/daa) | [![Documentation](https://docs.rs/daa/badge.svg)](https://docs.rs/daa) | [![Build](https://github.com/RustCrypto/MACs/workflows/daa/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:daa+branch:master)
| `hmac` | [HMAC] | [![crates.io](https://img.shields.io/crates/v/hmac.svg)](https://crates.io/crates/hmac) | [![Documentation](https://docs.rs/hmac/badge.svg)](https://docs.rs/hmac) | [![Build](https://github.com/RustCrypto/MACs/workflows/hmac/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:hmac+branch:master)
| `pmac` | [PMAC] | [![crates.io](https://img.shields.io/crates/v/pmac.svg)](https://crates.io/crates/pmac) | [![Documentation](https://docs.rs/pmac/badge.svg)](https://docs.rs/pmac) | [![Build](https://github.com/RustCrypto/MACs/workflows/pmac/badge.svg?branch=master&event=push)](https://github.com/RustCrypto/MACs/actions?query=workflow:pmac+branch:master)
| Algorithm | Crate | Crates.io | Documentation | MSRV |
|-----------|--------|:-------------:|:-------------:|:----:|
| [CMAC] | `cmac` | [![crates.io](https://img.shields.io/crates/v/cmac.svg)](https://crates.io/crates/cmac) | [![Documentation](https://docs.rs/cmac/badge.svg)](https://docs.rs/cmac) | ![MSRV 1.41][msrv-1.41] |
| [DAA] | `daa` | [![crates.io](https://img.shields.io/crates/v/daa.svg)](https://crates.io/crates/daa) | [![Documentation](https://docs.rs/daa/badge.svg)](https://docs.rs/daa) | ![MSRV 1.41][msrv-1.41] |
| [HMAC] | `hmac` | [![crates.io](https://img.shields.io/crates/v/hmac.svg)](https://crates.io/crates/hmac) | [![Documentation](https://docs.rs/hmac/badge.svg)](https://docs.rs/hmac) | ![MSRV 1.41][msrv-1.41] |
| [PMAC] | `pmac` | [![crates.io](https://img.shields.io/crates/v/pmac.svg)](https://crates.io/crates/pmac) | [![Documentation](https://docs.rs/pmac/badge.svg)](https://docs.rs/pmac) | ![MSRV 1.41][msrv-1.41] |

### Minimum Supported Rust Version (MSRV) Policy

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

## License

Expand All @@ -22,16 +26,15 @@ 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
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/260044-MACs
[deps-image]: https://deps.rs/repo/github/RustCrypto/MACs/status.svg
[deps-link]: https://deps.rs/repo/github/RustCrypto/MACs
[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg

[//]: # (footnotes)

Expand Down
7 changes: 7 additions & 0 deletions hmac/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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-11-25)
### Changed
- Bump `digest` crate dependency to v0.10 and replace `crypto-mac` with it ([#97])
- Use a more efficient state representation by using block-level hash API. Introduce `SimpleHmac` as an alternative implementation. ([#97])

[#97]: https://github.com/RustCrypto/MACs/pull/97

## 0.11.0 (2021-04-29)
### Changed
- Bump `crypto-mac` crate dependency to v0.11 ([#73])
Expand Down
17 changes: 9 additions & 8 deletions hmac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hmac"
version = "0.11.0"
version = "0.12.0" # Also update html_root_url in lib.rs when bumping this
description = "Generic implementation of Hash-based Message Authentication Code (HMAC)"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
Expand All @@ -12,14 +12,15 @@ readme = "README.md"
edition = "2018"

[dependencies]
crypto-mac = "0.11"
digest = "0.9"
digest = { version = "0.10", features = ["mac"] }

[dev-dependencies]
crypto-mac = { version = "0.11", features = ["dev"] }
md-5 = { version = "0.9", default-features = false }
sha2 = { version = "0.9", default-features = false }
streebog = { version = "0.9", default-features = false }
digest = { version = "0.10", features = ["dev"] }
md-5 = { version = "0.10", default-features = false }
sha-1 = { version = "0.10", default-features = false }
sha2 = { version = "0.10", default-features = false }
streebog = { version = "0.10", default-features = false }

[features]
std = ["crypto-mac/std"]
std = ["digest/std"]
reset = [] # Enable ability to reset HMAC instances
3 changes: 0 additions & 3 deletions hmac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
![Apache2/MIT licensed][license-image]
![Rust Version][rustc-image]
[![Project Chat][chat-image]][chat-link]
[![Build Status][build-image]][build-link]

Pure Rust implementation of the [Hash-based Message Authentication Code (HMAC)][1].

Expand Down Expand Up @@ -48,8 +47,6 @@ dual licensed as above, without any additional terms or conditions.
[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/260044-MACs
[build-image]: https://github.com/RustCrypto/MACs/workflows/hmac/badge.svg?branch=master&event=push
[build-link]: https://github.com/RustCrypto/MACs/actions?query=workflow%3Ahmac

[//]: # (general links)

Expand Down
Loading

0 comments on commit c0dbef1

Please sign in to comment.