Skip to main content

syncspin_core/pairing/
mod.rs

1//! Pairing primitives shared by clients and servers.
2//!
3//! The pairing token is the operator-facing half: one string that carries a client's identity
4//! and pairing secret, or a dynamic pairing code, from the client into the server. It is text, so
5//! it lives here unconditionally.
6//!
7//! Code-based pairing additionally authenticates with CPace, a PAKE that turns a short pairing
8//! code into a shared key, and seals the two values that cross the wire under its output. Both
9//! are pure functions of bytes, so they live in this crate rather than in `syncspin-client`,
10//! which owns the pairing attempt state machine. They are behind the `pairing-code` feature: the
11//! default build has no PAKE, no Elligator 2, no AEAD of its own and no dependency on the map.
12
13pub mod token;
14
15#[cfg(feature = "pairing-code")]
16pub mod code;
17
18#[cfg(feature = "pairing-code")]
19pub mod pake;
20
21#[cfg(feature = "pairing-code")]
22pub mod wrap;