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

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

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

gbp_stack-1.2.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: gbp_stack-1.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2fc8c2fdbe9bcbc33e0406339735808d8a92e7fecc4c6b2bffc0b15a4d787e15
MD5 38d0c0a2dc94590dd026609593566a3e
BLAKE2b-256 e384d187d5de65c7fca498b603b8aceae9584517523445116ccd6c42973e002b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.2.2-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.2-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 1b6fe12b648783cd134c1ead3ee55666c9d42895e0a6dd0ec5bfaa19d151ad58
MD5 3196a17176e859522d4f3f408122f4b2
BLAKE2b-256 6f6b89c5b701237e4cbf7ec9b876fa5702ac3b850ccecdb4cdcd5d6d98c41095

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.2.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8d8cdab1ee135fef2c2b6d3972ad6f407750edde08f03af9e964701295f3178f
MD5 e14b7214eac025578dbd19e3895c6bc8
BLAKE2b-256 30501e6f928a4bb692bd08bde81f7a46e6bd7c920025dfac8e59fe34baed4c83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.2-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48991fe040885892966258b30bdf2fe5c6ce6b2acff9500ebea0ebe5d6748312
MD5 aad9e4a43d2eaac8c9acd3b922be6bca
BLAKE2b-256 604ef6922ebeaae6c4307b802bffb77fb6c51d561cbf1cd6c0fda85ed5992028

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.2-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 433b10e2df2dec550247d420673f3f9e4b2bcd65c9c4d0a62927192aeb18c9c4
MD5 f2dbdb079c9166fa75e67dc0e8b305a3
BLAKE2b-256 b7c26a429ae66f2c1aec9a993359197ac405c5a2941a7ae0f006a672a3001556

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.2-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5f5e88b70ca672bd2c3e4359c8786c7b61d5c06c18d625aaba778506845a7723
MD5 613ebf396db1904abd6a3be1825b2969
BLAKE2b-256 3263d22700e792d60f1ec32b3b43f5e12ee0683aafe2069becdcc03a507dc987

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d84edbe29b9c955bf56bac3eb4f4b90d48d8a40a7b211c53f9684c2e196d8095
MD5 426ddd22bebbffb194286a3383a95cb0
BLAKE2b-256 c23701e95566617747eeffdb102ef206bdea49c116ded6614ce93fcb36bb7f46

See more details on using hashes here.

Provenance

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