Encryption, Encryption Protocols & Digital Certificates
9618 Computer Science
📚 Learning Objectives
Show understanding of how encryption works
Understand public key, private key, plain text, cipher text
Explain symmetric key cryptography and asymmetric key cryptography
Understand how keys send private messages from public to individual
Understand how keys send verified messages to the public
Explain purpose, benefits and drawbacks of quantum cryptography
Show awareness of Secure Socket Layer/Transport Layer Security
Understand purpose of SSL/TLS in client-server communication
Show understanding of digital certification
Explain how a digital certificate is acquired and used
📖 Prior Knowledge Required
Basic understanding of data transmission over networks
Knowledge of client-server architecture
Understanding of binary representation of data
Awareness of security threats (hackers, eavesdroppers)
Basic knowledge of internet protocols
🌟 Did You Know?
When data is transmitted over any public network, there is a risk of it being intercepted by hackers (eavesdroppers). Encryption helps to minimise this risk by altering data into a form that is unreadable by anybody for whom the data is not intended. It cannot prevent data being intercepted, but it stops it from making any sense to eavesdroppers!
1. How Encryption Works
Encryption is a process that scrambles readable text so it can only be read by the person who has the secret code, or decryption key. It helps provide data security for sensitive information.
📖 What is Encryption?
A method of scrambling data before being transmitted across a network
Protects contents from unauthorised access by making data meaningless
Even more critical on wireless networks due to data transmitted over radio waves
Encryption takes plain text and scrambles it into unreadable format called cipher text
When the intended recipient accesses the message, information is translated back to original form - called decryption
1.1 Four Security Concerns
There are four main security concerns when data is transmitted:
Security Concern
Description
Achieved By
Confidentiality
Only the intended recipient should be able to read or decipher the data
Encryption, Public/Private keys
Authenticity
Need to identify who sent data and verify that the source is legitimate
Digital signatures
Integrity
Data should reach its destination without any changes
Digital signature / Message digest
Non-Repudiation
Neither sender nor recipient should be able to deny they were part of the transmission
Digital certificates
💡 Exam Tip
Remember CAIN: Confidentiality, Authenticity, Integrity, Non-repudiation. These are the four pillars of data transmission security!
2. Plaintext and Ciphertext
Cryptography is the process of converting between readable text, called plaintext, and an unreadable form, called ciphertext.
📝 The Encryption/Decryption Process
Original data being sent is known as plaintext
Sender converts plaintext message to ciphertext using an encryption algorithm and key
The ciphertext is transmitted to the receiver over the network
When transmission is received, receiver converts ciphertext back to plaintext using a decryption algorithm and key
📖 Key Definitions
Plaintext: Original data that humans can understand (English sentences, scripts, code)
Ciphertext: A series of randomized letters and numbers which humans cannot make sense of
Encryption: The process of converting plaintext to ciphertext
Decryption: The reverse process of converting ciphertext back to plaintext
Encryption Key: A series of numbers used to encrypt and decrypt data, created with algorithms
💡 Exam Tip
Remember: Plaintext = Human readable, Ciphertext = Scrambled/encrypted. The key is what makes the transformation possible!
3. Symmetric Encryption
Symmetric encryption uses a single secret key to encrypt and decrypt data. The same key is used for both processes.
📖 Key Characteristics of Symmetric Encryption
The sender uses a key to encrypt the data before transmission
The receiver uses the same key to decrypt the data
Usually faster than asymmetric encryption
Ideal for encrypting large amounts of data
Also known as secret key cryptography or private key cryptography
3.1 The Key Distribution Problem
⚠️ Key Distribution Problem
One major issue with symmetric encryption is that both sender and recipient need to use the same secret key. This is a security risk, since the sender has to supply the key to the recipient. This key could be intercepted during transmission.
The single key is required for both sender and recipient
If key is intercepted, all messages can be decrypted by attacker
No secure way to transmit the key initially
Advantages
Disadvantages
Fast and efficient for bulk data
Key distribution is problematic
Less computational overhead
If key is compromised, all data is vulnerable
Simple to implement
Not suitable for one-to-many communication
Same person can encrypt and decrypt
Requires secure channel to share key
4. Asymmetric Encryption
Asymmetric encryption uses two keys - a public key for encryption and a private key for decryption. This solves the key distribution problem.
📖 Key Characteristics of Asymmetric Encryption
Uses two different keys: public key and private key
Public key: Available to all users, used to encrypt data
Private key: Known only to owner, used to decrypt data
Keys are mathematically linked but cannot be derived from each other
Typically slower than symmetric encryption
Used for secure, smaller data transactions (passwords, bank details)
4.1 Public vs Private Keys
Feature
Public Key
Private Key
Availability
Known to everyone, widely distributed
Only known to owner, kept secret
Primary Use
Encrypt data
Decrypt data
Distribution
Shared via digital certificates
Never shared with anyone
For Signatures
Verifies digital signature
Creates digital signature
💡 Exam Tip
Remember: Public key = Lock (encrypt), Private key = Key (decrypt). You share your public key with everyone so they can send you encrypted messages, but only YOU can decrypt them with your private key!
5. Choosing Encryption Type
Symmetric encryption is fast but has key-sharing issues; asymmetric is slower but solves these issues. The choice depends on whether speed or security is more critical.
Encryption Type
Best Used For
Reasons
Symmetric
Large files, databases, backups
Fast and efficient for bulk data; same person encrypts and decrypts
Asymmetric
Confidential communications, passwords, bank details
Solves key distribution problem; highly secure for sensitive data
6. Quantum Cryptography
Quantum cryptography uses principles of quantum mechanics to secure communication channels. Unlike classical cryptography, it leverages quantum particles like photons to achieve secure communication.
📖 Purpose of Quantum Cryptography
Produce a virtually unbreakable encryption system
Send virtually hack-proof secure messages using laws of quantum mechanics
Detect eavesdropping - properties of photons change when observed
Protect security of data transmitted over fibre optic cables
Enable use of longer encryption keys
6.1 Quantum Key Distribution (QKD)
📝 How QKD Works
Sender uses a light source to generate photons
Photons are sent through polarizers giving one of four possible polarisations:
• Vertical polarisation = 1 bit
• Horizontal polarisation = 0 bit
• 45° right polarisation = 1 bit (diagonal)
• 45° left polarisation = 0 bit
Polarised photons travel along fibre optic cable
At destination, beam splitters and photon detectors read the values
Process repeated until encryption key transmitted
If intercepted, photons are destroyed - key compromise detected!
Benefits
Drawbacks
Unbreakable key transmission (quantum physics)
Expensive - requires specialised hardware
Eavesdropper detection - interception changes quantum state
Short distance limits (~250km)
Perfect forward secrecy - keys used once then discarded
Slow transmission speed
Not vulnerable to quantum computers
Technology still evolving, not standardised
💡 Exam Tip
Quantum cryptography secures the KEY EXCHANGE, not the message itself! It uses quantum mechanics to safely transmit encryption keys. Remember: if someone tries to intercept, the photons are destroyed and the intrusion is detected!
7. SSL/TLS Protocols
SSL (Secure Sockets Layer) and TLS (Transport Layer Security) are cryptographic protocols designed to provide communications security over a network. They encrypt data sent over the internet.
📖 What is SSL?
A security protocol used to encrypt data sent over the internet
Prevents eavesdropping, tampering, or man-in-the-middle attacks
Creates a secure connection between web server and browser
User knows SSL is active when they see https:// protocol and/or padlock icon
Also performs data compression and integrity checks
📖 What is TLS?
Successor to SSL - more secure and efficient
Provides encryption, authentication, and data integrity
Modern websites use TLS (but people often still call it "SSL")
Can be extended with new authentication methods (unlike SSL)
Uses Session Caching for improved performance
Feature
SSL
TLS
Security Level
Older, less secure
Modern, more secure
Extensibility
Cannot add new authentication methods
Can extend with new methods
Performance
Slower (no session caching)
Faster (uses session caching)
Architecture
Monolithic design
Separates handshake from record protocol
7.1 How SSL/TLS Works
📝 SSL/TLS Handshake Process
Browser Request: Browser sends request to server asking it to identify itself
Server Response: Server sends SSL certificate and its public key to browser
Certificate Verification: Browser checks certificate against trusted Certificate Authorities (CAs)
Trust Established: If trusted, browser creates a symmetric session key
Key Encryption: Session key encrypted with server's public key, sent to server
Server Decrypts: Server uses its private key to decrypt session key
Secure Channel: All subsequent data encrypted with symmetric session key
💡 Exam Tip
TLS has replaced SSL - but both are encryption protocols used with digital certificates. Always mention digital certificates when explaining how websites create secure connections!
8. SSL/TLS Applications
SSL/TLS protocols are used in many situations where secure data transmission is required:
Application
Description
Online Banking
All financial transactions require encryption
Online Shopping
Protecting payment card details and personal information
Email
Sending and receiving secure emails
Cloud Storage
Secure file upload/download
VPNs
Virtual Private Networks for secure remote access
VoIP
Voice over IP for video and audio chatting
Social Networks
Protecting user data and communications
Intranets/Extranets
Secure internal company communications
8.1 Disadvantages of SSL
❌ Disadvantages of Using SSL
Slower website speed due to encryption overhead
SSL certificates require payment (cost factor)
When SSL certificate expires, website will not work and give error
Configuration and maintenance required
🌟 Did You Know?
The symmetric session key created during SSL/TLS handshake is used only for that particular session. This ensures all communication remains secure and private. After the session ends, the key is discarded!
9. Digital Signatures
Digital signatures are a way of validating the authenticity of digital documents and identifying the sender. A signature is authentic when you know who created the document and that it has not been altered.
📖 Key Concepts
Hash Function: A one-way algorithm that produces a fixed-length output (hash value/message-digest) from any input
Message-Digest: The hash value produced when a message is processed through a hash function
Even a small change in input produces a completely different output
Output is always the same length regardless of input size
Cannot be reversed to get original input (one-way function)
9.1 Creating a Digital Signature
📝 Steps to Create a Digital Signature
At Sender End:
Sender uses a hash function on the message to create a message digest
Sender encrypts the digest with their private key
This encrypted digest is the digital signature
Message is transmitted as plaintext along with digital signature
9.2 Verifying a Digital Signature
📝 Steps to Verify a Digital Signature
At Receiver End:
Receiver uses same hash function on received message to create digest
Receiver decrypts digital signature using sender's public key (from digital certificate)
This produces the original message digest
If both digests match, message is authentic and unaltered
❌ Limitation of Digital Signatures
Public key could be forged by a third party so recipient is not sure that message is from legitimate source. This is why we need Digital Certificates from trusted Certificate Authorities!
10. Digital Certificates
A digital certificate is an electronic document used to prove the online identity of a website or individual. It is issued by a trusted third party called a Certificate Authority (CA).
📖 What Does a Digital Certificate Contain?
Version number of the certificate
Certificate Serial number (unique identifier)
Name of Certificate Authority that issued certificate
Subject Name (company/person/computer owning certificate)
Hashing Algorithm used
Subject's Public Key
Validity period (start and expiry date)
CA's Digital Signature
10.1 How to Obtain a Digital Certificate
📝 Process of Obtaining a Digital Certificate
Person A starts application on CA website
Public key and associated private key generated on A's computer
Person A submits application to CA containing public key and personal information
Data encrypted with CA's public key before submission
CA confirms identity of person A and decrypts with CA's private key
CA creates digital certificate containing A's public key and data
CA signs certificate with CA's private key
Digital certificate issued to person A
10.2 Digital Certificate vs Digital Signature
Digital Certificate
Digital Signature
Obtained from Certificate Authority (CA)
Created from a message using hash function
Provides authentication of owner
Authenticates individual messages
Remains unchanged while valid
New signature created for every message
Contains public key and extra information
Uses private key to create signature
🧠 Memory Trick
Certificate = ID Card (proves who you are, stays the same)
Signature = Signature (signs each document, unique to each message)
11. Key Takeaways
📌 Summary Points
Encryption Basics
Encryption: Scrambles plaintext into ciphertext; requires key for encryption/decryption
Four Security Concerns: Confidentiality, Authenticity, Integrity, Non-repudiation (CAIN)
Symmetric: One key for both operations - fast but key distribution problem
Asymmetric: Two keys (public/private) - solves key distribution, slower but secure
Keys
Public Key: Available to all; used to encrypt data or verify signatures
Private Key: Known only to owner; used to decrypt data or create signatures
Keys are mathematically linked but cannot be derived from each other
Protocols & Certificates
SSL/TLS: Security protocols using certificates for secure HTTPS connections
Digital Signature: Hash of message encrypted with sender's private key
Digital Certificate: Electronic ID from CA proving ownership of public key
Certificate Authority (CA): Trusted third party that issues digital certificates
Quantum Cryptography
Uses quantum mechanics (photons) for secure key exchange
Any interception destroys photons - eavesdropping detected!
Creates virtually unbreakable encryption keys
12. Exam-Style Questions
1. Encryption is used to alter data into a form that makes it meaningless if intercepted. Describe the purpose of asymmetric key cryptography. [4 marks]
Answer:
To provide better security by using two different keys (a public key and a private key)
One key is used to encrypt the message
The matching key is used to decrypt the message
Solves the key distribution problem of symmetric encryption
Additional points for deeper understanding:
Public key can be freely distributed; private key kept secret
Enables secure communication without prior key exchange
2. Explain the differences between symmetric and asymmetric encryption. Include their advantages and disadvantages. [6 marks]
Answer:
Symmetric: Uses one key for both encryption and decryption
Asymmetric: Uses two keys (public for encryption, private for decryption)
Symmetric is faster and more efficient for large data
Asymmetric solves the key distribution problem
Symmetric has security risk during key exchange
Asymmetric is slower but provides better security for sensitive data
Additional points:
Symmetric best for: large files, databases, backups
Asymmetric best for: passwords, bank details, confidential communications
3. Describe the purpose of quantum cryptography and explain one benefit and one drawback. [5 marks]
Answer:
Purpose: To produce a virtually unbreakable encryption system using quantum mechanics
Uses Quantum Key Distribution (QKD) with photons to securely share keys
Benefit: Eavesdropping detection - any interception changes quantum state
Benefit: Not vulnerable to quantum computers
Drawback: Expensive - requires specialised hardware and fibre optic cables
Additional points:
Drawback: Limited range (~250km)
Drawback: Slow transmission speed
Drawback: Technology still evolving, not standardised
4. Explain how SSL/TLS provides secure communication between a web browser and server. [6 marks]
Answer:
Browser requests server identification
Server sends SSL certificate containing its public key
Browser verifies certificate against trusted Certificate Authorities (CAs)
If trusted, browser creates a symmetric session key
Session key encrypted with server's public key and sent to server
Server decrypts session key with its private key
All subsequent data encrypted with symmetric session key
5. Describe how a digital signature is created and verified. [6 marks]
Creation (Sender):
Sender applies hash function to message to create message digest
Digest encrypted with sender's private key
This encrypted digest is the digital signature
Message sent as plaintext along with digital signature
Verification (Receiver):
Receiver applies same hash function to received message
Decrypts signature with sender's public key to get original digest
If digests match, message is authentic and unaltered
6. Explain the purpose of a digital certificate and describe how it is obtained. [5 marks]
Purpose:
Proves online identity of website or individual
Confirms that a public key belongs to a specific person/organisation
Issued by trusted Certificate Authority (CA)
Obtaining Process:
Applicant generates key pair (public and private)
Sends public key and identity information to CA
CA verifies identity
CA creates certificate and signs with CA's private key
Certificate issued to applicant
12. Exam-Style Questions (Continued)
7. Describe the four main security concerns when data is transmitted over a network. [8 marks]
Answer:
Confidentiality: Only intended recipient can read or decrypt the data; achieved through encryption and public/private keys
Authenticity: Need to identify who sent data and verify source is legitimate; achieved through digital signatures
Integrity: Data reaches destination without any changes; achieved through digital signatures and message digests
Non-Repudiation: Neither sender nor recipient can deny being part of transmission; achieved through digital certificates
Each concern has specific technologies to address it
8. Explain the difference between a public key and a private key in asymmetric encryption. [4 marks]
Answer:
Public Key: Known to everyone; used to encrypt data or verify digital signatures
Private Key: Known only to owner; used to decrypt data or create digital signatures
Public key can be freely distributed via digital certificate
Private key must never be shared - compromise means all data vulnerable
Additional points:
Keys are mathematically linked but cannot derive one from the other
Both created at same time as a matching pair
9. A company wants to implement secure communication between its employees. Compare the use of symmetric and asymmetric encryption for this purpose. [6 marks]
Symmetric Encryption:
Fast and efficient for large amounts of data
But: Key distribution problem - how to share keys securely?
For n employees, need n(n-1)/2 unique keys for pairwise communication
Asymmetric Encryption:
Solves key distribution - each person only needs their own key pair
Only n key pairs needed for n employees
But: Slower for large data transfers
Recommendation:
Use asymmetric to exchange symmetric session keys
Then use symmetric for actual data transfer (hybrid approach)
This is how SSL/TLS works in practice
10. Explain the role of a Certificate Authority (CA) in the SSL/TLS handshake process. [5 marks]
Answer:
CA acts as a trusted third party between browser and server
CA verifies identity of website/organisation before issuing certificate
CA digitally signs the certificate with its private key
Browser has built-in list of trusted CAs and their public keys
Browser uses CA's public key to verify the certificate's authenticity
If certificate not from trusted CA, browser warns user or blocks connection
Additional points:
CAs maintain Certificate Revocation Lists (CRLs) for revoked certificates
Examples of CAs: DigiCert, Let's Encrypt, Comodo, GlobalSign
11. Describe the contents of a digital certificate. [6 marks]
Answer:
Version number of the certificate
Serial number - unique identifier for the certificate
Issuer name - the CA that issued the certificate
Subject name - identity of certificate owner
Public key of the subject
Validity period - start and expiry dates
Additional points:
Hash algorithm used for the certificate
CA's digital signature
Certificate extensions and constraints
12. Explain why quantum cryptography is considered more secure than classical encryption methods. [4 marks]
Answer:
Based on laws of physics rather than mathematical complexity
Any attempt to intercept photons destroys them - eavesdropping is immediately detected
Not vulnerable to advances in computing (including quantum computers)
Provides perfect forward secrecy - keys used once then discarded
Additional points:
Classical encryption could be broken by future quantum computers
QKD guarantees detection of any interception attempt
13. Glossary
Asymmetric Encryption:Encryption method using two different keys (public and private) for encryption and decryption.
Certificate Authority (CA):A trusted third party that issues digital certificates and verifies identities.
Cipher Text:Encrypted data that has been transformed from plaintext; unreadable without decryption.
Confidentiality:Ensuring only the intended recipient can read or decrypt data.
Decryption:The process of converting ciphertext back to plaintext using a key.
Digital Certificate:An electronic document that proves the identity of a person or organisation and contains a public key.
Digital Signature:A cryptographic value created by encrypting a message digest with the sender's private key; proves authenticity and integrity.
Encryption:The process of converting plaintext to ciphertext using an algorithm and key.
Hash Function:A one-way algorithm that produces a fixed-length output (hash) from any input; cannot be reversed.
Integrity:Ensuring data reaches its destination without any changes or tampering.
Key Distribution Problem:The challenge of securely sharing a secret key in symmetric encryption.
Message Digest:The output of a hash function applied to a message; a fixed-length summary of the original message.
Non-Repudiation:Neither sender nor recipient can deny being part of a data transmission.
Plaintext:Original, unencrypted data that humans can understand.
Private Key:A secret key known only to its owner; used to decrypt data or create digital signatures.
Public Key:A key that is freely distributed; used to encrypt data or verify digital signatures.
Quantum Cryptography:Encryption method using quantum mechanics principles, particularly photons, to secure key exchange.
Quantum Key Distribution (QKD):A method of securely distributing encryption keys using quantum particles.
SSL (Secure Sockets Layer):A security protocol for encrypting data transmitted over the internet.
Symmetric Encryption:Encryption method using the same key for both encryption and decryption.
TLS (Transport Layer Security):The modern, more secure successor to SSL for encrypting internet communications.
14. Exam Success Tips (Part 1)
💡 Remember CAIN
C - Confidentiality (only intended recipient can read)
A - Authenticity (verify sender's identity)
I - Integrity (data unchanged during transmission)
N - Non-repudiation (cannot deny sending/receiving)
💡 Symmetric vs Asymmetric - Key Differences
Symmetric = Same Key - fast but key distribution problem
Asymmetric = Two Keys - slower but solves key distribution
Symmetric best for: large files, databases, backups
Asymmetric best for: passwords, bank details, small confidential data
Real-world uses BOTH - asymmetric to exchange symmetric session key
💡 Public vs Private Key Roles
Public Key: Encrypt data OR Verify digital signature
Private Key: Decrypt data OR Create digital signature
Remember: Public = "Public Lock" (anyone can lock/encrypt)
Private = "Private Key" (only owner can unlock/decrypt)
💡 Digital Signature Process
Creation: Message → Hash → Message Digest → Encrypt with PRIVATE key → Digital Signature
Verification: Decrypt signature with PUBLIC key → Compare digests
If digests match = Authentic + Unchanged
Signature unique to each message (different digest each time)
💡 SSL/TLS Handshake Summary
1. Browser requests identification
2. Server sends certificate + public key
3. Browser verifies certificate with CA
4. Browser creates symmetric session key
5. Encrypts session key with server's public key
6. Server decrypts with private key
7. Secure channel established with symmetric encryption
14. Exam Success Tips (Part 2)
🧠 Memory Tricks
Certificate = ID Card - proves identity, stays the same
Signature = Signature - unique to each document/message
SSL → TLS - TLS is the newer version
HTTPS = Secure - look for padlock and "https://"
Quantum = Photons - uses light particles, interception destroys them
❌ Common Mistakes to Avoid
Don't confuse symmetric (one key) with asymmetric (two keys)
Don't say quantum cryptography encrypts the message - it secures the KEY
Don't forget: TLS has replaced SSL (but people still say "SSL certificate")
Don't mix up which key encrypts and which decrypts
Don't forget digital certificates are issued by Certificate Authorities