A lock that opens only with the key, encryption
Say you pass a letter hand to hand with no envelope. Every person it passes through can read it as is. A message sent plainly over the internet is exactly this. Encryption turns that letter into a scramble that cannot be read without a key. Even if someone grabs it in the middle, they cannot tell what the letters say, and only the person with the right key unscrambles it back.
Plain text is read by anyone
When you send a message,
it does not go straight to the other side.
It passes through several stops along the way.
A router, carrier equipment, many servers,
one after another, before it arrives.
If you send the text with no handling,
then while it travels this path,
every place it passes can read the content.
This untouched original text
is called plaintext.
Plaintext is like a letter with no envelope.
Tap a stop along the path. Being plaintext, each place it passes sees the content as is.
Whichever stop you tapped,
the same text showed up as is.
Plaintext lies open at every place it passes.
Of course most stops only forward it.
But the trouble is that if even one decides to,
it can read or copy the content.
Think of a password or a private story
traveling like this and it is unsettling.
So before sending the text we want
to lock it so others cannot read it.
That locking is exactly encryption.
Locked, it becomes meaningless text
Encryption is the work of locking plaintext.
The letters of the original text
are rearranged in a fixed way
into text whose meaning cannot be told.
This locked text is called ciphertext.
In ciphertext you do see letters.
But their meaning is gone,
so it looks like a scramble only.
Even if someone grabs and peers at it midway,
they cannot guess what it says.
The way of locking is paired with a key.
Tap lock to encrypt the plaintext. The letters turn into meaningless ciphertext.
When you tapped lock, the clear text
turned into letters you cannot make out.
The content is the same,
yet now reading it gives you no meaning.
This is the core effect of encryption.
The content was not erased;
it was locked so it cannot be read without a key.
Then a natural question arises.
How do you turn this scramble
back into the original text?
The answer lies in the key paired at locking.
Only the right key unlocks it
To read the locked ciphertext again
you must unlock it with a key.
This unlocking is called decryption.
Apply the right key
and the scrambled text returns to the original plaintext.
It is like fitting the matching key into a lock.
Apply a wrong key instead
and the text does not open; it stays blocked.
So only the person with the key sees the content.
Anyone in the middle without the key
cannot turn ciphertext back into plaintext.
Pick a key and tap unlock. The right key brings the original back, a wrong key does not open it.
The right key brought the original back,
the wrong key stayed blocked.
This very point makes encryption useful.
It is fine even if the way of locking
is widely known.
The truly secret thing is just the one key.
Only the holder of the key can unlock it,
so the message is read only among those people.
Then where does this locking and unlocking
actually protect us in real life?
Let's look at two places.
It guards in transit and at rest
There are two main places encryption keeps a secret.
The first is in transit.
While a message crosses the internet,
it passes the stops we saw earlier.
If you send it encrypted,
anyone who intercepts holds only ciphertext.
Without the key the content is protected.
The second is at rest.
When a message or file is held on a device or server,
even while it sits still in place
someone could peek at it.
If you store it encrypted,
that stored copy cannot be read without the key.
Switch between the two cases. See how encryption keeps the secret in transit and at rest.
Whether in transit or at rest,
encrypted text was just a scramble without the key.
So for the same message,
whether you handle it locked or not makes a big difference.
Lock an important text both when sending
and when holding it,
and the secret is kept on both sides.
But one thing still remains here.
That key, needed to lock and unlock,
how do the two sides share it safely?
This is a big story of its own.
Let's wrap up
Gathered on one line, it is this.
Plaintext sent plainly is read by anyone on the path.
Encryption locks plaintext with a key
into meaningless ciphertext.
It unlocks only with the right key,
so only the holder of that key sees the content.
Thanks to this, the secret is kept in transit and at rest.
The way of locking may be known,
and the secret gathers in the one key.
So the next question is naturally this.
How do we share that key safely?
Tap the key points in order to review. (plaintext is exposed -> locking gives ciphertext -> only the key unlocks -> guards transit and storage)
Now you hold the most basic tool
for keeping a secret.
Lock it, unlock only with the key, guard it when sending and when holding,
this simple idea is the foundation of security.
But even with a good lock,
if you let the key slip carelessly it is no use.
How two sides who exchange messages
come to share the same secret key safely,
that is the topic of the next lesson.
With the lock now in hand,
let's move on together to the story of the key.