Make a prediction before sending
Maya has a fictional message for Leo. With protected connections alone, can the chat service read it? The answer depends on where those connections end, not just whether a lock is pictured.
Send a fictional note, become a network observer, and open the layers for which you have a key. Compare protected connections, end-to-end encryption and a VPN using real browser cryptography.
Enable JavaScript to change the conditions and run the interactive experiment.
Protection has endpoints. A connection can be encrypted while its receiving service can still read the message. Add an inner layer whose key belongs only to the participants, and the service can relay the bytes without opening that content.
Two encrypted connections meet at a chat service. Can that service still read a message without another content layer?
A receiving endpoint can open its own connection. End-to-end content protection adds a different boundary.
Maya has a fictional message for Leo. With protected connections alone, can the chat service read it? The answer depends on where those connections end, not just whether a lock is pictured.
The initial connection key belongs to Maya and the service in our route. Nearby observers lack that key. At the service, the connection layer opens and reveals whatever was inside it.
For end-to-end content protection, only the two phones hold the inner content key in this model. The service can pass that protected content along without being able to open it.
The service uses a separate outgoing connection key toward Leo. Two protected connections through a service are not automatically the same thing as an inner end-to-end content layer.
The tunnel ends at its gateway. The gateway can remove its own layer. If the remaining application traffic is unprotected, it can read it; if a separate connection layer remains, it does not automatically have that key.
Size, timing, routing and account context can remain visible. A service may recognize a signed-in account even if the apparent network address changes. Hidden content is not the same as automatic anonymity.
Authenticated encryption checks the protected content and associated envelope information. With an altered ciphertext and unchanged key, nonce and tag, the receiver refuses to release plaintext. A refusal does not identify the person or event that caused it.
Encoding changes a representation. A hash computes a digest without a secret key. A signature can be checked with a public key. These operations answer different questions, and none alone establishes that an endpoint is honest.
This page uses the browser Web Cryptography API for AES-GCM, SHA-256 and ECDSA P-256. It does not perform a TLS handshake, operate a VPN or implement MLS. All role keys live in one page runtime; the role boundaries explain ownership but do not isolate real participants.
The original container has a six-byte header: version 1, layer code, then a four-byte big-endian message ID. It then stores a twelve-byte nonce, ciphertext and a sixteen-byte authentication tag. The header is authenticated associated data. One layer adds 34 bytes; this is not TLS or VPN overhead.
UTF-8 encodes é as two bytes. Hi! is three bytes: one teaching envelope is 37 bytes, two nested envelopes are 71, and three are 105. Nesting encrypts the complete inner frame, including its existing header, nonce, ciphertext and tag.
A fresh 128-bit AES key is generated with the browser cryptographic API. Each key owns a 96-bit monotonic nonce counter. A nonce is consumed before encryption begins, including concurrent requests. Resetting a counter requires replacing its key; none is derived from a short name or ordinary random-number generator.
GCM associated data is checked but not encrypted. In the published examples, the same plaintext with the same public reference key and nonce can have the same ciphertext but a different tag when AAD changes. Those fixed examples are isolated tests, not instructions to reuse a nonce for fresh messages.
Any holder of the shared key can create a valid GCM envelope. A digital signature instead uses a private signing key and a corresponding public verification key. Calling that public key a particular person’s key requires a trustworthy association.
ECDSA P-256 with SHA-256 checks the signature/message/public-key relationship. The message can remain readable. WebCrypto represents this signature as 64 bytes of fixed-width r followed by s, rather than ASN.1 DER.
SHA-256 gives a 32-byte digest. If someone changes both a message and its displayed unkeyed hash, the new pair can match. A trusted reference digest or an appropriately verified signature has a different role. This lesson does not teach raw SHA-256 as password storage.
A previously valid envelope can authenticate again. Our optional seen-message-ID rule declines repeated acceptance at the application layer. The rule is separate from AES-GCM, and turning it off does not make an unchanged tag invalid.
The journey creates shared keys locally and assigns them to roles. Actual systems must establish and authenticate keys between endpoints. This lesson does not demonstrate secure key exchange, forward secrecy, group membership, recovery or compromised-device protection.
IP endpoints, approximate sizes and timing remain observable in our route. Hostname exposure depends on DNS protection, Encrypted Client Hello and deployment details. The VPN comparison assumes relevant traffic and DNS use the tunnel without bypasses; no live traffic capture is performed.
A delivery service can withhold bytes it cannot decrypt. A recipient can copy or photograph content it legitimately opens. Cryptographic operations do not prevent every action at an endpoint or every inference about communication.
Ask who holds content keys, where connections terminate, what metadata is retained and which endpoint assumptions apply. A single lock picture cannot answer all of these.
Find the tunnel endpoint, then inspect the protection still present afterward. A gateway address, a connection layer and an authenticated service account are different aspects of a journey.
Choose evidence suited to the question: representation, digest, shared-key authentication or a public-key signature. Keep the expected value and trusted key source attached.
Write A–Z twice. Shift one strip three places: A lines up with D and B with E, wrapping at the end. Fold or tear the paper; scissors are not needed.
Use MEET AT NOON. Replace letters with the shifted ones and preserve spaces. The result should be PHHW DW QRRQ.
Mark Sender, Relay and Recipient positions. Put rule copies at Sender and Relay. Relay can recover the fictional note; protecting a trip to Relay did not exclude Relay.
Repeat with rule copies at Sender and Recipient only. The intended content boundary has changed. A real piece of paper cannot enforce who looks at or copies the rule.
Let Relay try the shifts. There are 25 nonzero shifts plus the unchanged alphabet. This short familiar message is easy to find. The classroom rule is not modern encryption.
Put a fictional recipient and the message length on the folded note. Record what can be seen without opening it, and one limit of the paper analogy.
What changed when the intended rule holders changed—and what did the paper fail to protect?
Use only fictional messages. No real secrets, passwords, contacts or intercepted messages. This original activity teaches boundaries with an intentionally weak shift cipher; it does not measure security.
No, it is a public encoding Decode the bytes in one click. Representation is not secret-key protection.
The chat service The protected connections end at the service; another content layer is needed to exclude it in this model.
Relay ciphertext without opening the content layer Receiving, relaying and decrypting are different operations.
Yes, in this setup The tunnel ends at its gateway. A separately protected connection would present another layer.
No; account context, timing or other metadata may remain Content confidentiality is different from anonymity or hiding every traffic attribute.
No plaintext; authentication failed The authenticated-decryption operation rejects the altered envelope.
No, anyone can compute this unkeyed hash A trusted expected digest or verified signature supplies a different kind of evidence.
It verifies under that key; whose key it is needs a trustworthy association Signature validity, confidentiality, identity binding and replay rules are separate questions.
Current TLS 1.3 protocol specification. Our selected service is the connection endpoint; no TLS handshake is implemented here.
IETF · RFC 9846, TLS 1.3MLS architecture, especially security considerations. Mechanism reference, not a claim to implement MLS.
IETF · RFC 9750, MLS architectureIPsec architecture, §§4–5. Generic encrypted-tunnel illustration does not imply every VPN uses IPsec.
IETF · RFC 4301, IPsec architectureEncrypted Client Hello specification. Do not assume every HTTPS hostname is universally exposed or universally hidden.
IETF · RFC 9849, Encrypted Client HelloStable W3C Recommendation. Unsupported operations show an explicit unavailable state.
W3C · Web Cryptography APIOriginal NIST recommendation; this lesson uses 128-bit authentication tags.
NIST · SP 800-38DWorked examples 1, 2 and 4; independent expected bytes for both empty and nonempty plaintext. Derived mutation tests are identified separately.
NIST · GCM worked examplesSections 4 and 10. Encoding does not require a secret decoding key.
IETF · RFC 4648Section 8.1; verification uses the published public point and signature. Published private material is not used for visitor sessions.
IETF · RFC 4754FIPS 186-5 with its published errata notice. A signature does not encrypt readable content.
NIST · Digital Signature StandardDistinguishes employee works, third-party material and Standard Reference Data. The lesson presents original tables of numerical facts with citation.
NIST · copyright and licensingIndependent subject review is pending.
Read the sources and model assumptions