#key-derivation #derivation #message-authentication #bip-32 #bip-39 #mnemonic #root-key

no-std hkd32

HMAC-based Hierarchical Key Derivation: deterministically derive a hierarchy of symmetric keys from initial keying material through repeated applications of the Hash-based Message Authentication Code (HMAC) construction. Optionally supports storing root derivation passwords as a 24-word mnemonic phrase (i.e. BIP39).

11 releases (6 breaking)

0.7.0 May 11, 2022
0.6.0 Jun 17, 2021
0.5.0 Oct 19, 2020
0.4.0 Jun 18, 2020
0.1.2 Jul 24, 2019

#942 in Cryptography

Download history 2898/week @ 2024-06-08 1934/week @ 2024-06-15 2786/week @ 2024-06-22 2670/week @ 2024-06-29 2455/week @ 2024-07-06 2443/week @ 2024-07-13 3034/week @ 2024-07-20 2037/week @ 2024-07-27 2071/week @ 2024-08-03 2109/week @ 2024-08-10 2146/week @ 2024-08-17 2293/week @ 2024-08-24 2474/week @ 2024-08-31 2344/week @ 2024-09-07 2232/week @ 2024-09-14 1987/week @ 2024-09-21

9,429 downloads per month
Used in 34 crates (6 directly)

Apache-2.0 OR MIT

52KB
1K SLoC

HMAC-based Hierarchical Key Derivation iqlusion

Crate Docs Apache 2.0 Licensed MSRV Build Status

hkd32 is a Rust library which implements a hierarchical deterministic symmetric key derivation construction inspired by BIP-0032: Hierarchical Deterministic Wallets.

It can be used to deterministically derive a hierarchy of symmetric keys from initial keying material (or when the mnemonic feature is enabled, through a 24-word BIP39 passphrase) by repeatedly applying the Hash-based Message Authentication Code (HMAC).

This construction is specialized for deriving 32-byte (256-bit) keys from an initial 32-bytes of input key material.

Documentation

Minimum Supported Rust Version

  • Rust 1.57

License

Copyright © 2019-2021 iqlusion

Includes code from the bip39 crate. Copyright © 2017-2018 Stephen Oliver, with contributions by Maciej Hirsz.

hkd32 is distributed under the terms of either the MIT license or the Apache License (Version 2.0), at your option.

See LICENSE (Apache License, Version 2.0) file in the iqlusioninc/crates toplevel directory of this repository or LICENSE-MIT for details.

Contribution

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

Dependencies

~0.8–1.3MB
~29K SLoC