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.
  • SFrameSession + SFrameEncryptor — SFrame (draft-ietf-sframe-enc) E2EE for GAP audio frames; per-sender AES-GCM keys derived from MLS exporter, 1024-entry sliding-window replay protection.

Install

pip install gbp-stack==1.2.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.2.0.tar.gz (17.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.2.0-cp311-cp311-win_arm64.whl (22.1 kB view details)

Uploaded CPython 3.11Windows ARM64

gbp_stack-1.2.0-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

gbp_stack-1.2.0-cp311-cp311-manylinux2014_aarch64.whl (21.9 kB view details)

Uploaded CPython 3.11

gbp_stack-1.2.0-cp311-cp311-macosx_11_0_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

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

File metadata

  • Download URL: gbp_stack-1.2.0.tar.gz
  • Upload date:
  • Size: 17.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.2.0.tar.gz
Algorithm Hash digest
SHA256 0770aba397a662433c955be27a22737d10e7dc45ed3cd2abb2034916a7a2b89b
MD5 cc80ead78036d3ae124c31ae93b4ed6c
BLAKE2b-256 2fda6d12dd80b1a4a88a632cbf2bcedefff23d3cff7c612101902e7c709c5689

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.2.0-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 22.1 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.2.0-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 7cd7279553476e22b09f139ed3b891b943a0cff0b5ee16e9eaa3dfd218608a96
MD5 9f8cd74f5e7b6f92c0d276d28dffb149
BLAKE2b-256 e0dbea312d1d6e6c5db635ea6af77a06587d751407be88c530166e4a025c7e2b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gbp_stack-1.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.3 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.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a59423c9167f55e23e41527c61d9043867322824a97ec9303f526cd31ae642d4
MD5 196f54a633a1e2538448e9c36687bb0b
BLAKE2b-256 28d9807fe759b2dffb2f0e566156b2965b129fb54771135dacb4f4c15c482cf1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d522c4125d52beaa71c187068119265bb81bd77cf645fb52c62d2b4b40b8e9b
MD5 31b555158f14ebd464a4104502920a71
BLAKE2b-256 24463f1ee50ef6ed34044864454e50a623c4ec2c923df06b873562c7ad38b1ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 93b6f1048cebebb0ea23559b726832fd01458eb702173806bfe6c00db1d3ed51
MD5 854f445328698724b0f190cd1ad61a57
BLAKE2b-256 71ea2b7ca19e1c16b7d7bf7edde34e524128b74505bc73f7a6d75d459eaf637d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 6b6e5e748d7263e1198da5695141ccd965fbd8cdbb6525bdbc305eefce3cb8c0
MD5 978e98bdbe146ea0a086accd19603f32
BLAKE2b-256 0cfa82e0267110fd3a30e30b6a09e840c663ad5cc5cfbbe38ed3d7722989a7da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gbp_stack-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e380535bc328c90bc74d94adc71c8fa6d1452d40810ba1991a2d1131025319d8
MD5 2b7d8689ec230910bba8fea049e38eba
BLAKE2b-256 d260fac0287cd199933529d841912e5b1a94acb75becd461cbabf655ea5ea7f9

See more details on using hashes here.

Provenance

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