Open to everyone Reading, lesson 45 of 100, 2 min read
Why cryptography matters
Mathematics that keeps secrets
Cryptography turns readable information (plaintext) into unreadable data (ciphertext) that only someone with the right key can turn back. It also proves that data has not been changed and shows who created it.
Cryptography supports every goal from module 1:
| Goal | Cryptographic tool |
|---|---|
| Confidentiality | Encryption |
| Integrity | Hashes and message authentication codes |
| Authenticity | Digital signatures and certificates |
| Non-repudiation | Digital signatures |
Keys are everything
Modern encryption methods (algorithms) are public. Anyone can read how AES or RSA works. Their security comes entirely from keeping the key secret. This idea, that a system should be secure even if everything except the key is known, is called Kerckhoffs's principle.
It means:
- never invent your own encryption method;
- use well-reviewed, standard algorithms and libraries;
- spend your effort protecting keys.
Data in three states
| State | Example | Protection |
|---|---|---|
| At rest | Files on a laptop, a database on a server | Disk and database encryption |
| In transit | A web page travelling over Wi-Fi | TLS (HTTPS), SSH, VPN |
| In use | Data in memory while a program works with it | Harder; mainly access control and trusted hardware |
What cryptography does not do
Encryption does not stop someone who has the key, or who can sign in as you. It does not fix a weak password: if a vault is "encrypted with 123456", it falls quickly. And it does not help if malware is reading your screen. Cryptography is a strong layer, not the whole defence.
Note
You will not need advanced mathematics in this module. The aim is to know what each tool is for and how it fails.