Course 2.3Lesson 2 of 3
Symmetric encryption uses one key to lock and the same key to unlock. This lesson shows how it works, why both sides need the same secret key, and the weakness this brings: the key itself has to reach the receiver safely.
Try the code and the simulations beside the lesson.
Think of a padlocked box with one key. You lock a letter in the box and post it. Your friend needs a copy of the same key to open it. That is symmetric encryption.
In symmetric encryption the same key is used to encrypt the plaintext and to decrypt the ciphertext.
The shift cipher of the last lesson is symmetric: the key locks, and the same key , used backwards, unlocks.
Both sides need the same key. So, at some point, the key must be sent or given to the receiver. If someone intercepts the key on its way, they can decrypt every message sent with it. Keeping the key secret while sharing it is the main problem of symmetric encryption.
There is a second problem when many people talk. Each pair of people needs its own key, or else one person could read messages meant for others. With people there are pairs, so keys. With more people the number of keys grows quickly, and each one must be shared safely.
A thief who does not know the key could try every possible key. This is called a brute-force attack. The shift cipher has only useful keys, so this takes no time at all.
Real keys are numbers made of many bits. A key of bits has possible values. Each extra bit doubles the number of keys. With a key of hundreds of bits, trying every key would take far longer than the age of the Universe. The exam does not ask about key lengths, but this is why long keys are used.
The program plays the thief. It takes an intercepted message made with a shift cipher and tries every key until a real word appears. Then it prints how many keys there are for longer keys.
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Every lesson is open to read. Enrolling also lets you:
Log in to join the discussion.
Loading…
This lesson is free to read. Enroll free to keep your place and take the tests.