Skip to main content

Crate phantom_protocol

Crate phantom_protocol 

Source
Expand description

§Phantom Protocol SDK

Post-quantum secure L4/L6 universal transport framework.

Provides:

  • Hybrid key exchange (X25519 + ML-KEM-768; X-Wing-style combiner). Under --features fips the classical half swaps to ECDH-P-256.
  • Hybrid signatures (Ed25519 + ML-DSA-65) — both halves must verify.
  • PhantomUDP, a native reliable transport over raw UDP (the production transport), plus byte-pipe SessionTransport impls for TCP, browser WebSocket, WASI, embedded UART/USB, and an off-by-default TLS-mimicry leg.
  • Seamless single-path connection migration (not multipath aggregation — that was deliberately rejected) with liveness detection and keep-alive PINGs.
  • Stream multiplexing (reliable + unreliable).

The core transmits only Vec<u8> / Bytes. Serialization (JSON, Protobuf, etc.) is the user’s responsibility.

Re-exports§

pub use config::PhantomConfig;std

Modules§

apistd
Phantom Protocol Public API
configstd
cryptostd
observabilitystd
Phantom Protocol observability subsystem.
runtimestd
Async runtime abstraction (Phase 3.1).
securitystd
transport
Phantom Protocol transport internals.
validationstd
Standalone input-validation helpers (DoS / malformed-input guards).

Macros§

impl_embedded_session_transportembedded
Generate a SessionTransport impl for a concrete EmbeddedLeg<$reader, $writer, $n>.

Enums§

CoreError
Universal Core Error Enum compatible with FFI exports