A parcel with a lock
A help desk sends a spreadsheet of staff phone numbers to a supplier. The email is copied by a thief on the way.
If the file is locked, the thief gets a mess. If it is not locked, the thief gets every number.
Today you choose the right lock for the job.
Key words
| Word | What it means |
|---|---|
| Encryption | Scrambling data so only a person with the right key can read it. |
| Cryptography | The maths used to scramble and unscramble data. |
| Key | A secret value that locks or unlocks data. |
| Symmetric encryption | One key both locks and unlocks. |
| Asymmetric encryption | A pair of keys: the public key locks, the private key unlocks. |
| Public key | The key you give to everyone. |
| Private key | The key only its owner keeps. |
| Risk mitigation | A step that makes a risk smaller. |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can say why a business encrypts data, and choose symmetric or asymmetric encryption for a job.
Starter: last time
Have a go
Starter: last time
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Cycle 1: the purpose
The purpose of encryption is to store data safely and to send data safely, using cryptography.
It does not stop a thief taking the data. It makes the data useless to the thief. That is why it is a risk mitigation.
The three kinds of encryption were taught in the core security course. Here you decide which one a business should pick.
Cycle 2: symmetric in the workplace
Symmetric encryption is fast. So it is used where there is a lot of data or many messages.
Example: a card payment system. The shop terminal and the bank share a secret key. Each payment is locked and unlocked with it.
The risk is the key. Whoever holds it can read everything. So the business must store and change keys with care.
Run: lock and unlock with one key
cd /tmp && echo "order 1234" > note.txt && openssl enc -aes-256-cbc -pbkdf2 -salt -pass pass:rainbow42 -in note.txt -out note.enc && wc -c note.enc && openssl enc -d -aes-256-cbc -pbkdf2 -pass pass:rainbow42 -in note.encA command for the lesson’s lab terminal. It is shown here and not run.
What you should see
Note
The file size of note.enc, then the words "order 1234" again. The same password locked and unlocked it. A password on a command line is for a lab only. At work, keys are never typed like this.
Cycle 3: asymmetric in the workplace
Asymmetric encryption suits sending private data from one person to another, even when they have never met.
Example: encrypted email. Sam puts a public key on the staff page. A supplier locks the message with it. Only Sam's private key opens it.
It is slower, so it is used for small things: a message, or a first secret.