P2P Messaging
Ghayas Sher and I are building an educational Python prototype for direct communication between explicitly verified peers. It combines identity protection, authenticated encryption, local history, and defensive protocol limits without presenting an unaudited system as production ready.
What the prototype does
Each device creates password-protected signing and key-exchange identities. Peers exchange self-signed public cards and verify their fingerprints through a separate trusted channel before messaging.
Messages and delivery acknowledgements use authenticated encryption and signatures. The receiver validates the intended recipient, sender key, timestamp, signature, ciphertext, and replay state before accepting content.
- Verified contact book with explicit out-of-band fingerprint confirmation
- Two-way chat and one-shot send/listen workflows
- Encrypted local message history with authenticated metadata
- Signed filename, size, and SHA-256 attachment references
- Persistent replay rejection, frame limits, rate limits, and read timeouts
How we verify it
The current 72-test suite covers identity protection, encryption, signatures, recipient validation, replay persistence, acknowledgements, verified contacts, local history, attachment references, rate limiting, malformed inputs, and end-to-end local delivery.
The repository also documents the protocol and threat model so that the implementation can be reviewed against explicit assumptions rather than a broad claim of security.
Current limits
This is an educational prototype, not an audited messaging product. It does not currently provide forward secrecy, automatic key rotation, NAT traversal, multi-device synchronization, automatic file transfer, or independent security assurance.
Those limits remain visible because communicating what a security system cannot guarantee is part of building it responsibly.