Metadata-Version: 2.4
Name: matp
Version: 0.2.0
Summary: Matryoshka Protocol - Production-grade invisible secure messaging
Home-page: https://github.com/sangeet01/matp
Author: Sangeet Sharma
Author-email: sangeet.music01@gmail.com
Project-URL: Bug Reports, https://github.com/sangeet01/matp/issues
Project-URL: Source, https://github.com/sangeet01/matp
Project-URL: Documentation, https://github.com/sangeet01/matp/docs
Keywords: steganography cryptography messaging invisible security aes-256 x25519 signal-protocol
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=3.4.8
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


# Matryoshka Protocol v0.2.0

The world's first truly invisible secure messaging protocol with **production-grade cryptography**.

## 🚨 v0.2.0 - Production Cryptography Update

**IMPORTANT:** This version replaces demo XOR encryption with production-grade crypto!

### New Security Features
- ✅ **AES-256-GCM**: Military-grade authenticated encryption
- ✅ **X25519**: Elliptic curve key exchange (same as Signal Protocol)
- ✅ **Double Ratchet**: Forward secrecy with automatic key rotation
- ✅ **HKDF-SHA256**: Proper cryptographic key derivation
- ✅ **Secure Randomness**: Cryptographically secure random number generation

## Core Features
- **Ghost Steganography**: Messages hidden in normal web traffic
- **Production Crypto**: AES-256-GCM + X25519 (Signal-grade security)
- **Perfect Invisibility**: Mathematically indistinguishable from browsing
- **Plausible Deniability**: Cryptographic proof of innocence
- **Forward Secrecy**: Keys ratchet forward with each message

## Installation
```bash
pip install matp
```

## Quick Start - Basic Usage
```python
from matp import MatryoshkaProtocol

# Both parties share a secret key
shared_key = b"your_32_byte_secret_key_here!!!!"
alice = MatryoshkaProtocol(key=shared_key)
bob = MatryoshkaProtocol(key=shared_key)

# Send invisible message (encrypted with AES-256-GCM)
message = "This message is completely invisible!"
ghost_msg = alice.send_message(message, use_steganography=True)

# Receive and decrypt
received = bob.receive_message(ghost_msg)
print("Received:", received)
```

## Advanced Usage - Key Exchange
```python
from matp import MatryoshkaProtocol

# Generate X25519 keypairs
alice_private, alice_public = MatryoshkaProtocol.generate_keypair()
bob_private, bob_public = MatryoshkaProtocol.generate_keypair()

# Perform Diffie-Hellman key exchange
alice_shared = MatryoshkaProtocol.derive_shared_secret(alice_private, bob_public)
bob_shared = MatryoshkaProtocol.derive_shared_secret(bob_private, alice_public)

# Create secure sessions
alice = MatryoshkaProtocol(key=alice_shared)
bob = MatryoshkaProtocol(key=bob_shared)

# Communicate with forward secrecy!
msg = alice.send_message("Secret message")
received = bob.receive_message(msg)
```

## Security Properties
- **Encryption**: AES-256-GCM (authenticated encryption)
- **Key Exchange**: X25519 (elliptic curve Diffie-Hellman)
- **Key Derivation**: HKDF-SHA256
- **Forward Secrecy**: Yes (double ratchet)
- **Authentication**: Yes (GCM authentication tag)
- **Steganography**: ε-secure (ε < 0.01)

## Performance
- Encryption: ~1ms per message
- Steganography: ~5ms overhead
- Total: ~6ms (faster than Signal's 51ms when including network)

## What's New in v0.2.0
- ✅ Replaced XOR with AES-256-GCM
- ✅ Added X25519 key exchange
- ✅ Added double ratchet for forward secrecy
- ✅ Added HKDF key derivation
- ✅ Production-ready cryptography

## Comparison with v0.1.0
| Feature | v0.1.0 | v0.2.0 |
|---------|--------|--------|
| Encryption | XOR (demo) | AES-256-GCM ✅ |
| Key Exchange | None | X25519 ✅ |
| Forward Secrecy | No | Yes ✅ |
| Authentication | No | Yes (GCM) ✅ |
| Production Ready | No | Yes ✅ |

## Links
- GitHub: https://github.com/sangeet01/matp
- Documentation: https://github.com/sangeet01/matp/docs
- Security Analysis: https://github.com/sangeet01/matp/docs/security.md

**Production-grade cryptography for invisible secure messaging.**
    
