Typedefs | |
| using | ExpectedKey = StormByte::Expected<Secure::Password, Error> |
| Expected secret key material or a typed HKDF error. | |
Enumerations | |
| enum class | Algorithm { SHA256 , SHA384 } |
| Supported HKDF hash functions. More... | |
| enum class | Error { UnsupportedAlgorithm , InvalidPseudorandomKeySize , OutputTooLong , BackendFailure } |
| Errors returned by HKDF operations. More... | |
Functions | |
| ExpectedKey | Extract (Algorithm algorithm, std::span< const std::byte > salt, const Secure::Password &inputKeyMaterial) |
| HKDF-Extract: derive a pseudorandom key from binary salt and input key material. | |
| ExpectedKey | Expand (Algorithm algorithm, const Secure::Password &pseudorandomKey, std::span< const std::byte > info, std::size_t outputSize) |
| HKDF-Expand: derive binary secret output from a PRK and context information. | |
|
strong |
Supported HKDF hash functions.
| Enumerator | |
|---|---|
| SHA256 | HKDF-SHA-256 (32-byte PRK). |
| SHA384 | HKDF-SHA-384 (48-byte PRK). |
|
strong |
Errors returned by HKDF operations.
| ExpectedKey StormByte::Crypto::HKDF::Expand | ( | Algorithm | algorithm, |
| const Secure::Password & | pseudorandomKey, | ||
| std::span< const std::byte > | info, | ||
| std::size_t | outputSize ) |
HKDF-Expand: derive binary secret output from a PRK and context information.
| algorithm | HKDF-SHA-256 or HKDF-SHA-384. |
| pseudorandomKey | Wiped PRK, at least HashLen bytes long. |
| info | Borrowed context bytes; empty information is valid. |
| outputSize | Exact requested output size, including zero. |
| ExpectedKey StormByte::Crypto::HKDF::Extract | ( | Algorithm | algorithm, |
| std::span< const std::byte > | salt, | ||
| const Secure::Password & | inputKeyMaterial ) |
HKDF-Extract: derive a pseudorandom key from binary salt and input key material.
| algorithm | HKDF-SHA-256 or HKDF-SHA-384. |
| salt | Borrowed salt bytes. An empty salt is treated as HashLen zero bytes. |
| inputKeyMaterial | Secret input key material in wiped storage; empty input is valid. |