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.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.0.0.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.0-cp311-cp311-win_arm64.whl (18.8 kB view details)

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

gbp_stack-1.0.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: gbp_stack-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 8b9cf0ddda2bda2ae59a4d7dc32e0dcfc2b3aab943a5e1fdbd8406c96563e467
MD5 4d21001a5e342a40df28bae9d2564515
BLAKE2b-256 72bfeba078a2b1f4d439c854f956ed3049b12724eaf7c39dfdb8ff0c4611710c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.0.0-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.0-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 36696562f6a318842542cdfa23383964a73ad059cd6df541036f2659a75a3464
MD5 35e848292095ba823729613466ab1ba7
BLAKE2b-256 44146f98efa65f131feb118d0e557c4fa05c2e43f0b9a4a02567acb064245efe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.0.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d030ed8dd66bf0545c295e1819d1801af2745ab79466c1e477361193aee4e1ad
MD5 16d60b8a43eed0bc1138047bf4adae36
BLAKE2b-256 de6b63c675eb6b9df61d2dc2a093865dfa9e629c4a68d03257aa592c458a6616

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b7486e453e6581ca49a4ddb8922a44f48eb1d9860d9f94a658b94d35db5fc69
MD5 25fc44197a891531b7eb718f366a7830
BLAKE2b-256 060cb6d2d3af0e2268465c983de50175924ac87af3c425c918fa0743e6fe89a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6792ff6a3adce5784f8222bf7254203af4a943c0c0f65b2be7f6b19f97aa0c92
MD5 fe28ba26005afd687aef51f04444b751
BLAKE2b-256 1bc59b6f8bc647002555b847be79c8ad6857281a8cd5a9f6fbf474cd17a9f372

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 a108e293044f3c51eebd20025b5fb49446781d61b23bfdb286a053fe9ea271ca
MD5 55960800b1c5c8750f1d96de6760d496
BLAKE2b-256 8fc95084894827736d5b78c092fa00a7f48d0c9db93d992caf63da4b21588cab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d1346f44955dec451b389d43cf418c45a49fb8c00d4c9e535bfda34616aed13c
MD5 c3bd5a0e31e49b2ceb5b392ee4ef0417
BLAKE2b-256 e7d22131cb9c00e38257b62bf39090cf6714d3c758c88c11950cf8a6dcf93041

See more details on using hashes here.

Provenance

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