/** * Canonical info strings (spec §6.1, §6.6, §6.11). Every derivation in * px402 uses exactly one of these. They are the domain-separation boundary * between a wallet's secrets: two derivations sharing a string would let * knowledge of one secret reveal another. Byte-exact with * `crates/px402-core/src/kdf.rs`'s `pub mod info`. */ export declare const INFO: Readonly<{ RESERVE: Uint8Array; COIN: Uint8Array; WITHDRAW_BLIND: Uint8Array; REFRESH_SEED: Uint8Array; TRANSFER: Uint8Array; REFRESH_COIN: Uint8Array; REFRESH_BLIND: Uint8Array; SELECT: Uint8Array; }>; /** * HKDF-SHA-512 (extract with an empty salt, then expand). * * An empty salt is deliberate: the IKM in this SDK is always either a * high-entropy wallet seed or a Diffie-Hellman secret, so the extract * step's salt adds nothing, and omitting it keeps the derivation * reproducible across independent implementations (Rust issuer, this SDK). * Passing `undefined` here is RFC 5869 §2.2's defined behaviour for "no * salt provided" -- it is substituted with `HashLen` zero bytes inside * `@noble/hashes/hkdf`'s `extract` step -- which is exactly what Rust's * `Hkdf::::new(None, ikm)` does. This is NOT the same thing as * passing a zero-length byte string for `info`; `info` is the caller's * domain-separation tag and is never empty in this SDK. * * Throws when `outLen` exceeds `MAX_HKDF_OUT` (16,320 bytes for SHA-512) -- * the RFC 5869 §2.3 limit on a single HKDF-Expand call -- naming both the * requested length and the cap. This is checked explicitly here, before * calling into `@noble/hashes`, rather than left to the underlying * library's own bound (which throws a generic message with neither number * attached) or documented as holding "by construction": the Rust * implementation made exactly that assumption once, left it unenforced, * and it held right up until the first real 2048-bit RSA modulus reached * it. */ export declare function hkdf(ikm: Uint8Array, info: Uint8Array, outLen: number): Uint8Array; /** Convenience wrapper returning a fixed 32-byte derivation. */ export declare function hkdf32(ikm: Uint8Array, info: Uint8Array): Uint8Array;