DML School of Technology
Menu

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:

GoalCryptographic tool
ConfidentialityEncryption
IntegrityHashes and message authentication codes
AuthenticityDigital signatures and certificates
Non-repudiationDigital 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

StateExampleProtection
At restFiles on a laptop, a database on a serverDisk and database encryption
In transitA web page travelling over Wi-FiTLS (HTTPS), SSH, VPN
In useData in memory while a program works with itHarder; 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.