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.1

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.1.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.1-cp311-cp311-win_arm64.whl (22.1 kB view details)

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

gbp_stack-1.2.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: gbp_stack-1.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 20716bc15b9ee10832c7daf4d3fe6f864be3651f7656595b8bd5fd1a7eb838f7
MD5 3d4a6330398b22d72c1461e4df312ebe
BLAKE2b-256 4ffaf80fc2cace3c1f027b0796b3a866c572d75a45cf8216c74de67c2a1cf038

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.1.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.1-cp311-cp311-win_arm64.whl.

File metadata

  • Download URL: gbp_stack-1.2.1-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.1-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 bee0dc3f8e7bd7835e20e158fe81cf9e73155e538a919274ae201104f493a516
MD5 8fa5189ce33fe7c87dfe79437486a40d
BLAKE2b-256 4f2111667a4b361bae6ca87e33be4553575a7f0ed6d1c58e7aa157ac4d2cb520

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gbp_stack-1.2.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b1859979b4c8f0414f77ac2865ffd1752622b63968ba89d4afc224531235540c
MD5 fad5e57effd147e66b7f99bb846e22cd
BLAKE2b-256 a53a181c564ccf33ca01b8a1c7b6eab45da9c1f112e5a5f37221e18e94e8d105

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.1-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.1-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.1-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ad48cba272f037984e468d7eb4198fd5efc1207b2c56155385b381299d1411d
MD5 1c80294fae32619e53ab8ada318cd894
BLAKE2b-256 9b1224508099407cfbea731c9fa7cdad086be095d4d8ced54bdc4fad96fb32ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.1-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.1-cp311-cp311-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.1-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 24fca43c17bd9fcc35982a35683e3fab35a443621df8d303a771cdb3b066e3f8
MD5 7940ebf596dfd4df324af4222937cf26
BLAKE2b-256 a2bbc79d5f63066735b78d2fa13a26ff40b73114a667aff801c4082c1f8eeebb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.1-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.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 cbc9f9e3bbc1a63fc0d3a5ed95f8bc493d48792346e3152040aa9ba10dd930d8
MD5 1d9b920cd8234d35412f9a9d4067cd9d
BLAKE2b-256 3fc695099e570dde6136290923cb9f4d90b3d8b580e9d898b7cb5918f1bc0784

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.1-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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gbp_stack-1.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 66c321f465bb79c5ace7eff523e854b6ce6a6537931d5d78ae002a066f3f320e
MD5 4ddaa41b1415282f504ecc6cf0d9f3df
BLAKE2b-256 5324706c32244ed3c5069d72d2ce0f001bdbee2a022898cff405473c69c84100

See more details on using hashes here.

Provenance

The following attestation bundles were made for gbp_stack-1.2.1-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