Signal Protocol Double Ratchet Key Exchange State Visualizer

Explore end-to-end encryption cryptography interactively. Step through Diffie-Hellman (DH) ratchets, KDF symmetric-key chains, out-of-order message key derivations, and forward secrecy state transitions powering Signal and WhatsApp.Documentation & FAQs ↓

Signal Protocol Double Ratchet Key Exchange State Visualizer — Interactive Console
Runs locally in your browser • Instant output

Signal Protocol Double Ratchet Cryptographic Key Visualizer

Diffie-Hellman turnaround ratchet, symmetric KDF chains, Forward Secrecy & Break-in Recovery (PCS).

Simulate Message Exchange

Root Key KDF Chain (Master State)DH Generation #1
Root Key (RK 256-bit):HMAC-SHA256
0xa4f91b72e08c45d36e2f1839c805ba21
Forward Secrecy

Past messages stay encrypted forever even if future keys leak.

Break-in Recovery (PCS)

Next DH turnaround self-heals privacy after an attacker compromise.

Alice's Keychain
DH Ephemeral: 0xec71a9b208
Sending Chain: 0x7d22b8014e
KDF Mode: HMAC-SHA256 ratcheted
Bob's Keychain
DH Ephemeral: 0xdf4832c91a
Sending Chain: 0x1e99a4c82b
KDF Mode: HMAC-SHA256 ratcheted

Message Ratchet Stream (0 Messages)

Click red button to simulate key leak

No messages exchanged yet.

Click "Send: Alice → Bob" to initiate the Double Ratchet state machine.

Advertisement

Step-by-Step Instructions

4 Steps to Completion
1Phase 1

Start a new session between simulated users Alice and Bob with pre-shared master secrets (X3DH initial setup).

2Phase 2

Click 'Send Message' from Alice to Bob to advance the sending KDF ratchet and derive a unique ephemeral message encryption key.

3Phase 3

Trigger a reply from Bob to observe the Diffie-Hellman ratchet advance, generating a fresh shared root key and new chain keys.

4Phase 4

Simulate dropped or out-of-order packets to inspect how skipped message keys are stored and expired in secure client memory.

Practical Use Cases & Real-World Scenarios

Cryptography & Cyber Security Education
Demystify how modern E2EE messengers protect billions of daily chats without requiring simultaneous online peer presence.
Auditing Mobile E2EE App Architectures
Verify state machine edge cases including skipped message keys, dropped packets, and session re-keying triggers in custom messaging protocols.
Developer Technical Onboarding
Train software engineering teams building zero-knowledge messaging, secure VoIP signaling, and encrypted team collaboration tools.
Related Editorial Guide on AnshuTechy15 Most Secure Messaging apps for Android and iPhone in 2026
Read Tutorial →
Share With Your Community

Found this tool helpful? Share it with colleagues & friends:

100% free, private in-browser utility with zero server uploads.