Defining Cryptography
Cryptography is the science and art of securing communication in the presence of adversaries. The word itself comes from the Greek kryptos (hidden) and graphein (to write). At its heart, cryptography answers one question: how can two parties communicate privately, even when others can see their messages?
Today, cryptography is invisible infrastructure. It secures your online banking, protects your WhatsApp messages, and authenticates every website you visit. But it all rests on a set of foundational concepts that haven't changed much since the field's earliest days.
The Core Vocabulary
Before diving deeper, it helps to have these terms locked in:
- Plaintext: The original, readable message before encryption.
- Ciphertext: The scrambled, unreadable output after encryption.
- Encryption: The process of converting plaintext into ciphertext.
- Decryption: The reverse — turning ciphertext back into plaintext.
- Key: A piece of information (a number, string, or file) that controls how encryption and decryption work.
- Algorithm (Cipher): The mathematical procedure used to encrypt or decrypt data.
Symmetric vs. Asymmetric Cryptography
This is one of the most important distinctions in modern cryptography.
Symmetric Cryptography
In symmetric cryptography, the same key is used to both encrypt and decrypt a message. It's fast and efficient, but has a key distribution problem: how do you securely share the key with your intended recipient in the first place? Examples include AES and the classic Caesar cipher.
Asymmetric Cryptography
Asymmetric cryptography (also called public-key cryptography) uses a pair of mathematically linked keys: a public key (which anyone can see) and a private key (which only you hold). Messages encrypted with your public key can only be decrypted with your private key. This elegantly solves the key distribution problem. RSA is the most famous example.
The Three Goals of Cryptography
Good cryptographic systems are designed to achieve three fundamental properties:
- Confidentiality: Only intended recipients can read the message.
- Integrity: The message has not been altered in transit.
- Authentication: You can verify that the message came from who it claims to be from.
A fourth property, non-repudiation, means that a sender cannot later deny having sent a message — critical in legal and financial contexts.
Hashing: Cryptography's One-Way Street
A cryptographic hash function takes any input and produces a fixed-length string of characters (the hash or digest). Unlike encryption, hashing is a one-way process — you cannot reverse a hash to get the original input. This makes hashing ideal for storing passwords. Rather than saving your actual password, a website stores a hash of it. When you log in, it hashes what you type and compares the results.
Common hash functions include SHA-256 and SHA-3. MD5 and SHA-1 are older and now considered broken for security purposes.
Kerckhoffs's Principle
A cornerstone of modern cryptographic thinking is Kerckhoffs's Principle, articulated in 1883: a cryptographic system should be secure even if everything about the system — except the key — is public knowledge. Good cryptography doesn't rely on secrecy of the algorithm itself. This is why AES is openly published and studied — security comes from the key, not the obscurity of the method.
Where to Go From Here
With these foundations in place, you're ready to explore specific ciphers, understand how protocols like TLS work, or dive into the history of cryptographic breakthroughs. The language of secrets is vast — but every expert started right where you are now.