The lock where everything meets, HTTPS
You have seen a little lock icon in the browser's address bar. That is HTTPS. In the network area we saw how that lock works as a flow. Here we step one level deeper. Why is that lock safe? In truth, everything you learned in this area gathers inside this one lock. A certificate confirms the site is real, a public key safely shares a fast key, and that key locks the content. Safety comes from three loops closing into one.
Not how, but why it is safe
We met HTTPS in the network area too.
There we saw how it works as a flow.
A request goes, a response comes,
and a lock is set between them.
Here we look at the same lock differently.
Not the flow, but the reason it is safe.
Why that little lock is worth trusting,
we open it up and look inside.
In truth, inside it
everything you learned in this area gathers.
Tap the two views to compare. Networking shows the flow (how), here shows why it is safe (why).
The two views appeared side by side.
The flow tells you the order of actions.
The reason tells you why to trust those actions.
Both matter, but today's lead is the reason.
That reason is not one but three things.
First, confirm the other side is real.
Second, share a key safely.
Third, lock the content with that key.
Only when these three close in turn
does the lock truly shut.
Confirm it is the real site
The first loop is confirmation.
Before setting the lock, there is something to ask.
Am I really talking to that site right now?
Could this be a fake pretending to be real?
Here the certificate enters.
As we saw in the certificate lesson,
a trusted authority vouches for the site's identity.
The browser checks that voucher,
and if it judges it real, moves to the next step.
If fake, it stops there and raises a warning.
Tap to check the site's certificate. If the voucher matches it passes, if fake it stops and warns.
Only when the voucher matched did it pass in green.
When it did not match, it stopped in red.
This is the loop that blocks impersonation.
No matter how identical a fake looks,
it cannot mimic a trusted authority's voucher too.
So the first button fastens only onto the real one.
But confirming it is real
does not make the conversation safe right away.
Now a key just for the two must be shared safely.
On to the next loop.
Share the key safely
The second loop is sharing the key.
Both sides need one same fast symmetric key.
That is what they will use to lock content quickly.
But how do they share that key safely?
Here the public key does the work.
It is the method we saw in the key exchange lesson.
Wrap a secret key in the other's public key and send it,
or both build the same secret together and hold it.
An eavesdropper cannot build that secret.
So only the two end up with the same symmetric key.
Tap the steps in turn to demo sharing the key. Wrapped in the public key, an eavesdropper cannot open it.
Following the steps, only the two came to hold the same key.
The eavesdropper in the middle is empty handed.
There is no private key to open what the public key wrapped.
This is how to share a key safely
without secretly delivering it.
No secret key was mailed directly,
yet in the end only the two hold that key.
Now the same fast key sits in both hands.
At last it is time to lock the real conversation with it.
On to the third loop.
The three loops close
The third loop is locking.
With the symmetric key only the two hold, the content is encrypted.
Then even if someone peeks at what passes, they cannot read it.
More, it also checks that the content was not changed on the way.
That check is what we call integrity.
If anyone touches even one letter, a mark no longer matches,
and the receiving side notices at once.
Now gather the three loops in one place.
Confirmation, key sharing, encryption.
These three must close together for the lock to shut.
Close the three loops in turn. With all three shut, eavesdropping, tampering, and impersonation are all blocked. If even one is missing, it does not lock.
With all three loops shut, the lock closed.
Encryption blocks eavesdropping,
the integrity check blocks tampering,
and the certificate check blocks impersonation.
For each of the three threats, a loop is paired to block it.
If even one is missing, the lock does not shut.
Authenticate without encrypting and eavesdropping breaks through;
encrypt without authenticating and you safely talk to a fake.
So the three only mean something together.
The little lock in the address bar is the very signal that all three have closed.
Let's wrap up
Gathered on one line, it is this.
HTTPS is the lock where everything in this area meets.
In networking we saw the flow, here we saw why it is safe.
Safety comes from three loops closing.
A certificate confirms the real site,
a public key safely shares a fast symmetric key,
and that symmetric key encrypts the content and checks integrity.
Impersonation, eavesdropping, tampering, each blocked by one loop.
The lock shuts only when the three close together.
The little lock in the address bar signals that those three loops have all closed.
Tap the key points in order to review. (why safe -> certificate check -> safe key exchange -> three loops close)
Now that little lock will look different to you.
It is not a mere picture but
a promise that all three loops have closed.
A promise that a certificate confirms the other side,
a public key shares the key safely,
and a symmetric key locks the content.
The pieces you learned one by one in this area
have interlocked here into a single lock.
Next lesson, let's look together at the risk left beyond the lock,
the trickery that targets people.