Loading...
Hello, my name is Mrs. Holborow, and welcome to Computing.
I'm so pleased you've decided to join me for the lesson today.
In today's lesson, we'll be learning about common cyphers, and we will use cyphers to encrypt and decrypt information.
Welcome to today's lesson from the unit Cyber threats and security.
This lesson is called "Common cyphers." And by the end of today's lesson, you'll be able to describe how common cyphers work and use them to encrypt and decrypt information.
Shall we make a start? We will be exploring these keywords in today's lesson.
Let's take a look at them now.
Encrypt.
Encrypt, to take readable information and convert it into a coded unreadable form.
Decrypt.
Decrypt, to take unreadable information and convert it back into a readable form.
Ciphertext.
Ciphertext, a scrambled unreadable version of a message.
Look out for these keywords throughout today's lesson.
Today's lesson is broken into two sections.
We'll start by describing cyphers, and then we'll move on to use cyphers to encrypt and decrypt information.
Let's make a start by describing cyphers.
A cypher is a method or algorithm used to encrypt and decrypt messages and data.
Some cyphers use simple methods to encrypt data, while others are more complex and provide a stronger level of encryption.
The type of cypher used will depend on the application and the strength of encryption needed.
Readable text that has not been encrypted is known as plaintext.
Unreadable, scrambled text that has been encrypted using a cypher is known as ciphertext.
Messages have been encrypted using cyphers for thousands of years.
The Caesar cypher is one of the simplest and earliest known methods of encryption.
It is named after Julius Caesar and is thought to be over 2000 years old.
The Caesar cypher encryption method is a type of substitution cypher.
A substitution cypher is where each letter in the original message is replaced by a letter in a fixed number of positions up or down in the alphabet.
Caesar was known for using an encryption key of plus three.
This means that each character in the original plaintext was moved up the alphabet by three.
For example, A becomes D and J becomes M.
Time to check your understanding.
If a substitution cypher had an encryption key of plus five, what would the plaintext character K change to? Would it be a, O, b, M, or c, P? Pause the video whilst you have a think.
Did you select P? Well done.
Remember we're using a shift of plus five here.
Even a plus one substitution encryption key can make words unreadable.
So here we have the plaintext message "HELLO." If we use the encryption with a substitution key of plus one, this changes the message or ciphertext to I-F-M-M-P, which doesn't make sense.
But it would be very easy to decrypt the ciphertext back to the original plaintext by moving each letter minus one down the alphabet.
So here we have the ciphertext, and we can decrypt it back to the plaintext, which is the message "HELLO." The encryption and decryption algorithms for a Caesar cypher are not complex.
There are only 25 possible Caesar cypher keys, so it's easy enough for a human to try them all and very easy for a computer to do it.
Other cyphers can offer encryption that is harder for a human or computer to decrypt.
A mixed alphabet cypher can be used to replace each letter in the plaintext with a different letter from a rearranged alphabet.
So here we have an example of original plaintext and the replacement alphabet that has been used.
Using the mixed alphabet cypher below, the plaintext "HELLO" would be encrypted to A-L-D-D-Q.
Polyalphabetic encryption is more challenging to decrypt than a Caesar cypher or mixed alphabet cypher.
Instead of shifting all the letters by the same amount like in the Caesar cypher, or using a single rearranged alphabet like in the mixed alphabet cypher, polyalphabetic encryption applies a shifting pattern that changes the characters throughout the message.
For the example, using the shift pattern one, two, four, three, one, the plaintext message "HELLO" can be encrypted.
H moves up one character to become I, E moves up two characters to become G, L moves up four characters to become P, L moves up three characters to become O, and O moves up one character to become P.
This makes this message harder to crack because the characters such as L, which are repeated, aren't encrypted to the same letters in this example.
This results in the encrypted ciphertext I-G-P-O-P.
Sam says, "Encrypting with substitution methods looks fun, but I don't think I trust it with protecting my banking or personal details." One of the problems with Caesar cypher and other simple substitution cyphers is that while a human might take an hour or so to crack a code, computers can do it very quickly.
This means that in the modern world, these encryption methods are not strong enough to protect against real-world data.
So Sam is right not to trust it.
Time to check your understanding.
Which encryption method uses a shift pattern to change the characters throughout the message? Is it a, Cesar cypher, b, mixed alphabet cypher, or c, polyalphabetic cypher? Pause the video whilst you think about your answer.
Did you select c, polyalphabetic cypher? Remember this changes the shift pattern with each character throughout the message.
Is this statement true or false? It is difficult for a computer to crack a code created using substitution cyphers.
Pause the video whilst you have a think.
Did you say false? Well done.
Computers can crack codes created with substitution cyphers very quickly.
Substitution encryption methods are not strong enough to protect against real-world digital data.
Okay, we're moving on to our first task of today's lesson.
And you've done a great job to get to this point, so well done.
For part one, I'd like you to write two to three sentences to describe a cypher.
And then for part two, I'd like you to describe two different types of cypher.
Pause the video whilst you complete the task.
How did you get on with the activity? Did you manage to describe a cypher? Well done.
Let's have a look at a sample answer together.
For part one, you were asked to write two to three sentences to describe a cypher.
A cypher is a method used to encrypt and decrypt messages and data.
Some cyphers use simple methods to encrypt data, while others are more complex and provide a stronger level of encryption.
Cyphers are used to protect information so that only people with permissions can read it.
For part two, you were asked to describe two types of cypher.
One type of cypher is the Caesar cypher.
In a Caesar cypher, each letter in a message is shifted up or down by the same amount, turning the original message into ciphertext.
It's a simple method and relatively easy to break as there are only 25 possible keys to try.
Another type is the polyalphabetic cypher, which uses a repeating pattern of shifts based on a keyword or code.
This means the same letter in the message can be encrypted in different ways depending on its position, making the ciphertext much harder to decode without knowing the key.
Remember, if you need to pause your video here to add any detail to your answer, you can do that now.
So we've described cyphers.
Let's now move on to use cyphers to encrypt and decrypt information.
Aisha says, "I'm wondering what the difference is between a cypher and encryption?" Do you know the answer to this? Maybe pause the video whilst you have a think.
Ah, Jun has the answer.
Jun says, "A cypher is a specific method used to encrypt data.
It's like the instructions.
Encryption is the process of turning readable plaintext into ciphertext using the cypher." Well done, Jun.
That's a really clear answer.
Aisha says, "That makes sense, I'm going to encrypt a simple message using a Caesar cypher.
Would you like to decrypt it, Jun?" Jun says, "Yes, please.
I'd like to decrypt your message, Aisha.
That sounds fun." Shall we have a go too? Aisha says, "I'm going to encrypt my message into ciphertext with a key of plus three.
I wonder if Jun can figure it out." So Aisha's original plaintext message is, "There are eight bits in a byte." To encrypt a message, a simple process can be carefully followed.
First, create a new alphabet with replacement letters shifted plus three up the alphabet.
So here we have a table with our original plaintext and the replacement, and each letter has been shifted by three.
So A has become D, B has become E, and so on.
It's useful to have it in this form so we can quickly encrypt our message.
We then use the alphabet table to replace the original plaintext characters with the new ones.
So the original message was, "There are eight bits in a byte." Aisha says, "I'm going to carefully work through each letter and word one at a time to encrypt it into ciphertext." So "There" has become W-K-H-U-H, "are" has become D-U-H, "eight" has become H-L-J-K-W, "bits" has become E-L-W-V, "in a" has become L-Q and then D, and "byte" has become E-B-W-H.
Aisha says, "That was quite straightforward.
I wonder if Jun will be able to decrypt it?" So now we have our ciphertext message.
Jun says, "That ciphertext looks really strange, Aisha.
To start with, I'm going to try and decrypt the first word." So the first word is W-K-H-U-H.
Jun says, "I know there are only 25 possible keys to a Cesar cypher, so I'm going to start with plus one and work through until the first word makes sense." That's a really sensible approach, Jun.
Well done.
Jun says, "If Aisha used a plus one encryption key, I need to move each letter down one in the alphabet to decrypt it into the original plaintext.
The word V-J-G-T-G doesn't make sense though." So it can't be a plus one shift.
Jun says, "Next I'm going to see if Aisha encrypted with a plus two key.
I need to move each letter down two in the alphabet to test this.
U-I-F-S-F still isn't a word though.
If Aisha used a plus three key, I need to move each letter down three in the alphabet.
I think I've got it.
This time the word is 'there.
'" Jun says, "Now I think I've found the key, I'm going to work through the rest of Aisha's ciphertext and see if the whole message can be decrypted." Jun says, "The next word also seems to work if I move each letter down three in the alphabet.
It's 'are.
' I'm pretty confident Aisha used a key of plus three now.
The next word is 'eight.
' I think I've decrypted half of the ciphertext now.
The fourth word is 'bits.
' The next word is 'in.
' The next word is 'a.
' I think the final word might be 'byte.
'" Is Jun, right? "I was right.
The last word was 'byte.
' I've decrypted Aisha's ciphertext into a plaintext message.
I can't wait to tell her.
Aisha, I think your message was 'there are eight bits in a byte.
' Did I decrypt the ciphertext right?" Aisha says, "Yes, that's right, Jun.
Well done." Solving a Caesar cypher requires a logical approach that uses a trial and error method.
Jun says, "I'm really pleased Aisha only used a Caesar cypher key of plus three.
It would've taken much longer to try out all the possible 25 keys." This helps identify patterns and spot real words, making it possible to decrypt the message without knowing the original key.
Time to check your understanding.
How many keys are possible in a Caesar cypher? Is it a, 26, b, 24, or c, 25? Pause the video whilst you think about your answer.
Did you select a, 25? Well done.
Is this statement true or false? Solving a Caesar cypher requires a logical approach and a trial and error method.
Pause the video whilst you have a think.
Did you say true? Well done.
Remember how Jun solved Aisha's message.
Okay, we're now moving on to our next task of today's lesson.
Jun says, "I've encrypted a message using a Caesar cypher.
Can you decrypt my message?" So June's ciphertext is J-C-N-H, space, C, space, D-A-V-G, space, K-U, space, C, space, P-K-D-D-N-G.
For part one, use a trial and error method to decrypt Jun's ciphertext.
How did you get on? Did you manage to decrypt Jun's ciphertext? So the ciphertext was J-C-N-H, C, D-A-V-G, K-U, C, P-K-D-D-N-G.
Jun's ciphertext had been encoded with a plus two Caesar cypher key.
His ciphertext can be decoded by moving each letter down two in the alphabet.
So the original plaintext message is "half a byte is a nibble." A starting clue here is that we had two Cs as single characters.
And in the English language, we could probably predict that these were As.
So that was a bit of a clue on how to decrypt this message.
I'd now like you to complete the table below to shift each letter down six in the alphabet.
So we've got the table with the original plaintext and you need to fill in the replacement.
Once you've done that, I'd like you to use the table to help encode the plaintext "top secret message" using a minus six key.
Pause the video whilst you have a go at the task.
How did you get on? Did you manage to complete the table and encode the message? Well done.
Let's have a look at the answer together.
So the first stage was to complete the table to shift each letter six down in the alphabet.
So A has become U, B has become V, C has become W, and so on.
You were then asked to use your table to encode the plaintext "top secret message" with a minus six key.
Your ciphertext should have been N-I-J, M-Y-W-L-Y-N, G-Y-M-M-U-A-Y.
If you haven't quite got that correct, maybe go back to step two and complete your table again.
We've come to the end of today's lesson, "Common cyphers," and you've done a fantastic job, so well done.
Let's summarise what we've learned in this lesson.
Cyphers are used to encrypt and decrypt messages, turning readable text into unreadable ciphertext.
Common cyphers like the Caesar cypher and substitution cyphers use patterns or keys to shift or replace letters in a message.
More complex cyphers use multiple shifts or a keyword, making them harder to break.
I hope you've enjoyed today's lesson, and I hope you'll join me again soon.
Bye.