Part 1: Foundations of Cryptography
Part 2: Classical Ciphers
Part 3: Mechanized Cryptography
Part 4: Theoretical Breakthroughs
Part 5: Modern Symmetric Cryptography
Part 6: Principles of Good Cryptosystems
Part 7: Introduction to Cryptanalysis
Cryptography is the art of communicating securely in the presence of adversaries. From ancient codes to modern computer algorithms, the central purpose of cryptography has always been the same: to protect information from those who should not have it.
Goals of Cryptography
The goals of cryptography can be summarized into four categories:
-
First is confidentiality: keeping the contents of a message hidden from anyone who is not authorized to read it. When you encrypt an email, the point is that an eavesdropper on the network sees only unreadable ciphertext.
-
Second is authentication: verifying the origin of a message or the identity of the sender. When a server proves to you that it really is your bank’s website, it is using cryptography for authentication.
-
Third is integrity: ensuring that a message has not been modified in transit. Digital signatures and cryptographic checksums allow us to detect even a one-bit change.
-
Finally, there is non-repudiation: preventing someone from denying that they sent a message. If you digitally sign a contract, you cannot later claim that you never agreed to it, because the signature uniquely ties you to that document.
These four properties are the foundation on which secure systems are built. Some applications require all four, while others may emphasize one or two. But together they define what cryptography enables.
In this lecture, we will focus mostly on confidentiality. The other goals (authentication, integrity, and non-repudiation) depend on additional cryptographic tools and protocols that we'll explore in future lectures once we have the building blocks in place.
It is important to understand that cryptography is not a magic bullet. Adding encryption to a system does not guarantee security. Weak passwords, poor software design, or bad key management can undermine even the strongest algorithms. Cryptography provides tools, not complete solutions.
Cryptography, Cryptanalysis, and Cryptology
To understand how we achieve confidentiality, we first need to map out the landscape. The field has three main branches, and their names sometimes get mixed up:
-
Cryptography is the practice of designing systems for secure communication. The word comes from the Greek κρυπτός (kryptós, "hidden") and γραφή (graphḗ, "writing"), literally "hidden writing."
-
Cryptanalysis is the art of breaking those systems, recovering information without knowing the key. It derives from κρυπτός (kryptós, "hidden") and ἀνάλυσις (análusis, "solution").
-
The broader field, cryptology, encompasses both. Its roots are κρυπτός (kryptós, "hidden") and λογία (logía, "study").
It's tempting to think of cryptography as the "good guys" and cryptanalysis as the "bad guys." This view is incorrect. Cryptanalysis is essential to the science. A cipher that hasn't been attacked can't be trusted. The strength of modern cryptography comes from algorithms being tested relentlessly by cryptanalysts before anyone relies on them. Cryptanalysts serve as quality assurance for cryptographers.
Core Terms
Let's establish some terminology that we'll be using. The plaintext is your original, readable message. When you run it through an encryption process, the result is ciphertext, scrambled data that looks like random noise to anyone without the key. Decryption reverses the process, turning ciphertext back into readable plaintext.
The algorithm that defines these transformation steps is called a cipher. The cipher itself is not secret; it defines the steps for transforming data. What makes each use of the cipher unique is the key, a secret value that controls exactly how the cipher transforms your data. The same cipher with different keys produces completely different ciphertext, even for identical plaintext.
When we talk about a cryptosystem, we mean the whole package: the cipher, the key management, and all the procedures for encryption, decryption, and key distribution.
In symmetric encryption, our current focus, the same key is used both to encrypt and to decrypt. Later in the course, we'll explore asymmetric systems where encryption and decryption use different keys.
Kerckhoffs's Principle: The Foundation of Modern Cryptography
Now we can introduce the most important principle in cryptography. In 1883, a Dutch military cryptographer named Auguste Kerckhoffs published a paper called La Cryptographie Militaire. He argued that the security of a cryptosystem must not depend on keeping the algorithm secret. Instead, it must remain secure even if the adversary knows everything about how the system works. The only thing that must remain secret is the key.
This idea is known as Kerckhoffs's Principle. It may sound obvious today, but it was revolutionary at the time. Until then, many assumed that secrecy of the method was essential: if the enemy doesn't know how your cipher works, how can they break it? Kerckhoffs recognized a practical truth: algorithms inevitably leak. People reverse-engineer them, employees share details, or systems get captured. Once your method becomes known, a system that relies on secrecy is permanently broken. Keys, however, can be changed easily.
Claude Shannon, the father of modern information theory, later put it even more bluntly: "One ought to design systems under the assumption that the enemy will immediately gain full familiarity with them." The principle is a reminder that secrecy of design is fragile; only the key should be the secret.
It is also worth noting the historical context: for most of history, and certainly up until the widespread adoption of computers, cryptography was primarily a military and diplomatic tool. Armies, governments, and spies depended on it to protect messages in war and statecraft. Civilian use was limited. The title of Kerckhoffs’s book reflects that.
Why Open Algorithms Work: The Lock Analogy
A pin tumbler lock illustrates why Kerckhoffs's Principle works in practice.

Inside the lock are several pins, each split into two pieces. These pins block the cylinder from turning. When you insert the correct key, each pin gets lifted to exactly the right height so that the split aligns with the edge of the cylinder. Only then can the cylinder rotate and the lock open.
The security doesn't come from hiding the lock's mechanism. Lock designs are widely published. Locksmiths study them, security researchers analyze them, and anyone can understand how they work. The secret is entirely in the shape of the key. Without the right key shape, it doesn't matter how well you understand the mechanism—the lock stays closed.
Cryptography works exactly the same way. The algorithm is the lock mechanism; it can be public, standardized, and thoroughly analyzed. The key is what determines how the algorithm transforms your plaintext into ciphertext. As long as the key stays secret, the system remains secure regardless of how well your adversary understands the algorithm.
This approach also underscores why open designs are safer and an important role of cryptanalysis.
Just as locksmiths and security experts study locks to expose their flaws, cryptographers analyze published algorithms to identify flaws. By publishing ciphers, we allow weaknesses to be found and fixed, and we can make informed choices about algorithms and their strength. This is preferable to hoping that flaws will remain undiscovered.
The wisdom of openness was recognized long before computers existed. In 1853, lock experts A.C. Hobbs and George Dodd wrote something that applies perfectly to modern cryptography:
"If a lock — let it have been made in whatever country, or by whatever maker — is not so inviolable as it has hitherto been deemed to be, surely it is to the interest of honest persons to know this fact, because the dishonest are tolerably certain to be the first to apply the knowledge practically; and the spread of the knowledge is necessary to give fair play to those who might suffer by ignorance."1
Their point translates directly: algorithms should be public, security should depend on keys, and honest people benefit more from openness than criminals do.
When Secrecy Fails: A History of Broken Systems
History is full of failures that ignored Kerckhoffs’s principle. Time and again, systems that depended on algorithmic secrecy crumbled once their methods became known:
-
GSM mobile networks used algorithms called A5/1 and A5/2, both supposedly protected by secrecy. Once researchers reverse-engineered them, both were found to have serious weaknesses.
-
WEP, the first widely deployed Wi-Fi encryption system, used the RC4 stream cipher but implemented it poorly. When researchers studied it, they discovered that WEP could be broken in minutes.
-
DVD encryption used the Content Scrambling System (CSS), which was cracked shortly after someone figured out how it worked.
-
Blu-ray discs used a more complex system called AACS, but that too was broken once its secrets leaked.
-
HDCP was meant to protect high-definition video, but was defeated as well.
-
The Enigma machine from World War II depended on the Germans believing their system was unbreakable. Once the Allies understood its mechanical operation and exploited its design flaws, German communications became an open book.
-
Cold War ciphers from both NATO and Warsaw Pact countries were considered "unbreakable," but declassified documents show that many of these systems fell once their designs became known.
The pattern is consistent across these examples: systems that depend on algorithmic secrecy fail once their methods become known.
Schneier's Law: Why Peer Review2 Matters
Modern cryptographer Bruce Schneier captured the fundamental problem with a memorable observation:
"Anyone, from the most clueless amateur to the best cryptographer, can create an algorithm that he himself can't break. It's not even hard."
This insight, known as Schneier's Law, captures why openness matters in cryptographic design. When you design a cipher, it always looks strong to you.
Only when your algorithm faces independent scrutiny can you discover its true strength. This is why every modern cryptographic algorithm goes through years of public analysis. Researchers around the world try to break it using every technique they can think of. The algorithms we trust today have survived this gauntlet, not because they were hidden, but because they were tested.
This peer review process isn't just helpful, it's the only way to build confidence in cryptographic systems. The secrecy that appears protective actually undermines security. True strength comes from withstanding public scrutiny, not from avoiding it.
These principles provide the foundation for understanding symmetric encryption and how it works in practice.
Next: Part 2: Classical Ciphers
References
-
Fred Cohen, 2.1 - A Short History of Cryptography, 1995.
-
Alberti Cipher Disk, Wikipedia.
-
Daniel Rodriguez-Clark, Caesar Shift Cipher, Crypto Corner, 2019. - **includes interactive examples **
-
Simon Singh, Cracking the Vigenère Cipher, The Black Chamber, 2000. Daniel Rodriguez-Clark, Vigenère Cipher, Crypto Corner, 2019. - **includes interactive examples **
-
Wikipedia, One-time Pad
-
Data Encryption Standard, Wikipedia.
-
Sanchita Mal-Sarkar and Chansu Yu, Data Encryption Standard, Hands-on Experience on Computer System Security.
-
Advanced Encryption Standard process, Wikipedia.
-
Josh Lake, What is AES Encryption and how does it work?, Comparitech, 2020.
-
Glenn F. Stahly, Fifty Years of Mathematical Cryptanalysis (1937 -- 1987), NSA (declassified 4/29/2025).
Next: Part 2: Classical Ciphers
-
A.C. Hobbs and George Dodd, Rudimentary Treatise on the Construction of Locks, ed. Charles Tomlinson (London: John Weale, 1853). ↩
-
By peer review, I don't mean "three of your friends," but rather multiple teams of cryptographers, number theoreticians, and computer scientists analyzing the algorithms and protocols extensively. ↩