Skip to main content

Python bindings for the Group Protocol Stack: a layered, end-to-end encrypted group-messaging protocol family built on top of MLS (RFC 9420).

Project description

gbp-stack — Python bindings for the Group Protocol Stack

License: Apache 2.0

Python bindings for the Group Protocol Stack: a layered, end-to-end encrypted group-messaging protocol family built on top of MLS (RFC 9420).

This package wraps the native gbp_stack shared library through ctypes. The wheel for each supported platform bundles the appropriate native binary under gbp_stack/_native/<rid>/.

Layers

┌── application ──────────────────────────────────────────────────────┐
│   GtpClient · GapClient · GspClient   (TCP / UDP / SCTP-like)       │
├─────────────────────────────────────────────────────────────────────┤
│   GroupNode (GBP — IP-like base)                                    │
├─────────────────────────────────────────────────────────────────────┤
│   MlsContext (RFC 9420)                                             │
└─────────────────────────────────────────────────────────────────────┘

Sub-protocol toolkits

Beyond the protocol clients, the package ships ready-made helpers:

  • MessageHistory + Watermark — bounded GTP message log + per-sender high-water mark for serving and consuming resync requests.
  • JitterBuffer — bounded GAP reorder window keyed by media_source_id, with push, pop_in_order, pop_force and late-frame detection.
  • RoleRegistry + Permissions — bind numeric role ids to permission bit-masks and check them with require / has.
  • CapabilitiesNegotiator — track per-member advertisements and query the intersection, union, group_supports and missing views.
  • SFrameSession + SFrameEncryptor — SFrame (draft-ietf-sframe-enc) E2EE for GAP audio frames; per-sender AES-GCM keys derived from MLS exporter, 1024-entry sliding-window replay protection.

Install

pip install gbp-stack==1.2.3

Quick start

from gbp_stack import MlsContext, GroupNode, GtpClient

with MlsContext.create("alice") as alice_mls, \
     MlsContext.create("bob")   as bob_mls:

    bob_kp  = bob_mls.export_key_package()
    welcome = alice_mls.invite(bob_kp)
    bob_mls.accept_welcome(welcome)

    group_id = alice_mls.group_id
    with GroupNode.create(member_id=1, group_id=group_id) as alice, \
         GroupNode.create(member_id=2, group_id=group_id) as bob, \
         GtpClient.create() as gtp_alice, \
         GtpClient.create() as gtp_bob:

        alice.bootstrap_as_creator(alice_mls.epoch)
        bob.bootstrap_as_joiner(bob_mls.epoch)

        frame = gtp_alice.send(alice, alice_mls, target=2,
                                message_id=0xCAFE_F00D, text="hello")
        for ev in bob.on_wire(bob_mls, frame.wire):
            if ev.kind == "payload_received" and ev.stream_type == 2:
                print(gtp_bob.accept(ev.plaintext).text)

License

Licensed under Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbp_stack-1.2.3.tar.gz (17.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gbp_stack-1.2.3-cp311-cp311-win_arm64.whl (22.1 kB view details)

Uploaded CPython 3.11Windows ARM64

gbp_stack-1.2.3-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

gbp_stack-1.2.3-cp311-cp311-manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11

gbp_stack-1.2.3-cp311-cp311-manylinux2014_aarch64.whl (21.9 kB view details)

Uploaded CPython 3.11

gbp_stack-1.2.3-cp311-cp311-macosx_11_0_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

gbp_stack-1.2.3-cp311-cp311-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file gbp_stack-1.2.3.tar.gz.

File metadata

  • Download URL: gbp_stack-1.2.3.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gbp_stack-1.2.3.tar.gz
Algorithm Hash digest
SHA256 efcfd56302191eb55a31fb8b9df93e686046aea743acfa0f4b0f4312dda00df6
MD5 4a949fcb076d5ba1dddb97843e68b971
BLAKE2b-256 3fc58f79f9634938357576579ae817ad1faea727944b8a16923b0ad20f3c70f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.3.tar.gz:

Publisher: release.yml on F000NKKK/Group-Protocol-Stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gbp_stack-1.2.3-cp311-cp311-win_arm64.whl.

File metadata

  • Download URL: gbp_stack-1.2.3-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: CPython 3.11, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gbp_stack-1.2.3-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 589ab1707f69a4117c6adb7f65cb3982c6d3d2118d1df5d0c3e6728f49dc3288
MD5 73eeac681caba7f16fbdd89a22544309
BLAKE2b-256 e2a93401dcc84282f6221320e91b28d221470eb4410b786cf36a442e5f8df969

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.3-cp311-cp311-win_arm64.whl:

Publisher: release.yml on F000NKKK/Group-Protocol-Stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gbp_stack-1.2.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gbp_stack-1.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gbp_stack-1.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 69822a7b5fd588f228bebc3369ed0fe1ebe4dd71f14ea344eca21f41d70f1f89
MD5 f99574890d08949d76d9a0b69a481052
BLAKE2b-256 63f1a5629d9a51f61af106f9b2a84dad27f4c0254adfffa6015e9a0d48271590

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.3-cp311-cp311-win_amd64.whl:

Publisher: release.yml on F000NKKK/Group-Protocol-Stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gbp_stack-1.2.3-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.3-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99a4be0855bbdc654d2c5984885e6fff32b78162eaef08a5293e7f94d382b847
MD5 a52fbd1226fae98be6b9d9a9bcdebc3e
BLAKE2b-256 9a7c509258fe68fbfc5382ff1e01a182392f03cd85a47592f15fdde691cef2a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.3-cp311-cp311-manylinux2014_x86_64.whl:

Publisher: release.yml on F000NKKK/Group-Protocol-Stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gbp_stack-1.2.3-cp311-cp311-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.3-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2818274660bda75ddfccc7ca3fba0138ffa3ee93dd26f3b71611decafb2cf759
MD5 80c395f4e9276047bdb9cd655fd757f8
BLAKE2b-256 aafbffa8915e5bc4413b382a5e6851f4a19c089489f7473b0f078962364afc95

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.3-cp311-cp311-manylinux2014_aarch64.whl:

Publisher: release.yml on F000NKKK/Group-Protocol-Stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gbp_stack-1.2.3-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.3-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 943d24aa16553e3c31fb99118bf11ea6ae1ebf727138fff8d95c845b5de1331e
MD5 3b92c7c2e72995eb5e5274593fe11cdb
BLAKE2b-256 112cf44036091c5a38a06144d6133d9a4febf01358d002d24f147a8cfd94b136

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.3-cp311-cp311-macosx_11_0_x86_64.whl:

Publisher: release.yml on F000NKKK/Group-Protocol-Stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gbp_stack-1.2.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed91c6c060a9854832f4a935f2f6faba03aa698410cac2b087ab4af0419b3045
MD5 f8aa0c0b84c08a55320978fe655fc316
BLAKE2b-256 2863dd20844c0c56f2af6094e0e8f7ba4cc07ba21d1ea030b87a81258f2b7826

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on F000NKKK/Group-Protocol-Stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page