Skip to main content

Standalone Ultra-Secure Communication Protocol - Python SDK

Project description

๐Ÿ›ก๏ธ Sibna Protocol โ€” Python SDK

PyPI Version Python Versions License Downloads

Sibna Protocol is a standalone, ultra-secure communication framework with zero external dependencies. This SDK provides a seamless Python interface to the hardened Sibna Rust Core โ€” delivering military-grade cryptography at native speed.


โœจ Key Features

Feature Details
๐Ÿ”’ Military-Grade Security X3DH + Double Ratchet protocol (Signal-compatible)
๐Ÿš€ Native Performance Pre-compiled Rust core โ€” no build step required
๐Ÿ“ฆ Zero Dependencies Completely standalone, no Rust toolchain needed
๐Ÿ›ก๏ธ Perfect Forward Secrecy Automatic key rotation per message
๐Ÿ’ป Cross-Platform Windows, Linux, macOS โ€” all supported
๐Ÿ”‘ ChaCha20-Poly1305 AEAD encryption with authenticated data support

๐Ÿš€ Installation

pip install sibna

Requires Python 3.8+. No other system dependencies needed.


โšก Quick Start

Symmetric Encryption

import sibna

# 1. Generate a secure 32-byte key
key = sibna.generate_key()

# 2. Encrypt your message
plaintext = b"Top secret data"
ciphertext = sibna.encrypt(key, plaintext)

# 3. Decrypt and recover
decrypted = sibna.decrypt(key, ciphertext)
print(decrypted.decode())  # "Top secret data"

Authenticated Encryption (with AAD)

import sibna

key = sibna.generate_key()
plaintext = b"Sensitive payload"
aad = b"context-header"  # Additional Authenticated Data

ciphertext = sibna.encrypt(key, plaintext, associated_data=aad)
decrypted = sibna.decrypt(key, ciphertext, associated_data=aad)

Secure Session (X3DH + Double Ratchet)

import sibna

# Create a secure context with master password protection
ctx = sibna.Context(password=b"your-master-password")

# Initialize a secure session with a peer
session = ctx.create_session(b"peer_public_identity_key")

# Encrypt โ€” automatic ratcheting every message
encrypted = session.encrypt(b"Hello, Secure World!")

๐Ÿ—๏ธ Architecture

Sibna uses a layered security approach:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        Your Application         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚      Sibna Python SDK (this)    โ”‚  โ† pip install sibna
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   Sibna Rust Core (pre-built)   โ”‚  โ† bundled .dll / .so / .dylib
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  ChaCha20-Poly1305 ยท Ed25519    โ”‚
โ”‚  X3DH ยท Double Ratchet          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Transport Layer: Agnostic โ€” works over WebSocket, HTTP, MQTT, or raw TCP.
  2. Messaging Layer: Sealed envelopes with metadata resistance.
  3. Cryptographic Core: Hardened Rust implementation โ€” constant-time, memory-safe.

๐Ÿ” Security

  • All cryptographic operations are performed in the native Rust core
  • Memory is zeroed after use (no key material left in heap)
  • Side-channel resistant implementations
  • Security issues: please email security@sibna.dev

๐Ÿ“œ License

Licensed under the Apache License 2.0.
See LICENSE for full details.


๐Ÿค Contributing

Issues and pull requests are welcome at github.com/SibnaOfficial/libsa.


Developed with โค๏ธ by the Sibna Security Team.

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

sibna-1.1.0.tar.gz (771.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sibna-1.1.0-py3-none-any.whl (773.6 kB view details)

Uploaded Python 3

File details

Details for the file sibna-1.1.0.tar.gz.

File metadata

  • Download URL: sibna-1.1.0.tar.gz
  • Upload date:
  • Size: 771.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sibna-1.1.0.tar.gz
Algorithm Hash digest
SHA256 56981577e36e7543ac62f6febc6edc8441d9dd07734ae94ae9ba2bf9637bdf8c
MD5 b3de2276ba3b6bd40128ec1d707b500e
BLAKE2b-256 c690687e43446c141b61f1e63a70d432c1e209742b383a1363e4b6adc344e495

See more details on using hashes here.

Provenance

The following attestation bundles were made for sibna-1.1.0.tar.gz:

Publisher: workflow.yml on SibnaOfficial/libsa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sibna-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: sibna-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 773.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sibna-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d678df64a45ad6544fe6217ccf6b8f8d57fa0bffb23492b738550635ebddaeb
MD5 930d100dd64f9357bf2a169c09d2dfb9
BLAKE2b-256 b0c20861ed61a22b24b55691fd25411a9ac7f6491f3d45f9764cce5803e75119

See more details on using hashes here.

Provenance

The following attestation bundles were made for sibna-1.1.0-py3-none-any.whl:

Publisher: workflow.yml on SibnaOfficial/libsa

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