Skip to main content

Self-sovereign P2P streaming protocol with pure STC cryptography (Pre-release Alpha)

Project description

Seigr Toolset Transmissions (STT)

Sponsor Seigr-lab License Python Version Coverage

Secure binary transport that doesn't care what you're sending.

STT creates opaque encrypted packets that tunnel through any network (UDP, WebSocket, HTTPS) and can only be decrypted by authorized participants. No assumptions about your data - you could be streaming video, sending sensor readings, transferring files, or running your own custom protocol.


๐Ÿ“– Quick Links


Why STT?

Problem: Most protocols assume what you're sending (HTTP = web pages, MQTT = IoT messages, WebRTC = video calls). But what if you need secure binary transport without those assumptions?

Solution: STT provides encrypted binary packets that:

โœ… Tunnel through any transport (UDP if available, WebSocket/HTTPS if firewalled)
โœ… Only decrypt for authorized peers (pre-shared seed authentication)
โœ… Work for any application (you define what the bytes mean)
โœ… Are opaque to intermediaries (network sees encrypted binary blobs)

Use STT for: Video streaming, sensor networks, file transfer, messaging, custom protocols - anything that moves bytes securely.


Status

Version: 0.2.0a0 (unreleased)
Test Coverage: 93.01% (2803 statements)
Status: Alpha - core functionality implemented and tested

What works: Handshake, sessions, streams, frames, UDP/WebSocket transport, encryption, storage
Known stubs/incomplete:

  • ProbabilisticStream._try_send_segment() - simulates network delivery (stub for integration)
  • RelayServer._handle_forward() - counts forwarded frames but doesn't implement actual forwarding
  • core/transport.py UDPTransport - placeholder class (working implementation is in transport/udp.py)

What's next: Complete stub implementations, production hardening, additional transports


Quick Example

import asyncio
from seigr_toolset_transmissions import STTNode

async def main():
    # Create node with pre-shared seeds
    node = STTNode(
        node_seed=b"my_node_secret_32bytes_minimum!",
        shared_seed=b"shared_secret_32bytes_minimum!",
        host="127.0.0.1",  # Default; use "0.0.0.0" to accept external connections
        port=8080
    )
    
    # Start listening
    await node.start(server_mode=True)
    
    # Receive packets from any authorized peer
    async for packet in node.receive():
        print(f"Received {len(packet.data)} bytes")
        # packet.data contains decrypted bytes
        # Only peers with matching shared_seed can send to us

asyncio.run(main())

That's it. Encrypted packets tunnel through your network automatically.

๐Ÿ‘‰ Learn more: Getting Started Guide


How It Works

1. Pre-Shared Seeds: Both peers must have matching secrets (QR code, secure channel, etc.)
2. Handshake: 4-message mutual authentication using STC encryption
3. Encrypted Packets: All data encrypted before sending - opaque to network
4. Transport Agnostic: Packets travel over UDP, WebSocket, or any byte transport

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Node A    โ”‚ โ”€โ”€[encrypted]โ”€โ”€โ”€โ”€โ†’ โ”‚   Node B    โ”‚
โ”‚ (shared_seedโ”‚    UDP/WebSocket   โ”‚ shared_seed)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ†โ”€[encrypted]โ”€โ”€โ”€โ”€โ”€ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                Only A & B can decrypt
                Network sees random bytes

๐Ÿ‘‰ Deep dive: Architecture | Handshake Process | Security Model


Installation

Requirements: Python 3.9+

# From source (not yet on PyPI)
git clone https://github.com/Seigr-lab/SeigrToolsetTransmissions.git
cd SeigrToolsetTransmissions
pip install -e .

Dependencies:

  • seigr-toolset-crypto >= 0.4.0 (STC encryption)

๐Ÿ‘‰ Full guide: Installation & Setup


๐Ÿ“š Documentation

User Manual (Learn STT from scratch)

Getting Started:

Understanding How It Works:

Using STT:

Security & Design:

Reference:

API & Technical Docs

Development


Components

STT is built from these core components (all with dedicated documentation):

  • STTNode - Main runtime (85.56% tested)
  • Handshake - Mutual authentication (87.93% tested)
  • Sessions - Connection management (100% tested)
  • Streams - Multiplexed channels (99.24% tested)
  • Frames - Binary protocol (98.26% tested)
  • Transport - UDP/WebSocket (84-90% tested)
  • Chamber - Encrypted storage (96.97% tested)
  • STCWrapper - Cryptography (98.78% tested)

๐Ÿ‘‰ Full component docs: API Reference


Testing

pytest tests/ -v --cov

Coverage: 93.01% (2803 statements)
Test suite: 200+ tests covering all core components


Security

STT has undergone comprehensive security auditing:

  • โœ… Bandit static analysis: 0 issues (6679 lines of code scanned)
  • โœ… Safety dependency check: 0 vulnerabilities
  • โœ… pip-audit OSV database: 0 vulnerabilities in STT code

All identified security issues have been fixed, including:

  • SHA1 usage properly marked as non-cryptographic (WebSocket handshake only)
  • Default bind addresses set to localhost (127.0.0.1) for security
  • Pickle replaced with JSON for storage serialization
  • Secrets module used for cryptographic randomness
  • Comprehensive error logging for debugging

๐Ÿ‘‰ Full security audit: Security Audit Summary


Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

Development: See Environment Setup


License

ANTI-CAPITALIST SOFTWARE LICENSE (v 1.4)

See LICENSE for full details.


Support & Community

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

seigr_toolset_transmissions-0.2.0a0.tar.gz (159.3 kB view details)

Uploaded Source

Built Distribution

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

seigr_toolset_transmissions-0.2.0a0-py3-none-any.whl (93.9 kB view details)

Uploaded Python 3

File details

Details for the file seigr_toolset_transmissions-0.2.0a0.tar.gz.

File metadata

File hashes

Hashes for seigr_toolset_transmissions-0.2.0a0.tar.gz
Algorithm Hash digest
SHA256 25e56728f5ab17ebf7b00bf773a7cef66afc71a20df88292fddc28b057c72fd5
MD5 ced07e08d3908417d0ea71f3c34093aa
BLAKE2b-256 c2d654c5d3504c5deecc896ba742acd1657a5e0d89856b3ec746999190542283

See more details on using hashes here.

File details

Details for the file seigr_toolset_transmissions-0.2.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for seigr_toolset_transmissions-0.2.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bdae4e4c6ff97cf88fef6e1a4d830e8b09e62272dbe2152b07b035a140262de
MD5 f4c1d911a84bb396d932326b495412fb
BLAKE2b-256 1eaca4ec5c6dab00010ea73a1ed1344469c48e75fdb7f06f69541f1cd3c28987

See more details on using hashes here.

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