SLIDE 1 / 11
CSZone.co.uk
OCR H446 · Component 1 · 1.3.1

Encryption

OCR A Level Computer Science · cszone.co.uk
H446 SpecA Level
Learning Objectives

By the end of this topic you will be able to:

Define encryption and explain its purpose
Distinguish between symmetric and asymmetric encryption
Describe how public-key cryptography works
Explain digital certificates, digital signatures and TLS/SSL
What is Encryption?

Encryption Fundamentals

Encryption transforms plaintext into ciphertext using an algorithm and a key, making it unreadable to anyone who does not possess the decryption key. The recipient uses a key to decrypt the ciphertext back to plaintext.
Key Terms
Plaintext: original, readable data
Ciphertext: encrypted, unreadable data
Key: data used to encrypt/decrypt
Cipher: the encryption algorithm
Why Encrypt?
Protects data in transit (online banking, HTTPS). Protects stored data (passwords, medical records). Ensures only the intended recipient can read the message.
Symmetric Encryption

Symmetric Encryption

Symmetric encryption uses the same key for both encryption and decryption. The key must be shared securely between the communicating parties before any encrypted communication can begin.
Fast: computationally efficient; suitable for encrypting large amounts of data (e.g. full disk encryption, streaming data).
Key distribution problem: how do you securely share the key in the first place? If the key is intercepted during transmission, an attacker can decrypt all subsequent messages.
Examples: AES (Advanced Encryption Standard) — the modern standard used in HTTPS, VPNs, and file encryption.
Asymmetric Encryption

Asymmetric (Public-Key) Encryption

Asymmetric encryption uses a mathematically linked key pair: a public key (shared openly) and a private key (kept secret). Data encrypted with one key can only be decrypted with the other.
Encryption: sender encrypts with recipient's public key. Only the recipient's private key can decrypt it. The private key never leaves the recipient.
Slower than symmetric due to complex mathematical operations (e.g. RSA uses large prime factorisation). Not suitable for encrypting large volumes of data directly.
Hybrid approach (TLS/HTTPS): asymmetric encryption is used to securely exchange a symmetric session key; then fast symmetric encryption is used for the actual data transfer.
Digital Signatures

Digital Signatures & Certificates

Digital signature: sender encrypts a hash of the message with their private key. The recipient decrypts the signature using the sender's public key and checks it matches a freshly computed hash. Proves authenticity and integrity.
Digital certificate: issued by a Certificate Authority (CA). Binds a public key to an identity (e.g. a website domain). The browser trusts the CA and can verify that the public key belongs to the claimed server.
TLS/SSL: protocol used to secure HTTPS connections. Uses asymmetric crypto to establish a session and exchange symmetric keys, then switches to symmetric for fast data transfer. Provides confidentiality, integrity and authentication.
Exam Practice
OCR H446 Style · 4 marks
Explain why HTTPS uses a hybrid of both asymmetric and symmetric encryption rather than using only one type.
[4 marks]
1
Asymmetric encryption solves the key distribution problem — the public key can be shared openly to establish a secure channel without needing a pre-shared secret.
1
However, asymmetric encryption is computationally slow and not suitable for encrypting large amounts of data efficiently.
1
Symmetric encryption is fast and efficient for bulk data, but requires a shared key — which cannot be safely exchanged without a secure channel.
1
The hybrid approach uses asymmetric encryption to securely exchange a symmetric session key; all subsequent data is then encrypted using the fast symmetric key.
Common Mistakes

Don’t Lose Marks

!
Saying the public key is used for both encryption and decryption — the public key encrypts (or verifies a signature); the private key decrypts (or creates a signature). They cannot substitute for each other.
!
Confusing digital signatures with encryption — a digital signature proves who sent the message and that it hasn’t been tampered with (authenticity + integrity). It does not necessarily make the message confidential.
!
Saying asymmetric encryption is more secure than symmetric — security depends on key length and algorithm strength, not the type. AES-256 symmetric is extremely secure. The key advantage of asymmetric is the key distribution, not inherently stronger security.
1.3.1b Complete
Well done! ✓
Encryption
Return to lesson to continue