What is Cryptography?

Cryptography is the science of hiding information in plain sight. It's been used for thousands of years — from Caesar's ciphers to World War II's Enigma machine — and today it's the invisible backbone of every secure digital communication on earth.

What is Cryptography?

Cryptography is the practice of securing information by transforming it into an unreadable form that can only be converted back by someone who knows the secret.

The core vocabulary:

  • Plaintext: The original, readable message ("Hello!")
  • Ciphertext: The scrambled, unreadable output ("Khoor!")
  • Encryption: Converting plaintext → ciphertext
  • Decryption: Converting ciphertext → plaintext
  • Key: The secret value that controls how encryption/decryption works
  • Cipher: The algorithm (the recipe) for encrypting and decrypting

The Simplest Cipher: Caesar's Shift

Julius Caesar encrypted military messages by shifting each letter 3 positions forward in the alphabet. "A" becomes "D", "B" becomes "E", and so on.

HELLO → KHOOR (shift by 3)

The key here is the number 3. Anyone who knows the key can decrypt: just shift each letter back by 3.

Encrypted: KHOOR

Notice: with only 25 possible keys, brute force is trivial. Real ciphers use keys with billions of possibilities.

Why Caesar's cipher is useless today: It has only 25 possible keys. An attacker can try all of them in under a second. Real ciphers like AES use keys with 2¹²⁸ or 2²⁵⁶ possible values — more than atoms in the observable universe.

Two Types of Modern Cryptography

Modern cryptography split into two fundamental approaches in the 1970s:

Symmetric Cryptography

The same key is used to encrypt and decrypt. Fast and efficient. Problem: how do you share the key securely in the first place?

Examples: AES, ChaCha20, 3DES

Used for: Encrypting stored files, bulk data transfer (after the key is established)

Asymmetric Cryptography

Two mathematically linked keys — a public key (share with everyone) and a private key (keep secret). What one key encrypts, only the other can decrypt.

Examples: RSA, ECC (Elliptic Curve), DSA

Used for: Key exchange, digital signatures, authentication

In practice, both types work together: Asymmetric cryptography establishes a shared secret (a key exchange), then symmetric cryptography uses that secret to encrypt the actual data. This is exactly what TLS does every time you visit HTTPS.

What Does Cryptography Actually Achieve?

Good cryptography provides more than just secrecy. It delivers four properties:

  • Confidentiality: Only the intended recipient can read the message.
  • Integrity: The message hasn't been altered in transit. (Hash functions and MACs)
  • Authentication: Confirming who sent the message. (Digital signatures)
  • Non-repudiation: The sender can't later deny having sent it. (Digital signatures again)

Why Quantum Computing Changes Everything

The security of asymmetric cryptography (RSA, ECC) rests on mathematical problems that are easy in one direction but nearly impossible to reverse:

  • Integer factoring: It's easy to multiply two large prime numbers (e.g., 17 × 23 = 391). It's very hard to go backwards — to find the primes given only 391. RSA security is built on this.
  • Discrete logarithm: The math behind ECC and Diffie-Hellman key exchange.

A quantum computer running Shor's algorithm can solve both of these problems efficiently — breaking RSA and ECC entirely. This is the quantum threat we'll cover in Phase 3, and why the post-quantum algorithms in Phase 4 use different mathematical hard problems.

Frequently Asked Questions

Is "encryption" the same as "cryptography"?

Not exactly. Cryptography is the broad field — it includes encryption, decryption, hashing, digital signatures, key exchange, and more. Encryption specifically refers to converting plaintext into ciphertext. All encryption is cryptography, but cryptography includes much more than just encryption.

Can't modern computers just brute-force any encryption?

Not with current algorithms, properly keyed. AES-256 has 2²⁵⁶ possible keys — roughly 1.16 × 10⁷⁷. If every atom in the observable universe were a supercomputer trying a billion keys per second since the Big Bang, they'd have barely started. The mathematics of large key spaces makes brute force computationally impossible.

What is "encryption at rest" vs "encryption in transit"?

Encryption in transit protects data while it's moving between systems (e.g., HTTPS/TLS). Encryption at rest protects data while it's stored (e.g., an encrypted hard drive or encrypted database column). Both are necessary — a thief who steals your hard drive shouldn't be able to read your files even without network access.

Frequently Asked Questions

What will I learn here?

This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.

How should I use this page?

Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.

What should I read next?

Use the navigation below to continue to the next lesson or explore related topics.