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

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

gbp_stack-1.1.2-cp311-cp311-macosx_11_0_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

gbp_stack-1.1.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.1.2.tar.gz.

File metadata

  • Download URL: gbp_stack-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c7815b35dca424a58a883cb825e37b63bcea1954e1760cc2c9d9f2b5817cacf1
MD5 e7325b36309220cd169caf22f079f0f4
BLAKE2b-256 f1fdec31465c58167c4e5111d95908e635889ee5e3b3e6dca75222933a004995

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.2-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.2-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 aa1f8fd4772e1083184aa08ec37fd2dfa32322b0ebe10797830fd240bf45ebcb
MD5 055f555fef10e978b126ab3cd5862273
BLAKE2b-256 2aac03dfcce85b1f8fec891506f779cc37c6d0741cb585b612cdb8861656fee0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7d73fc0b29af8b89534aa3f52e504d8eec645018c0419508115d6f1212e59310
MD5 8428055cd399470077b9865d6ce395a0
BLAKE2b-256 6054986be634d12df28fadc856b6c723699a69ad6c8f574f383a64a1c0a08a99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.2-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3f8aed7a651bfe44dbbf5b3cc6d26b92689b9e36c1186a28fefa9e132f6c470
MD5 6b3b2081e3414eddbcc5153292e75c19
BLAKE2b-256 4dc62d23609ea284bd8f582af70abcda8a6f5e6b36779fdae2d49ffaa6cbe66a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.2-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd730f9918909c9ea6693136a5ca4b0552949a4d9a1d34bb2d7514462ea91989
MD5 de6c4d6f90c5f7ced3faafb135edc09a
BLAKE2b-256 a4995e11f775b8e584b05c14433341b0d8014fddb27534e95c44334dde4dc524

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.2-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7fb6a96a3a02e607326ce3993506e709e823d30708edf528e10983c90822bb1e
MD5 3b356cb1fe0d12a0d45a3dc83e23167c
BLAKE2b-256 ca635ddefabb7bc7126b24aa3cf64730f6fad04016737de1d89b11e389047b0b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ed1b64324895f9986b41088df9a1d91cc16aa6924b39e5920e5d7c495fca77b
MD5 c6d965b6d6bf3419b6e6eac21d5de7c0
BLAKE2b-256 31acf73bc685d1dfceb450aa0f063df100ea532b04dbeb9d35563227a5bb3ad5

See more details on using hashes here.

Provenance

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