confium_tc/lib.rs
1#![allow(missing_docs)] // TODO: document before 1.0
2#![allow(rustdoc::broken_intra_doc_links)]
3#![allow(rustdoc::bare_urls)]
4#![allow(rustdoc::redundant_explicit_links)]
5#![allow(rustdoc::private_intra_doc_links)]
6#![allow(rustdoc::invalid_html_tags)]
7//! Confium threshold-cryptography primitives — the headline deliverable.
8//!
9//! This crate is a **compatibility facade** that re-exports the core
10//! session primitives from [`confium_tc_core`] and adds:
11//!
12//! - the `cfm_tc_*` FFI surface for threshold sessions
13//! - async session coordinator (for globally distributed signers)
14//! - share re-sharing + proactive refresh (committee evolution without
15//! changing public key)
16//! - threshold KEM session interface (parallel to signing session)
17//! - Paillier encryption (used by CMP20 / GG18 MtA)
18//!
19//! ## Migration: `confium-tc` → `confium-tc-core`
20//!
21//! New consumers should depend on `confium-tc-core` directly for the
22//! session primitives (Session, SessionParams, Party, PartyList, Share,
23//! TcScheme, etc.). The coordinator, KEM, Paillier, and reshare modules
24//! are still being extracted and remain in this crate temporarily.
25//!
26//! See `TODO.roadmap/04-threshold-cryptography.md` — this is the entire
27//! reason Confium exists.
28
29// Re-export the identical modules from confium-tc-core. These were
30// verified byte-identical (diff=0) before the facade conversion:
31// error, message, party, registry, session, share, share_envelope.
32// ffi and inprocess have tc-specific concerns (unsafe, different imports)
33// and remain as local modules.
34pub use confium_tc_core::error;
35pub use confium_tc_core::message;
36pub use confium_tc_core::party;
37pub use confium_tc_core::registry;
38pub use confium_tc_core::session;
39pub use confium_tc_core::share;
40pub use confium_tc_core::share_envelope;
41
42pub use confium_tc_core::Error;
43pub use confium_tc_core::Message;
44pub use confium_tc_core::Party;
45pub use confium_tc_core::PartyList;
46pub use confium_tc_core::Result;
47pub use confium_tc_core::RoundResult;
48pub use confium_tc_core::Session;
49pub use confium_tc_core::SessionImpl;
50pub use confium_tc_core::SessionParams;
51pub use confium_tc_core::Share;
52pub use confium_tc_core::TcScheme;
53pub use confium_tc_core::TcSchemeKind;
54
55// Local modules — have tc-specific concerns not yet extracted.
56pub mod coordinator;
57pub mod ffi;
58pub mod inprocess;
59pub mod kem;
60pub mod paillier;
61pub mod reshare;
62pub mod schemes;
63
64// The register_tc_scheme! macro is #[macro_export]'d from tc-core,
65// so `confium_tc_core::register_tc_scheme!` works. Scheme crates call
66// it as `confium_tc::register_tc_scheme!` — re-export for back-compat.
67pub use confium_tc_core::register_tc_scheme;