What problem does it solve?
Building end-to-end encrypted messaging is error-prone: naive designs leak message history on key compromise, accept tampered ciphertexts, or allow server-side man-in-the-middle attacks. This Skill guides the implementation of a simplified Signal Protocol so only communicating parties can read messages.
Core Features & Use Cases
- X3DH Key Agreement: Establish shared session secrets between two parties using X25519 Diffie-Hellman key exchange.
- Double Ratchet Key Management: Derive per-message keys via sending/receiving chains and rekey sessions with DH ratchet steps for forward secrecy and post-compromise security.
- Authenticated Encryption: Encrypt messages with AES-256-GCM, binding sender/receiver identity and message numbers as associated data to prevent reordering, replay, and reflection attacks.
- Use Case: A developer building a private chat feature uses this Skill to implement session setup, per-message encryption, out-of-order delivery handling, and the mandatory validation tests proving forward secrecy and tamper rejection.
Quick Start
Implement an end-to-end encrypted messaging session between two parties using the Signal Protocol Double Ratchet with X25519 and AES-256-GCM, then run the validation tests for forward secrecy and tamper rejection.