asymmetric encryption
A deep dive into the world of public/private key cryptography

Suppose Alice wants to send a top-secret message to Bob across a crowded, untrusted network where Eve is listening to every single packet.
With symmetric encryption, Alice and Bob use the exact same key to lock and unlock the message. Brilliant - except how does Alice get that key to Bob in the first place? If she emails it, Eve steals it. If she whispers it over Wi-Fi, Eve records it. This is the classic key distribution problem.
Mathematically Linked Key Pairs
Asymmetric encryption (also known as public-key cryptography) solves this with a brilliantly counter-intuitive twist: instead of one shared key, every participant generates a mathematically linked pair of keys:
A Public Key: Shout this from the rooftops. Publish it on the.computing.cafe, print it on a mug, or hand it to strangers. Anyone can use it to encrypt data intended for you.
A Private Key: Guard this like the nuclear launch codes. It never leaves your device and is the only key capable of decrypting data encrypted with your matching public key.
One-Way Trapdoor Functions
Under the bonnet, asymmetric algorithms such as RSA rely on one-way mathematical functions (trapdoor functions) - calculations that are effortless to compute in one direction yet computationally infeasible to reverse without secret knowledge. For example, multiplying two colossal prime numbers together takes a fraction of a millisecond, whereas factorising the resulting product back into its original primes to derive the private key would take a conventional computer longer than the age of the universe.
Think of Bob's public key as an open padlock that anyone can snap shut around their data, and Bob's private key as the only metal key in existence that can unlock it. Alice grabs a copy of Bob's open padlock, puts her secret message inside a box, and clicks the padlock shut. The moment it clicks, not even Alice can open it again. Eve can intercept the locked box, stare at it, and shake it - no luck. Only Bob's private key can unlock what his public key locked.
WHAT?
A cryptographic system that uses two mathematically linked keys - a public key for encryption and a private key for decryption - rather than a single shared secret.
WHY?
Solves the key distribution problem by allowing strangers to exchange confidential messages over untrusted networks without ever transmitting a secret key.
HOW?
Relies on one-way trapdoor functions (such as prime factorisation in RSA) so that data encrypted with a recipient's public key can only be decrypted by their matching private key.
The Deep Dive
Comprehension Check
1
Key Pairs in Asymmetric Encryption
a) State how many keys each participant generates in an asymmetric encryption system.
b) State who is allowed to access the public key.
c) State who must keep the private key secret.
2
The Key Distribution Problem
a) Describe how symmetric encryption locks and unlocks data.
b) Explain why sharing a symmetric key over an untrusted network is risky when an eavesdropper like Eve is monitoring traffic.
c) Explain how asymmetric encryption avoids the need to transmit a secret key beforehand.
3
One-Way Encryption and Decryption
a) Identify which key Alice uses to encrypt a confidential message intended for Bob.
b) Explain why Alice cannot decrypt that message herself once she has encrypted it.
c) Identify which key Bob uses to recover the original plaintext message.
4
Confidential Key Exchange Scenario
A student browser connects to https://the.computing.cafe/ks5/networking.html and needs to establish a shared symmetric session key with the server over an untrusted network.
a) State which key the server at the.computing.cafe sends to the student browser first.
b) Describe what the browser does to protect the newly generated symmetric session key before sending it across the network.
c) Explain why an eavesdropper intercepting this transmission cannot read the session key, whereas the server can.
5
Mathematical Foundations and Hybrid Encryption
a) Define a one-way trapdoor function using prime multiplication and prime factorisation as an example.
b) Explain why deriving a private key from a public key is computationally infeasible on a conventional computer.
c) Evaluate why web connections use asymmetric encryption only to exchange a symmetric session key rather than encrypting every webpage directly with asymmetric keys.
Targeted AI Research
If you finish early, use an AI assistant to explore how asymmetric encryption handles key sizing, efficiency, and future quantum threats:
Initial Prompt: "Explain to a Key Stage 5 Computer Science student why asymmetric encryption algorithms like RSA require much larger key sizes (such as 2048-bit or 4096-bit) than symmetric algorithms like AES (such as 128-bit or 256-bit) to achieve an equivalent level of security."
Follow-up Question 1: "How does Elliptic Curve Cryptography (ECC) achieve the same security as RSA using significantly smaller key sizes?"
Follow-up Question 2: "How does Shor's algorithm on a quantum computer threaten RSA encryption, and what is post-quantum cryptography doing to protect confidential key exchange?"
Last modified: December 2nd, 2026
