aws_lc_rs::unstable::kdf

Function sskdf_digest

Source
pub fn sskdf_digest(
    algorithm: &'static SskdfDigestAlgorithm,
    secret: &[u8],
    info: &[u8],
    output: &mut [u8],
) -> Result<(), Unspecified>
Available on crate feature unstable only.
Expand description

§Single-step Key Derivation Function using digest

This algorithm may be referred to as “Single-Step KDF” or “NIST Concatenation KDF” by other implementors.

§Input Validation and Defaults

  • output.len(), secret.len(), info.len() each must be <= 2^30.
  • output.len() > 0 and secret.len() > 0`

§Implementation Notes

This implementation adheres to the algorithm specified in Section 4 of the NIST Special Publication 800-56C Revision 2 published on August 2020. Using Option 1 for the auxiliary function H.

Specification is available at https://doi.org/10.6028/NIST.SP.800-56Cr2

§Errors

Unspecified is returned if input validation fails or an unexpected error occurs.