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

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

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

gbp_stack-1.1.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: gbp_stack-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a8dea08f2d7b87c72aa507fd3a442643d9a091acc927cf1dc7b99e5680b7bf37
MD5 722a4c5070fe1f9bffd0a2a68ce6c668
BLAKE2b-256 13efb7cbbdb20bbc9588a60467167bb836f41d48a12bbcc745d436a438508c8e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.1-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.1-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 9de72e07e3f64e32180120ecd3dc58e83f13a2fb04db277317d6ec81984cc398
MD5 118f32ddab1051a3487944415b82e05c
BLAKE2b-256 6cced45feccfc37d360ab06eb47afdaad12f18cd0bcbc48003cf2d6b66ee0122

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.1.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ce9c40fd9c0ca19179af90e81c37d3adf8b919b3873826e5d033c1217cbca684
MD5 a714c0db3f0783781cb1e5415eb6d6e0
BLAKE2b-256 5a048125c89e0db4d049bacc5084dcd503d359675adb1cab70fa900642cdd409

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.1-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26ee4fc544ae40cf61ed1abff358dc2d6fefde6058174358acc7ce9b58df0109
MD5 057502d0f33c6a34bd48ce074f96ea56
BLAKE2b-256 e420c9387e8a0c22a214d9212b80a203cb68f309086f12c2be8b7b64e29ed9cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.1-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 85f917711adc01a92a61e2e33c5b63edca137b879452be6b603837a09b04dfe6
MD5 95ba9337a24ec0400c4c05aeffee1059
BLAKE2b-256 abfca66c3b0c31b4b231f6714df9712b71126abd0a0a51a1cddada4125e3073b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 82596746ec186ba8e3c6a87ad354a96057fe24d847b273608febb8da06a565e0
MD5 df2b13452b58f18c0b14806cfe1b4654
BLAKE2b-256 b844dc64fa2b3439fa31ab923071c888cf8ad5aad01efb74a6cdca01631c2e72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f682250489ba6811a87725cc0fcfa1131dc27c619aab9104829e49d567cad69
MD5 4bc8f39e579ba1edae0234284d32efcd
BLAKE2b-256 98ba4598efc5a910c661b4cf5c6531bd9e11b1af68c22d8e3d4c1492320e8a7f

See more details on using hashes here.

Provenance

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