Weave documentation
Filament referencefilament-crypto

filament-crypto · hkdf

Source declarations, signatures and documentation for hkdf.

Read the current implementation boundaries before integration. This reference reproduces declarations; it omits source comments whose examples or readiness claims have not been verified.

Source: sigil/weave/filament/filament-crypto/src/hkdf.rs. SHA-256: e763c07c542b7c51ca20d44beafcdc159d2ef7a77b6b934a5a50e3e5f13cabbc.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

hkdf::HkdfError

#[derive(Error, Debug)]
pub enum HkdfError {
    /// Output length too large
    #[error("output length too large: maximum 8160 bytes (255 * 32), requested {0}")]
    OutputTooLarge(usize),

    /// Key derivation failed
    #[error("key derivation failed: {0}")]
    DerivationFailed(String),
}

Source line: 33.

hkdf::derive_key

pub fn derive_key(
    ikm: &[u8],
    salt: Option<&[u8]>,
    info: &[u8],
    output_len: usize,
) -> Result<Vec<u8>, HkdfError>;

Source line: 74.

pub fn derive_link_keys(
    shared_secret: &[u8],
    link_id: &[u8],
) -> Result<([u8; 32], [u8; 32]), HkdfError>;

Source line: 117.

hkdf::derive_packet_key

pub fn derive_packet_key(session_key: &[u8], packet_nonce: u64) -> Result<[u8; 32], HkdfError>;

Source line: 151.

On this page