Expand description
cfm_tc_* C ABI for the threshold-cryptography session interface.
These symbols are declared #[unsafe(no_mangle)] pub extern "C" and
linked into whichever cdylib depends on confium-tc (today,
confium-core’s libconfium cdylib, eventually a dedicated
confium-ffi). The crate itself is an rlib, not a cdylib.
See TODO.roadmap/04-threshold-cryptography.md for the protocol
rationale and crates/confium-core/src/ffi/rng.rs for the FFI
pattern these entry points mirror.
§Memory ownership
CFMTcMessage **outgoingproduced bycfm_tc_session_roundis a heap array allocated by the framework; the caller frees it withcfm_tc_messages_destroy.CFMTcShare *produced bycfm_tc_dkg_output_shareis a heap allocation; the caller frees it withcfm_tc_share_destroy.FFITcSession *is owned by the caller; destroy withcfm_tc_session_destroy.
Structs§
- CFMTc
Message - One inter-party message, C view.
to_party_id == NULLmeans broadcast. - CFMTc
Message Array - Heap allocation returned by
cfm_tc_session_roundfor the outgoing messages array. The framework owns the backing storage; the caller frees the whole bundle withcfm_tc_messages_destroy. - CFMTc
Party List - Roster of parties, C view.
- CFMTc
Share - A party’s share of a distributed secret, C view.
Enums§
- FFITc
Session - Opaque session handle returned to C.
Functions§
- cfm_
tc_ dkg_ output_ share - For DKG sessions: extract the per-party share and the shared public key.
- cfm_
tc_ messages_ destroy - Free a
CFMTcMessageArrayreturned bycfm_tc_session_round. Safe to call with NULL. - cfm_
tc_ session_ create - Create a new threshold session.
- cfm_
tc_ session_ destroy - Destroy a session. Safe to call with NULL.
- cfm_
tc_ session_ result - Read the final session artifact into
out. - cfm_
tc_ session_ round - Step the session forward one round.
- cfm_
tc_ share_ destroy - Free a
CFMTcSharereturned bycfm_tc_dkg_output_share. Safe to call with NULL.