Tip: โ/โ step through handshake messages ยท 1โ6 jump to tabs
Pattern Selector
Select a Noise handshake pattern to explore its message flow and security properties. New here? Follow the guided path from the simplest handshake to WireGuard's.
All 13 patterns (simplest โ most complex)
Message Sequence
Security Properties
vs TLS
Real-World Use
Token Legend
Handshake Walkthrough
Step through each handshake message to see DH operations, key evolution, and hash updates.
๐งฉ Anatomy of a token โ start here if e, s, ee, es, se, ss look like noise
Every Noise handshake is built from tiny two-letter DH tokens. Each names which two keys get multiplied together. The result is folded into a growing shared secret. Pick a token below and watch the two keys slide into the mixer.
Notice: toggling Initiator โ Responder physically swaps which side is
my key and which is theirs. That is the whole trick behind es
and se โ the letters name roles (ephemeral, static), and your role decides
whether the ephemeral is yours or theirs. Same token, mirrored operands.
On the wire โ this message, byte by byte
๐ฎ Predict before you step
Which running secrets change after this message?
Initiator state
Responder state
Transport Phase
After handshake completion, encrypt and decrypt messages with the derived transport keys. Each direction has an independent nonce counter.
๐ ฐ โ ๐ ฑ (initiator sends)
๐ ฑ โ ๐ ฐ (responder sends)
Break it
Run real attacks against the live handshake state. Each card runs an independent simulation against the currently selected pattern.
1. Flip a ciphertext bit
Encrypt a transport message, flip one bit in the ciphertext, decrypt. Tests the AEAD authentication tag.
2. Swap responder's static key (MitM)
Substitute an attacker's key for the responder's rs. IK/NK trust the pre-known key blindly; XX verifies it during the handshake.
3. Reuse a transport nonce
Force two encryptions at the same n with the same key. AES-GCM is a CTR-mode stream cipher under the hood โ reuse leaks the XOR of the two plaintexts.
4. PSK mismatch (IKpsk2 only)
Initiator and responder hold different pre-shared keys. The chaining keys diverge after the psk mix.
5. Replay message 1
Capture the initiator's first message and deliver it to a fresh responder. Noise core has no replay protection โ WireGuard adds a TAI64N timestamp.
6. Compromise the static keys โ after the fact
Record a transport message, finish the session, then steal both static private keys. Because the session key came from the discarded ephemeral DH, the recorded ciphertext still won't decrypt โ while a hypothetical static-only channel leaks instantly. This is forward secrecy shown holding vs breaking.
Pattern Comparison
Pick patterns to compare side-by-side. Click any property cell to see why it differs.