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.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.1.0.tar.gz (15.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.1.0-cp311-cp311-win_arm64.whl (19.6 kB view details)

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

gbp_stack-1.1.0-cp311-cp311-manylinux2014_aarch64.whl (19.4 kB view details)

Uploaded CPython 3.11

gbp_stack-1.1.0-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.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.1.0.tar.gz.

File metadata

  • Download URL: gbp_stack-1.1.0.tar.gz
  • Upload date:
  • Size: 15.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.1.0.tar.gz
Algorithm Hash digest
SHA256 0b183948782c06e2d84c9fb4a8e6d8af01d4ba06110d3cbee8a70358eb8f4d1f
MD5 953e43c302634e0519ad427d6f607438
BLAKE2b-256 4d5727f5cda8338d3c0ac85eeb759cf69bfd66403d54ff196cf785ac52b48608

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.0-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 19.6 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.0-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 e388305e4c715afb718054ddb373ff963859fec8081acc61a8d631808205754f
MD5 6e3bf26a44165aecab47b8d103db7add
BLAKE2b-256 d47a34a6114e6c3a98fbec2357a9f83d54e562f4b6337971bc500791d1fcc4e3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b3844afe8364dbbfb61ec1fbc89310271fc4f4ba2322ffc7beb288e4e6ceedcb
MD5 5b4990b6621d78bfa38b8fd08661d3b2
BLAKE2b-256 937c519b18c4898c0023ebaad93af8f74da257aefb5c707e447d1c200bc86c5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44b963085b651a4260a6bc197b841ad4f6debc6e0ea645e43a244df44c1e45ab
MD5 bb2d50880a4e56cf3186147e7795c6e4
BLAKE2b-256 c55423349913de8d09168b8506af29fbd6aed081d5c1de46e30aa41206769c47

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 014db6d73014c46dd753c025cdb94aff295776ddebddc918185df7c166bfd9f6
MD5 a4ba4ab2088d6c1b98e93d70fa620341
BLAKE2b-256 c85bd645a172b697140647b4f32e1642689e950a294017282cc29e6b79532f9b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 9f78932f3edd5ba9edd56547a244c2c7f43d03f29fd4518fff842a93df336955
MD5 b4e86cd9e5d4b3e28c4e30320f0946eb
BLAKE2b-256 79c57207d466f1f5a9ff85a5cf315d59ff890ef016ae95720d516d48fbde2da1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db5c6577be478354f3962b77b1a51f6e34adc3e21088c50a92ac3288cc8eeb6d
MD5 e7098ca9cf31dc743469bcf59b414950
BLAKE2b-256 8b13faaf0fb2f07b79020df9c5bd3af985993d79fe4aa37151547a4efdcdd402

See more details on using hashes here.

Provenance

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