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-rc4

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

Uploaded CPython 3.11Windows ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11

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

File metadata

  • Download URL: gbp_stack-1.0.0rc4.tar.gz
  • Upload date:
  • Size: 14.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.0.0rc4.tar.gz
Algorithm Hash digest
SHA256 f7a23012d4a9b30b39e86ffa6534b60086d57fc597404bbe7ec9ea0b931b57f6
MD5 932bc37269996c2d6a02f12414d37492
BLAKE2b-256 1412d0d4bca787443f46d2503d67f52edef2f94b0aac810c9aec80979d5129bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0rc4-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 fb335091f37ebe79c97aeb7903b361e6d465e2cec35eba90cbbf73aad888ca0d
MD5 7f7eb1971c7bceea858ef55dcacc2cdd
BLAKE2b-256 bbfbd009adc9ddf0de1efc18b288ee124369c3fe33e060367044d3d45b6e7bb1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0rc4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d097fbde88b7dc2a29f9263695b949faffce961dfbca3fd3a427818e04af172a
MD5 69fafb4fcd51c30dfeb4edf1f7e77554
BLAKE2b-256 c74d26675c452e859bca190aa9936bea5773bcea8042496cdfb2ba7f0a53f93a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0rc4-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ecf04daaabc79310379b271255e1123cdf6682e419c6f92cf42d8a890ba32431
MD5 098d70b605dce39385f4fc2933962b34
BLAKE2b-256 3ddd5c4db8a015f10c5d906ad098533a822e52247d15e7e52d954a091ae1f7df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0rc4-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dc2e2cc75c7890f7d4f56176ac631c35599b77b15eb3cac505d10491f1cb9af9
MD5 8ce756921f8a09b22e52919844f52a13
BLAKE2b-256 06d5b974c8253e9b1151a17e2acc5e62bde5b84fd4bf4f0b9b20810a82cc860d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0rc4-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7e7f62dc9c4e3acf17a0bdb4ecc07356db8d4f6759f1e15d460aed52dd930e3a
MD5 cbbd09299f5970906100919ae89fc033
BLAKE2b-256 74b63b503acc1cb73851d79d7385dddeed792b27693d17ae02bf47add44e05c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.0.0rc4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4bc5ed3b4a564f2d2bdacb6181936222e8d66f0c03426516baf826346e5c8bfe
MD5 f1d91e72818c84a8af394ba7f1a65987
BLAKE2b-256 fdcdaf0805a3cc28590a24dc8da310b832a9f46cf107f56a924f0c48ae2d34f4

See more details on using hashes here.

Provenance

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