Can a matching label prove who sent a message?
04Some STUN helpers require a secret-backed proof. Try changing the note, the secret or the challenge, and compare a public check with a secret seal.
Follow what happens to this one message.
This chosen helper requires credentials
The device and helper already share a fictional secret. The message itself stays readable.
What do we need to find out?
Can a matching label prove who sent a message?
Watch one change, then try an alternative.
What happens if you change this?
Change one thing and watch the result. Restart restores the original example.
Retry with challenge context and HMAC; the server checks both.
Key idea: A public format check is not proof of a shared secret. A secret seal does not hide the message.
Terms
- HMAC
- A message check calculated with a shared secret key. The receiver recomputes it over the protected bytes. It does not encrypt those bytes.
- FINGERPRINT
- STUN’s CRC-32-based public format check. Its value can be recalculated without a secret.
- Nonce
- A server-issued challenge whose validity the server checks. A stale nonce can require a retry with a new challenge.
- Realm
- The credential context used with the username and password in long-term key derivation.
Rules & examples
A public format check, called FINGERPRINT in STUN, can be recomputed without a secret.
- A public format check, called FINGERPRINT in STUN, can be recomputed without a secret.
- The secret-backed seal checks the protected bytes using the appropriate shared secret.
- A matching seal does not hide the message or make an old challenge fresh.
Start with the drawing. The closed explanations introduce the technical names, actual fields and source rules after the idea. These chosen offline examples do not implement a complete STUN, ICE or TURN client.
Chosen SHA-256 long-term key is SHA256(learner:example.test:public-demo-password), public fictional ASCII data. This fixture uses a credential-required server: its chosen challenge has the obMatJos2 nonce cookie and gAAA feature bits (password-algorithm support). The credential request echoes the advertised SHA-256 list, selects algorithm 2 and uses a different illustrative transaction ID from the initial request. Full negotiation state, bid-down attack handling and general string preparation are not modeled. HMAC covers the prefix before MESSAGE-INTEGRITY-SHA256, with header length adjusted through its full 32-byte value. FINGERPRINT is CRC32(prefix) XOR 0x5354554e, last in the message, with whole-message length. The tamper case recomputes CRC but keeps the old HMAC. Status 200; tag 1f4604a12ac87c461ea768799d8d91cdfbf125fbbffb4e0843973eac377cfee4; expected 1f4604a12ac87c461ea768799d8d91cdfbf125fbbffb4e0843973eac377cfee4. No secret crosses the drawn exchange. Plain Binding discovery need not use this credential policy.
Sources
New to this? Start hereA quick picture + helpful background
Finding a route and sending media are separate jobs.
Some messages set up a conversation or discover a reachable address. Other packets carry the audio or video. Follow those jobs separately.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
This revision adds DTLS-over-UDP and SHA-256 message-integrity support and updates retransmission-timer guidance.
Read the updated RFC section ↗