Skip to content

F000NKKK/Group-Protocol-Stack

Group Protocol Stack

License: Apache 2.0

Release Dependabot

Crates IO NuGet PyPI NPM NPM WASM GitHub release GitHub release date

GitHub Issues GitHub Discussions

A layered, end-to-end encrypted group-messaging protocol family built on top of MLS (RFC 9420). One base protocol — GBP — provides framed, replay-protected, AEAD-encrypted delivery; three sub-protocols — GTP, GAP, GSP — provide message semantics for text, audio and signalling, the way TCP and UDP build on top of IP.

Architecture

┌── application ──────────────────────────────────────────────────────┐
│   GTP · GAP · GSP    (TCP / UDP / SCTP-like)                        │
├─────────────────────────────────────────────────────────────────────┤
│   GBP                (the IP-like base)                             │
│   - frame codec  - AEAD  - replay window  - FSM  - control plane    │
├─────────────────────────────────────────────────────────────────────┤
│   MLS (RFC 9420)     (group key agreement, exporter)                │
└─────────────────────────────────────────────────────────────────────┘

Bindings

The same protocol family is published from one source tree to every major package manager. Each binding ships pre-built native binaries for win-x64, win-arm64, linux-x64, linux-arm64, osx-x64 and osx-arm64.

Language Package Source README Examples
Rust gbp-stack crates/gbp/stack README gtp_chat · gap_audio · gsp_signals
.NET GBPStack csharp/GBPStack README GtpChat · GapAudio · GspSignals
Python gbp-stack python README gtp_chat · gap_audio · gsp_signals
Node.js @voluntas-progressus/gbp-stack js README gtpChat · gapAudio · gspSignals
Browser (WASM) @voluntas-progressus/gbp-stack-wasm crates/gbp/wasm README gtpChat · gtpChat (html)

Rust crates

The reference implementation is a Rust workspace. The umbrella crate gbp-stack re-exports every layer; smaller consumers can depend on individual crates directly.

Crate Purpose
gbp-core Shared type vocabulary (StreamType, flags, FSMs, error codes)
gbp-protocol Base GBP layer: GbpFrame, control plane, ErrorObject
gtp-protocol Group Text Protocol (text + attachments + history/watermark)
gap-protocol Group Audio Protocol (Opus + key-overlap buffer + jitter)
gsp-protocol Group Signaling Protocol (signals + per-signal validation + roles + capabilities)
gbp-mls MLS (RFC 9420) integration via openmls
gbp-transport Length-prefixed TCP adapter + async QUIC transport (quinn)
gbp-node GBP-layer group node (FSM, replay, control plane, coordinator handover, timer engine, tie-break)
gbp-sframe SFrame (draft-ietf-sframe-enc) E2EE for GAP audio streams
gbp-proto Protobuf schemas for GBP/GTP/GAP/GSP (via prost, no protoc)
gbp-flat FlatBuffers schemas for GBP/GTP/GAP/GSP (via planus, no flatc)
gbp-stack Top-level facade re-exporting every layer
gbp-stack-ffi C ABI / cdylib for non-Rust consumers
gbp-cli Reference CLI (`gbp-node listen

Payload codec

Every sub-protocol (GTP, GAP, GSP) can encode its payload as CBOR, Protobuf, or FlatBuffers. The codec is negotiated per-frame via the pf field of the enclosing GBP frame. The default (pf=0, CBOR) is omitted from the wire for backward compatibility.

PayloadCodec::Cbor        (0) — default; pf field omitted when 0
PayloadCodec::Protobuf    (1) — via gbp-proto / prost
PayloadCodec::FlatBuffers (2) — via gbp-flat / planus

Callers pass codec to every send / accept call; the chosen codec is echoed back in the payload_received event so the receiver can decode correctly.

Specifications

See docs/ for the protocol specifications (English in docs/en/, Russian in docs/ru/).

License

Licensed under Apache License, Version 2.0.

About

Layered E2EE group-messaging protocol stack built on MLS (RFC 9420). Includes GBP base layer, GTP/GAP/GSP sub-protocols, SFrame media encryption, and cross-platform bindings for Rust, .NET, Node.js and Python.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors