Self-sovereign P2P streaming protocol with pure STC cryptography (Pre-release Alpha)
Project description
Seigr Toolset Transmissions (STT)
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
- New to STT? โ What is STT? - Start here
- Want to use it? โ Getting Started - Installation & first program
- Need API docs? โ API Reference - Complete Python API
- Curious how it works? โ Architecture - Design & protocol details
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 forwardingcore/transport.py UDPTransport- placeholder class (working implementation is intransport/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:
- Chapter 1: What is STT? - Overview and use cases
- Chapter 2: Core Concepts - Nodes, sessions, streams
- Chapter 9: Getting Started - Installation and first program
Understanding How It Works:
- Chapter 3: Binary Protocols - Why binary?
- Chapter 4: Encryption - STC and pre-shared seeds
- Chapter 5: Handshake - 4-message authentication
- Chapter 6: Sessions - Session lifecycle
- Chapter 7: Streams - Multiplexing explained
- Chapter 8: Transport - UDP vs WebSocket
Using STT:
- Chapter 10: Common Patterns - Real-world examples
- Chapter 11: Error Handling - Troubleshooting
- Chapter 12: Performance - Optimization
Security & Design:
- Chapter 13: Security Model - Threat model
- Chapter 14: Comparisons - STT vs HTTP/gRPC/WebRTC/QUIC
- Chapter 15: Design Decisions - Why STT works this way
Reference:
- Glossary - All terms defined
- Frame Format - Binary format spec
- Configuration - All settings
- Error Codes - Complete error reference
API & Technical Docs
- API Reference - Complete Python API for all components
- Architecture - Design philosophy and protocol stack
- STC Dependency - External crypto library docs
Development
- Environment Setup - Dev environment
- CHANGELOG - Version history
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:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Development: See Environment Setup
License
ANTI-CAPITALIST SOFTWARE LICENSE (v 1.4)
See LICENSE for full details.
Support & Community
- Issues: GitHub Issues
- Sponsor: GitHub Sponsors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seigr_toolset_transmissions-0.2.0a0.tar.gz.
File metadata
- Download URL: seigr_toolset_transmissions-0.2.0a0.tar.gz
- Upload date:
- Size: 159.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25e56728f5ab17ebf7b00bf773a7cef66afc71a20df88292fddc28b057c72fd5
|
|
| MD5 |
ced07e08d3908417d0ea71f3c34093aa
|
|
| BLAKE2b-256 |
c2d654c5d3504c5deecc896ba742acd1657a5e0d89856b3ec746999190542283
|
File details
Details for the file seigr_toolset_transmissions-0.2.0a0-py3-none-any.whl.
File metadata
- Download URL: seigr_toolset_transmissions-0.2.0a0-py3-none-any.whl
- Upload date:
- Size: 93.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bdae4e4c6ff97cf88fef6e1a4d830e8b09e62272dbe2152b07b035a140262de
|
|
| MD5 |
f4c1d911a84bb396d932326b495412fb
|
|
| BLAKE2b-256 |
1eaca4ec5c6dab00010ea73a1ed1344469c48e75fdb7f06f69541f1cd3c28987
|