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.

Install

pip install gbp-stack==1.0.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.0.1.tar.gz (14.5 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.0.1-cp311-cp311-win_arm64.whl (18.8 kB view details)

Uploaded CPython 3.11Windows ARM64

gbp_stack-1.0.1-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

gbp_stack-1.0.1-cp311-cp311-manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11

gbp_stack-1.0.1-cp311-cp311-manylinux2014_aarch64.whl (18.7 kB view details)

Uploaded CPython 3.11

gbp_stack-1.0.1-cp311-cp311-macosx_11_0_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

gbp_stack-1.0.1-cp311-cp311-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: gbp_stack-1.0.1.tar.gz
  • Upload date:
  • Size: 14.5 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.0.1.tar.gz
Algorithm Hash digest
SHA256 6d5a5445ea1071d4e68c950b8025148345cd86ed04825bbd78076d013f343c7b
MD5 7ba625e986486546162ccf6f7c1c86ab
BLAKE2b-256 1381fa29fba4ecd8c020310f3737fe099b70c6a4f955a6449a66bc1a4f37e8b7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.0.1-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 18.8 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.0.1-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 559503268e9ebc9a33e3737a93f83f7421d2044451cb6e87ccc7028ce024e369
MD5 fd5dde2abab86e3e0d8d6923a5218c90
BLAKE2b-256 2c378923b0487ef4719cee1e9f940eee8878523a8ae91c5bf21f9a2f9d1c1515

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.1 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.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b139757bd9588d564de7ce117b2a6d8afc476921107f8436239630b905d5d879
MD5 c841baa1f726ef9689780306a52e5604
BLAKE2b-256 48eee8e107e1f856660a7c47e9a23f2bb2aa7d5258613bb0193491be3fd923b5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.1-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 641fddcf93e9e0434e4a37c74daa1bd9045aefaa4200196640b07af4c864547a
MD5 c3daedfb913d9cb685b55304fda77062
BLAKE2b-256 5303049973f1c0ab5c06f60a58205694134ad975ce9a45db1e18592aee0fa274

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.1-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 131e46f62d472b60c4aaa5d551d889b2d09025715295ca2b7c6538de500127b0
MD5 40bc8c24b76019a350e6ad8a94d363b3
BLAKE2b-256 08a43e3f9c19639763bdc45e544cec012e1eef008079b5aaa80ac4c0761e669b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 290f09b19b0817218c4eb85ed7476aa0b0b6d942746f4b8993b1b03e84ad18a3
MD5 2ae629b0fc48caf2ed74f3c4764eba7a
BLAKE2b-256 fc8626a23d67cca6a9f1148303c20f74f2c09b0a6f6880073a627163c775cf6c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9e25af99e4ab70d631788bed3aacacc45882975aa7faf78c2f3b0ab0625afb4
MD5 cba71d0336be4b915ca3574da6805a09
BLAKE2b-256 3e039a43aec388240c3b276aac951062ef56656dca2688c1a6b29243ccc69810

See more details on using hashes here.

Provenance

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