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

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.1.4.tar.gz (15.3 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.1.4-cp311-cp311-win_arm64.whl (19.8 kB view details)

Uploaded CPython 3.11Windows ARM64

gbp_stack-1.1.4-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

gbp_stack-1.1.4-cp311-cp311-manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11

gbp_stack-1.1.4-cp311-cp311-manylinux2014_aarch64.whl (19.7 kB view details)

Uploaded CPython 3.11

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

Uploaded CPython 3.11macOS 11.0+ x86-64

gbp_stack-1.1.4-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.1.4.tar.gz.

File metadata

  • Download URL: gbp_stack-1.1.4.tar.gz
  • Upload date:
  • Size: 15.3 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.1.4.tar.gz
Algorithm Hash digest
SHA256 5d9b4ea4e1afc36f615eb6098b908b9424e842095aa3d9e0b7c884cf2133ccf7
MD5 d5bd87db859830f8e0d307d72936da0f
BLAKE2b-256 fd83b42532c4ee6c93632584c41d3fe04c35d4c4c4e4d969fb798b9b506651c7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.4-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 19.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.1.4-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 77fd2a3714f5030b061e8d56abf9217c1226aeb1401053b2583ee0a5a6156261
MD5 dd86ac893a79af3859b44c18c08c9aa0
BLAKE2b-256 c5c605d219f66b61161ba7ad1015acce36d80766a6c9c60aa1a211ed52f3b7a7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.2 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.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 26280d74c3a89b1228665048aa12060d8a6aa0d260e8d12808d34564aeb5befd
MD5 0b00150924a7f085f51e964fd852b403
BLAKE2b-256 5dbdec312fc5db374a26e00f30a102cea5951f425518e1408daf8e953894a527

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.4-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9578e65fa3360641a244f969fbc533736240731d1c2f8dc6dca9b1adc739038
MD5 9fdfb0e32c6b9ee78d442087c095a787
BLAKE2b-256 a23204de237845a726fa1ae06be7f31c17a6a4963aa73fdb68f2957f9a9b82bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.4-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1ad6068105adc011f1e3128cbc8f3ba1c089e196bfb0527365360683783eac9c
MD5 34d6264796c3a8ac68c36a69903ff360
BLAKE2b-256 c86ad0dff44eb6ea9668134fdc3687cf83f0c57d74732141bf066c08d4d64382

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.4-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f58a86151ab73b3c8373a0e1364d687d8f2b9da4d1844e881d09a433df1fad08
MD5 ff1764e28220b87593d7f91388f5e360
BLAKE2b-256 ff03f9d7112b5f0168e6a10daf64196f282b630a586c48540be981853fc669fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 32d555afc333dbffbdbba336a3146455beba2af24676f8357ae6d758953d22f8
MD5 f18a3118dd6cc42b5a4ae9f085c8b050
BLAKE2b-256 8eb29d306690b832313c6373ee2d91a5c94a4c94770144e8ed8b97c3bb26a048

See more details on using hashes here.

Provenance

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