Matryoshka Protocol (MATP)
Invisible secure messaging with steganography, post-quantum cryptography, and zero-knowledge proofs.
📦 Features
- Invisible messaging - Hide encrypted messages in normal web traffic
- Post-quantum cryptography - Kyber-512 KEM and Dilithium-2 signatures
- Group messaging - Fractal Group Ratchet for efficient group encryption
- Zero-knowledge proofs - Sigma protocol for plausible deniability
- Multiple steganography modes - JSON API, EXIF, Fast Ghost
- Classical crypto fallback - X25519, Ed25519, AES-256-GCM
📦 Installation
pip install matp
🚀 Quick Start
1. Basic 1-to-1 Messaging
from matp import MatryoshkaProtocol
# Initialize
alice = MatryoshkaProtocol()
bob = MatryoshkaProtocol()
# Key exchange (X25519)
alice_priv, alice_pub = MatryoshkaProtocol.generate_keypair()
bob_priv, bob_pub = MatryoshkaProtocol.generate_keypair()
shared_secret = MatryoshkaProtocol.derive_shared_secret(alice_priv, bob_pub)
alice_session = MatryoshkaProtocol(key=shared_secret)
bob_session = MatryoshkaProtocol(key=shared_secret)
# Send invisible message
msg = alice_session.send_message("Secret meeting at midnight")
# Looks like: {"status": "success", "data": {...}}
# Receive
plaintext = bob_session.receive_message(msg)
2. Ghost Mode (Perfect Invisibility)
from matp import GhostMode
key = b"shared_secret_key_32_bytes_long!"
alice = GhostMode(key=key)
bob = GhostMode(key=key)
# Send hidden in GitHub API response
cover = alice.send_invisible("Secret data", service="github")
# Returns: {"id": 123456, "login": "user", "bio": "<encrypted>", ...}
# Receive
message = bob.receive_invisible(cover)
3. Fast Ghost Mode (Speed + Invisibility)
from matp import FastGhostMode
key = b"benchmark_key_32_bytes_padding!!"
alice = FastGhostMode(key=key)
bob = FastGhostMode(key=key)
# 0.01ms latency, perfect invisibility
cover = alice.send("Fast secret message")
message = bob.receive(cover)
4. Dead Drop Protocol
from matp import DeadDropProtocol
key = b"dead_drop_key_32_bytes_padding!!"
dead_drop = DeadDropProtocol(key=key)
# Alice drops message (no direct connection to Bob)
location = dead_drop.drop_message("secret_spot_42", "The eagle has landed")
# Bob picks up later
message = dead_drop.pickup_message(location)
5. Group Messaging
from matp import MatryoshkaGroupManager
# Create users
alice = MatryoshkaGroupManager("alice")
bob = MatryoshkaGroupManager("bob")
# Alice creates group
group = alice.create_group("team", "Secret Team")
# Bob joins
invite = group.export_invite()
bob.join_group(invite)
# Alice sends invisible group message
msg = alice.send_to_group("team", "Meeting at 3pm!")
# Returns: {"status": "success", "data": {...}} # Looks like normal API
# Bob receives
received = bob.receive_group_message(msg)
print(received['message']) # "Meeting at 3pm!"
6. Quantum-Resistant Crypto (Optional)
from matp import quantum
qc = quantum.get_quantum_crypto()
# Generate post-quantum keypair
keypair = qc.generate_kem_keypair()
# Encapsulate shared secret
kem_ct = qc.kem_encapsulate(keypair.public_key)
# Decapsulate
shared_secret = qc.kem_decapsulate(keypair.secret_key, kem_ct.ciphertext)
📚 API Reference
Core Classes
MatryoshkaProtocol- 1-to-1 encrypted messagingGhostMode- Steganographic messagingFastGhostMode- High-performance steganographyDeadDropProtocol- Asynchronous message dropsMatryoshkaGroupManager- Group messagingquantum.get_quantum_crypto()- Post-quantum cryptography
⚠️ Disclaimer
Research prototype. Use for educational purposes. Not audited for production use.
📄 License
Apache 2.0
👤 Author
Sangeet Sharma
Metadata
Release files for matp 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| matp-0.5.2.tar.gz | 45.1 kB | Without provenance | Details for matp-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| matp-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for matp-0.5.2-py3-none-any.whl |
Total release size: 98.2 kB
Release files / matp-0.5.2.tar.gz
| Download URL | matp-0.5.2.tar.gz |
|---|---|
| Size | 45.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7f8dbf47d431da50202c93a528ca9be57378c3ddb47af5f2f41af527db1e12f
|
|
BLAKE2b-256 checksum How to use checksums |
f3c72b707683df5228a30e21fe3bbc35b5ec44a36612b9c54428f8794258719c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / matp-0.5.2-py3-none-any.whl
| Download URL | matp-0.5.2-py3-none-any.whl |
|---|---|
| Size | 53.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a156342a3a0638c50d775e61855d75c1e80612df480e3c8fa45bb1551aab8ff
|
|
BLAKE2b-256 checksum How to use checksums |
3d6e7b974ad85933e73244d427501d9d3d61a74c35a0fca3c0135d7eb5c33534
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for matp 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.