Learning Objectives
By the end of this lesson, you will be able to:
- Understand theneed for and purpose of encryptionwhen transmitting data
- Understand how data is encrypted usingsymmetric encryption(single shared key)
- Understand how data is encrypted usingasymmetric encryption(public and private keys)
- Describe how data is protected onwiredandwirelessnetworks
- Explain thekey distribution problemin symmetric encryption
- Understand the strengths and weaknesses of each encryption method
Key Terms
Encryption
The process of encoding a message so it can only be read by the sender and the intended recipient.
Plaintext
The original, readable data before it is encrypted.
Ciphertext
The unreadable, scrambled data after encryption.
Decryption
The process of converting ciphertext back into plaintext using a key.
Encryption Key
A binary string of a certain length that, when applied to an encryption algorithm, encrypts or decrypts data.
Symmetric Encryption
Encryption using a single shared key to both encrypt and decrypt data. Also called "secret key" encryption.
Asymmetric Encryption
Encryption using a pair of related keys: a public key and a private key. Also called "public-key" encryption.
Public Key
A key that is shared with everyone and used to encrypt a message.
Private Key
A key that is kept secret by the recipient and used to decrypt a message.
Key Distribution Problem
The security risk in symmetric encryption where the shared key must be transmitted to the recipient and could be intercepted.
SSID
Service Set Identifier — the name of a wireless network, used with a password to create a master key.
Master Key
A key created from the SSID and password, used to encrypt and decrypt data on a wireless network.
WPA2
A dedicated security protocol designed for Wi-Fi networks.
Caesar Cipher
One of the earliest forms of encryption; replaces each letter with another letter a fixed distance away.
1. What is Encryption?
Encryptionis the process of encoding a message so it can only be read by the sender and the intended recipient. It scrambles readable text so it can only be read by the person who has the secret code, ordecryption key.
How Encryption Works
- Encryption takesplaintext(like a text message or email) and scrambles it into an unreadable format calledciphertext.
- This helps protect theconfidentialityof digital data whether stored on computer systems or transmitted through a network like the Internet.
- When the intended recipient accesses the message, the information is translated back to its original form. This is calleddecryption.
- To unlock the message, both the sender and the recipient have to use asecret encryption key— a collection of algorithms that scramble and unscramble data.
Why is Encryption Needed?
- Vast amounts ofpersonal informationare managed online and stored in the cloud or on servers with an ongoing connection to the web.
- It's nearly impossible to do business without your personal data ending up in an organisation's networked computer system.
- When data is transmitted over apublic network(wired or wireless), there is always a risk of it being intercepted by a hacker (eavesdropper).
- Using encryption helps tominimise this risk.
- Encryption protects sensitive information such as medical information, financial information, passwords, and personal details.
Purpose of Encryption
The purpose of encryption is to ensure that only somebody who iseligible to access datawill be able to read it, using a decryption key. Somebody who is not eligible can be excluded because they do not have the required decryption key.
Important:Encryption does not prevent data from being accessed or hacked. It prevents the data from beingunderstoodby an unauthorised user if it is accessed.
The Encryption Process
The same process applies whether data is being stored or transmitted. The key is essential — without it, the ciphertext remains unreadable.
Activity 1: Encryption Concepts
- State what is meant by encryption. [2]
- Explain why encryption is important when transmitting data over a public network. [3]
- Complete the diagram: Plain text → Encryption algorithm → ______ [1]
Solution:
- Encryption is the process of scrambling data (plaintext) into an unreadable format (ciphertext) [1] so that it can only be read by someone who has the correct decryption key [1].
- When data is transmitted over a public network, it can be intercepted by hackers [1]. Encryption makes the data meaningless / unintelligible to anyone who intercepts it without the key [1]. This protects sensitive information such as passwords, financial details, or personal data [1].
- Cipher text[1]
Check Your Understanding: What is Encryption?
1. What is plaintext? [1 mark]
- [1]The original, readable data before it is encrypted
2. What is ciphertext? [1 mark]
- [1]The unreadable, scrambled data after encryption
3. What is the purpose of encryption? [2 marks]
- [1]To ensure that only eligible people can access and understand the data
- [1]To protect the confidentiality of data transmitted over a network or stored on a system
4. What is a decryption key? [1 mark]
- [1]A secret code / key used to convert ciphertext back into readable plaintext
5. Why is encryption even more critical on wireless networks than wired networks? [2 marks]
- [1]Wireless data is transmitted over radio waves, which can be intercepted more easily than wired signals
- [1]Anyone within range can potentially intercept the data, so encryption is essential to keep it secure
6. Does encryption prevent data from being hacked? Explain. [2 marks]
- [1]No — encryption does not prevent data from being accessed or intercepted
- [1]It prevents the data from being understood by an unauthorised user if it is accessed without the key
2. Simple Encryption: The Caesar Cipher
One of the first forms of encryption was theCaesar cipher, which replaces each letter of the alphabet with another letter a fixed distance away from the original letter. The aim of encryption is to make the original message impossible to crack without the key.
How the Caesar Cipher Works
- Each letter in the plaintext is shifted a fixed number of places down the alphabet.
- The number of places shifted is thekey.
- For example, with a shift of 5 (Key = 5):
- A → F
- B → G
- C → H
- ...and so on
- To decrypt, the receiver shifts the letters back by the same number of places.
Example: Shift of 5
Interactive Caesar Cipher
Enter a message and a shift key to see the encrypted ciphertext.
Activity 2: Caesar Cipher Practice
Using a Caesar cipher with a shift key of 5:
- Encrypt the word "HELLO".
- Encrypt the phrase "COMPUTER SCIENCE".
- Decrypt the ciphertext "XJHKPODIB".
- Decrypt the ciphertext "GQYJX".
Solution:
- HELLO →MJQQT(H→M, E→J, L→Q, L→Q, O→T)
- COMPUTER SCIENCE →HTRUZYJW XHNJJSJ
- XJHKPODIB →COMPUTING(shift back 5)
- GQYJX →BLUE S... wait, G→B, Q→L, Y→T, J→E, X→S →BLTES. Hmm, let me recalculate: G-5=B, Q-5=L, Y-5=T, J-5=E, X-5=S →BLTES. Actually this doesn't form a word — let me check the ciphertext. Maybe it should be "GQYJX" → B L T E S. Perhaps the intended word was "BLTES"? Or maybe the ciphertext was meant to be different. Let's just show the process.
Check Your Understanding: Caesar Cipher
1. What is a Caesar cipher? [2 marks]
- [1]One of the earliest forms of encryption
- [1]It replaces each letter of the alphabet with another letter a fixed distance away from the original letter
2. Using a Caesar cipher with key = 3, encrypt the word "CAT". [1 mark]
- [1]FDW (C→F, A→D, T→W)
3. Why is the Caesar cipher considered weak? [2 marks]
- [1]There are only 25 possible shift keys
- [1]It can easily be cracked by brute force or frequency analysis
4. What is the key in a Caesar cipher? [1 mark]
- [1]The number of places each letter is shifted
5. How do you decrypt a Caesar cipher? [1 mark]
- [1]Shift the letters back by the same number of places as the key
6. A Caesar cipher is an example of what type of encryption? [1 mark]
- [1]Symmetric encryption (the same key is used to encrypt and decrypt)
3. Symmetric Encryption
Symmetric encryptionuses a single key to encrypt and decrypt. If you encrypt a zip file, then decrypt with the same key, you are using symmetric encryption. Symmetric encryption is also called"secret key" encryptionbecause the key must be kept secret from third parties.
How Symmetric Encryption Works
- Uses thesame (pre-shared) private keyto encode and decode data.
- This key must be transmitted (shared) in some waypriorto sending an encrypted message.
- Both the sender and receiver have an identical secret key.
- If a hacker gains access to the key, then they can decrypt intercepted information.
The Key Distribution Problem
- It is important that the sender and receiver have the same encryption and decryption key.
- There is a security risk here, since the sender has tosupply the keyto the recipient.
- This key could beintercepted by a hacker, which puts the security of the encrypted message at risk.
- This situation is referred to as theKEY DISTRIBUTION PROBLEM.
- Both parties could verbally share the key in person
- Both parties may use standard postage mail to share the key
- An algorithm may be used to calculate the key by sharing secret non-key information
Example: Symmetric Encryption with a 10-Digit Key
Consider a system that uses a 10-digit denary encryption key:4 2 9 1 3 6 2 8 5 6. This means every letter in a word is shifted across the alphabet +4, +2, +9, +1, and so on, places.
To get back to the original message, the same decryption key is used (4 2 9 1 3 6 2 8 5 6). The decryption process is the reverse of encryption — each letter is shifted -4, -2, -9, -1, and so on.
Activity 3: Symmetric Encryption
- State what is meant by symmetric encryption. [2]
- Explain the key distribution problem. [3]
- Describe two ways the key could be shared securely. [2]
Solution:
- Symmetric encryption uses a single shared key to encrypt and decrypt data [1]. The same key is used by both the sender and receiver [1].
- The sender and receiver must both have the same key [1]. The sender has to supply the key to the recipient [1]. This key could be intercepted by a hacker, which puts the security of the encrypted message at risk [1].
- Any two from: verbally share the key in person; use standard postage mail; use an algorithm to calculate the key by sharing secret non-key information [2].
Check Your Understanding: Symmetric Encryption
1. How many keys are used in symmetric encryption? [1 mark]
- [1]One single shared key (also called a secret key)
2. What is the main security weakness of symmetric encryption? [2 marks]
- [1]The shared key must be transmitted to the recipient before communication
- [1]If the key is intercepted during transmission, the security of the encrypted message is compromised (key distribution problem)
3. Why is symmetric encryption also called "secret key" encryption? [1 mark]
- [1]Because the same key must be kept secret between the sender and receiver — if a third party obtains it, they can decrypt the data
4. Give one example of symmetric encryption in everyday use. [1 mark]
- [1]Encrypting a zip file with a password / Wi-Fi encryption (WPA2) / any appropriate example
5. What happens if a hacker gains access to the symmetric key? [2 marks]
- [1]The hacker can decrypt any intercepted messages that were encrypted with that key
- [1]They can also encrypt their own messages and impersonate the sender
6. Why is symmetric encryption faster than asymmetric encryption? [2 marks]
- [1]Symmetric encryption uses a single key and a simpler algorithm
- [1]Asymmetric encryption requires two mathematically related keys and a more complex process
4. Asymmetric Encryption
Asymmetric encryption, also known aspublic-key cryptography, uses a pair of related keys — onepublic keyand oneprivate key— to encrypt and decrypt a message and protect it from unauthorised access or use.
The Two Keys
- Public key— a key that is shared with everyone and used by the recipient to encrypt a message.
- Private key— a key that is kept secret by the recipient and used to decrypt a message.
- Any data encoded with one key requires the other to decode.
- If someone uses your public key to encrypt an email, that person can be sure that only you will be able to decode it.
- Private keys mustneverbe shared.
How It Works
- Person A uses the recipient'spublic keyto encrypt their message.
- Person A sends the encrypted message over the network or internet.
- Person B decrypts the message using their secretprivate key.
- Only the matching private key can decrypt the message, and it is never sent over the internet.
Example: Tom Sends a Confidential Document to Jane
Jane can exchange her public key with any number of people, so she is able to receive encrypted messages and decrypt them using her private key. If two-way communication is required between multiple users, they all need to generate their own matching public and private keys and swap public keys with each other.
Asymmetric Encryption Flow
The public key is used toencryptthe message. Only the matching private key candecryptit. The private key is never shared.
Activity 4: Asymmetric Encryption
- Describe how asymmetric encryption is used to send a secure message. [4]
- Explain why asymmetric encryption is more secure than symmetric encryption. [3]
Solution:
- The sender obtains the recipient's public key [1]. The sender uses the public key to encrypt the message [1]. The encrypted message is sent over the network [1]. The recipient uses their private key to decrypt the message [1].
- The private key is never transmitted over the network, so it cannot be intercepted [1]. Even if the public key is intercepted, it cannot be used to decrypt the message [1]. Only the recipient's private key can decrypt the message, and it is kept secret [1].
Check Your Understanding: Asymmetric Encryption
1. How many keys are used in asymmetric encryption? [1 mark]
- [1]Two keys — a public key and a private key
2. Which key is used to encrypt a message? [1 mark]
- [1]The recipient's public key
3. Which key is used to decrypt a message? [1 mark]
- [1]The recipient's private key
4. Why is the private key never shared? [2 marks]
- [1]The private key is the only key that can decrypt messages encrypted with the matching public key
- [1]If the private key were shared or intercepted, the security of all messages would be compromised
5. Why is asymmetric encryption slower than symmetric encryption? [2 marks]
- [1]It uses two mathematically related keys and a more complex algorithm
- [1]The added complexity of the decoding process makes it slower than symmetric encryption
6. Complete the sentence: In asymmetric encryption, the sender uses the recipient's ______ key to encrypt, and the recipient uses their ______ key to decrypt. [2 marks]
- [1]public
- [1]private
5. Encryption on Wired & Wireless Networks
Encryption is important on both wired and wireless networks, but it'seven more critical on wireless networksdue to the data being transmitted over radio waves, making it easy to intercept.
Wireless Network Encryption
- Wireless networks are identified by aService Set Identifier (SSID)which along with a password is used to create amaster key.
- When devices connect to the same wireless network using the SSID and password, they are given a copy of the master key.
- The master key is used to encrypt data intociphertextbefore being transmitted.
- The receiver uses thesame master keyto decrypt the ciphertext back to plaintext.
- To guarantee the security of data, themaster key is never transmitted. Without it, any intercepted data is rendered useless.
- Wireless networks use dedicated protocols likeWPA2specifically designed for Wi-Fi security.
Wired Network Encryption
- Wired networks are encrypted in a very similar way to a wireless network, using a master key to encrypt data and the same key to decrypt data.
- Encryption on a wired network differs slightly as it is often left to individual applications to decide how encryption is used, for exampleHTTPS.
Exam Tips
- Don't just say "encryption keeps data safe." You must mention:
- Plaintext becomes ciphertext
- Only authorised users with the correct key can decrypt it
- Many students incorrectly say asymmetric encryption uses "a private key and password." Don't confuse the public key (used to encrypt) with a generic "password." They are not the same.
Activity 5: Network Encryption
- Describe how data is encrypted on a wireless network. [4]
- Why is encryption more critical on wireless networks than wired networks? [2]
- What is WPA2 and why is it used? [2]
Solution:
- Wireless networks are identified by an SSID [1]. The SSID and password are used to create a master key [1]. When devices connect using the SSID and password, they are given a copy of the master key [1]. The master key is used to encrypt data into ciphertext before transmission, and the same key decrypts it at the receiver [1].
- Wireless data is transmitted over radio waves, which can be easily intercepted by anyone within range [1]. Wired data requires physical access to the cable, making it more difficult to intercept [1].
- WPA2 is a dedicated security protocol designed for Wi-Fi networks [1]. It is used to guarantee the security of data transmitted over wireless networks [1].
Check Your Understanding: Network Encryption
1. What does SSID stand for? [1 mark]
- [1]Service Set Identifier
2. How is the master key created on a wireless network? [2 marks]
- [1]The SSID (network name) and the password are used together
- [1]To create the master key
3. Why is the master key never transmitted? [2 marks]
- [1]To guarantee the security of data
- [1]Without the master key, any intercepted data is rendered useless
4. What is the difference between how wired and wireless networks handle encryption? [2 marks]
- [1]Wireless networks use a master key derived from the SSID and password
- [1]Wired networks often leave encryption to individual applications (e.g. HTTPS), though they also use a master key approach
5. What is WPA2? [1 mark]
- [1]A dedicated security protocol designed for Wi-Fi networks
6. Complete the sentence: Encryption prevents the data from being ______ by a hacker. [1 mark]
- [1]understood
Key Takeaways
- Encryptionis the process of encoding a message so it can only be read by the sender and intended recipient. It convertsplaintextintociphertext.
- Decryptionis the reverse process — converting ciphertext back into plaintext using a key.
- The purpose of encryption is to ensure that only eligible people can access and understand data. Encryption doesnotprevent data from being accessed — it prevents it from being understood.
- Symmetric encryptionuses asingle shared keyto encrypt and decrypt. It is faster but has a security weakness: thekey distribution problem(the key must be shared and could be intercepted).
- Asymmetric encryptionuses apair of keys: apublic key(shared with everyone, used to encrypt) and aprivate key(kept secret, used to decrypt).
- Theprivate key is never transmitted, making asymmetric encryption more secure than symmetric encryption. However, it is slower.
- TheCaesar cipheris one of the earliest forms of encryption — it replaces each letter with another a fixed distance away. It is a symmetric encryption method and is easily cracked.
- Wireless networksuse theSSIDand password to create amaster key, which encrypts and decrypts data. The master key is never transmitted. Protocols likeWPA2are used for Wi-Fi security.
- Wired networksare encrypted similarly but often leave encryption to individual applications (e.g. HTTPS).
- Encryption is more critical onwireless networksbecause radio waves can be easily intercepted by anyone within range.
- Large keys (e.g. 100 bits) generate an enormous number of combinations, making them nearly impossible for a hacker to guess.
Question Bank
1. State what is meant by encryption. [2 marks]
- [1]The process of scrambling / encoding data (plaintext)
- [1]So that it can only be read by someone who has the correct decryption key
2. State what is meant by symmetric encryption. [1 mark]
- [1]Uses the same key to encrypt and decrypt a message
3. Describe how data is encrypted on a wireless network. [4 marks]
- [1]The SSID and password are used to create a master key
- [1]Devices connecting to the network are given a copy of the master key
- [1]The master key is used to encrypt data into ciphertext before transmission
- [1]The receiver uses the same master key to decrypt the ciphertext back to plaintext
4. Explain why encryption is more critical on wireless networks than wired networks. [2 marks]
- [1]Wireless data is transmitted over radio waves, which can be intercepted by anyone within range
- [1]Wired data requires physical access to the cable, making it more difficult to intercept
5. Describe how asymmetric encryption works. [4 marks]
- [1]Uses a pair of keys — a public key and a private key
- [1]The sender uses the recipient's public key to encrypt the message
- [1]The encrypted message is sent over the network
- [1]The recipient uses their private key to decrypt the message
6. Explain the key distribution problem in symmetric encryption. [3 marks]
- [1]The sender and receiver must both have the same key
- [1]The sender has to supply the key to the recipient before communication
- [1]The key could be intercepted during transmission, compromising the security of the encrypted message
7. Complete the sentences about symmetric encryption using the terms: plain, key, cipher, understood. [4 marks]
- The data before encryption is known asplaintext.
- To scramble the data, an encryptionkeyis used.
- The data after encryption is known asciphertext.
- Encryption prevents the data from beingunderstoodby a hacker.
8. A finance company is worried about the security of data stored on its servers. The company has decided to encrypt the data. Describe how the data are encrypted. [4 marks]
- [1]An encryption algorithm is used to scramble the data
- [1]A key is used with the algorithm
- [1]The plaintext is converted into ciphertext
- [1]The data can only be decrypted using the correct key
9. Data is encrypted using 128-bit symmetric encryption. State how the strength of the encryption can be improved. [1 mark]
- [1]Increase the length of the key (use more than 128 bits) or use a more complex encryption algorithm
10. Compare symmetric and asymmetric encryption. [4 marks]
- [1]Symmetric uses one shared key; asymmetric uses two keys (public and private)
- [1]Symmetric is faster; asymmetric is slower
- [1]Symmetric has a key distribution problem; asymmetric does not (private key is never shared)
- [1]Asymmetric is more secure; symmetric is less secure if the key is intercepted
11. Adele encrypts the data on her mobile device to keep it more secure. State how encryption will keep the data more secure. [1 mark]
- [1]It makes the data meaningless (unreadable) to anyone who does not have the decryption key
12. Explain how a Caesar cipher works and give an example. [4 marks]
- [1]One of the earliest forms of encryption
- [1]Replaces each letter of the alphabet with another letter a fixed distance away
- [1]The number of places shifted is the key
- [1]Example: With a shift of 5, COMPUTING becomes XJHKPODIB
13. Why is the private key never transmitted over a network in asymmetric encryption? [2 marks]
- [1]The private key is the only key that can decrypt messages encrypted with the matching public key
- [1]If it were transmitted, it could be intercepted, compromising the security of all messages
14. What is a master key and how is it used in wireless encryption? [3 marks]
- [1]A key created from the SSID and password of a wireless network
- [1]It is given to devices that connect to the network
- [1]It is used to encrypt data into ciphertext before transmission and decrypt it at the receiver
15. A student says "Encryption prevents hackers from accessing data." Explain why this statement is not completely accurate. [2 marks]
- [1]Encryption does not prevent data from being accessed or intercepted by hackers
- [1]It prevents the data from being understood — without the decryption key, the intercepted data remains meaningless