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

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

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11macOS 11.0+ x86-64

gbp_stack-1.3.0-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.3.0.tar.gz.

File metadata

  • Download URL: gbp_stack-1.3.0.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.3.0.tar.gz
Algorithm Hash digest
SHA256 5a39b32e5c98c895191af7d0d7259e5701b5021bc24de95957a4a6fda9b019ba
MD5 7effab7290378d0a91a9cc151fd86bc9
BLAKE2b-256 a8a4adcb968ac73d0ce272621dc4dfbc65a09e1643aa41007a245653948447c1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.3.0-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.3.0-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 32a577be41279a5c76742b2d0b972bba702179da491b0e8ab215a3c4933cef31
MD5 f7c8e9c6b2beb4b55915da1760f71205
BLAKE2b-256 d491f31fe3ed4fcb0d21ab7a094ca6eb244eddc244652277eeff4ffc09577c90

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.3.0-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.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f2b6d6a5aef6c3d0273d3d11880a1574cf94dcdbe3c5c5520b604e7197abbb7e
MD5 aa57f123341bb4a4e5c613c79e779acc
BLAKE2b-256 fb063c61adcdec0026d1506d08a00ad7d0fa3169121aee82ed3f4e86c4d5631b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.3.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7589faca75e831a1aca112831d6d1302e34f70af240bc8224c5fc7f184404e1a
MD5 28c324d6e162e6ec02f937f124cf3147
BLAKE2b-256 51a49d20d4611ce09cb98fa647d321c66e93a8bc1433eedc171c769510500290

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.3.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8afa74c0edeec882cf2e7d9826ca9fbd11f68888ea0dc3f45a6c59507cf60e53
MD5 ba24d4db68cee694e0568e4f8ddb982b
BLAKE2b-256 037b43581e9ede08e36ec2d9d012f051fc303e13bb6972881c79dbc610fe0935

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.3.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 4ec543d32240351e1e42c0e4ec92ae4f510f65dbeff9fd3418da2b5f8ccafb3d
MD5 d5f8f32d8690d00864c534eb1754f247
BLAKE2b-256 2996accbf19319eb880ced87a551d48321d53152b323b6d4dab9c8700c17f701

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae674cfadcc0a0584d6e992e30a40b24dd3494f979b3ff243f76ef65c74e0d10
MD5 7751798cb160b2c26536ec56e422d050
BLAKE2b-256 2fdcbfa27bfbbb44a944ffa04e5c275a80abab8a8ca20619515548cf4a679411

See more details on using hashes here.

Provenance

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