You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: export more KDFs (HKDF-SHA384, ANSI X9.63, KBKDF, One-Step KDF) over the C FFI #155
cas-lib: Cryptographic-API-Services/cas-lib#160 (KDFs: KBKDF (SP 800-108), One-Step KDF (SP 800-56C), ANSI X9.63 KDF, HKDF-SHA384). Not implemented in cas-lib yet; this issue tracks exposing it once it ships.
API shape in cas-lib: Follows the HKDF API (CASHKDF-style extract / expand / derive) where it fits; output lengths are capped in cas-lib.
Needs the HKDF export to exist first in this repo (see the HKDF catch-up issue).
Tests
Run the same vectors cas-lib uses through this repo's harness: Wycheproof hkdf_sha384_test.json; NIST CAVP KBKDF and SP 800-56C KATs; SEC 1 / X9.63 vectors.
Implementation notes (cas-core-lib FFI conventions, see CLAUDE.md)
#[no_mangle] pub extern "C" functions; bytes cross as pointer + usize length, never slices or Vecs.
Results are #[repr(C)] structs in the module's types.rs with an error_code; buffers are handed out with export_bytes (never as_mut_ptr + forget), strings with CString::into_raw.
Result structs that hold more than one buffer get a free_<struct> and a row in the CLAUDE.md "Ownership of returned memory" table; every new struct gets the ownership rustdoc (csbindgen copies it into the C# bindings).
Activity