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

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

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

gbp_stack-1.1.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: gbp_stack-1.1.3.tar.gz
  • Upload date:
  • Size: 15.4 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.3.tar.gz
Algorithm Hash digest
SHA256 d3107ca05cfa468b803f0555b166760a30aafa3c8582cc38a0a675595b44d8f8
MD5 0f2b8809e40332a323377723c370690f
BLAKE2b-256 426f35a8be501466f1e2dca73334fd48002b4e5e2bf86b7a1f8ef9f09900e971

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.3-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.3-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 e8cb0807a8698e4a1f52791a8674748137f9e08d8b54b1b2f747a9e9a7b216c3
MD5 6ceba33a0d50d18988e4a38a83e8ac23
BLAKE2b-256 06241797fd8696166c7c0442ebe18b8d48f4f257f3d2e70a774679424e88e1ec

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.3-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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5b44516958dde3e40235e189eae06c151c48169765b2f08785fdccee3301e784
MD5 7ea7b91f6b1b0c050f3c5e1e4d502c06
BLAKE2b-256 1a10be6d2ec2b9ae931e80f3f0663f0b51bfd36511716d3f6f69c7897bd05931

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.3-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b1cfe2485e2ea20066d3711d048d3f7d45930b13417ff01ccaaeece81281977
MD5 45a23dd5b15d9ebdbe5daef8cf0449d4
BLAKE2b-256 ab788bbbc9f564be201711151d0cef4914a2f5323beb48807893e680dc0efb1e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.3-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9d95fb2a3c43de454db768768488cdbf683e265f8b21d5840f5ebbc2d004e5be
MD5 9cb5555fb2aa28753f1ca1b367d0e09d
BLAKE2b-256 ceaec7b114dc63124ac7094382012d9c0c38d8670abbaa664236eec4c1774d2e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.3-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c3a5151e12b8bf9e170015f485329562a2042ee0933bc7958cd042910977468f
MD5 7768984cde4b048c2e7ea23e1df4caec
BLAKE2b-256 e67ca6adc25c1dbac35a7f806cc222f1f3dfb195eaaa7b1f78832f1103f32e4c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8e98c728016391e05e4fecde1bb6f14ab9ea1ba1d9634d9d4250f8b6b691a9b
MD5 37731507ebf110734302660d907ceef5
BLAKE2b-256 c5e33a443015cc49fedb2e8047eb3d5a64c2d6697442cb0b6327be62e6e56246

See more details on using hashes here.

Provenance

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