The Evolution of Cryptography
This talk provides a historical overview of cryptographic techniques, ranging from ancient substitution ciphers to modern digital encryption standards. It distinguishes between codes, which replace words or phrases, and ciphers, which manipulate individual characters or symbols. The presentation highlights the evolution of secure communication systems, including the Enigma machine, Vinson secure voice, and modern public-key infrastructure. The speaker emphasizes the importance of understanding these foundational concepts for professional security practitioners.
Why Your Understanding of "Encryption" is Probably Wrong
TLDR: Most security professionals conflate encoding and encryption, a mistake that leads to fundamental misunderstandings of data protection. This post breaks down the historical and technical distinctions between codes and ciphers, using examples from the Enigma machine to modern public-key infrastructure. Understanding these differences is critical for accurately assessing the security of any system you are testing.
Security professionals often use the terms "encoding" and "encryption" interchangeably. This is a mistake. If you are auditing a system and you see a developer claim their data is "encrypted" when they are actually just using a custom substitution scheme, you have found a critical vulnerability. The distinction between codes and ciphers is not just academic; it is the difference between a system that provides confidentiality and one that provides nothing more than a minor hurdle for an attacker.
The Fundamental Difference Between Codes and Ciphers
At the core of cryptanalysis, we distinguish between two primary methods of protecting information: codes and ciphers. A code operates at the level of words, phrases, or entire concepts. Historically, this was used to shorten messages for transmission or to provide a basic layer of secrecy. When you replace the word "attack" with the word "apple" in a pre-arranged codebook, you are using a code. The security of a code relies entirely on the secrecy of the codebook itself. If an attacker obtains the book, the system is compromised.
A cipher, by contrast, operates at the level of individual characters or symbols. It is a mechanical or mathematical process applied to the data stream. Whether you are looking at a simple Caesar cipher or a modern AES-256 implementation, the goal is to manipulate the data in a way that is computationally infeasible to reverse without the correct key.
The confusion often arises because both methods aim to obscure information. However, the mechanism of failure is different. A code fails when the mapping is discovered. A cipher fails when the key is recovered or the algorithm is found to have a mathematical weakness. When you are performing a penetration test, you need to identify which one you are dealing with. If you encounter a custom "encryption" routine that relies on a hardcoded substitution table, you are not looking at encryption. You are looking at a code, and it is likely trivial to reverse.
From Enigma to Modern Infrastructure
The evolution of these techniques shows a clear trajectory toward increasing complexity. The German Enigma machine was a massive leap forward because it automated the substitution process, changing the cipher alphabet with every keystroke. This made frequency analysis significantly harder, though not impossible, as the Polish and British cryptanalysts famously demonstrated.
Modern systems have moved beyond mechanical rotors to Public Key Infrastructure (PKI). Unlike symmetric encryption, where the same key is used for both encryption and decryption, asymmetric encryption uses a key pair. You encrypt data with a public key, and only the corresponding private key can decrypt it. This solves the massive logistical problem of key distribution that plagued earlier systems like the Vinson secure voice system.
When you are testing a web application, you are almost certainly interacting with TLS, which relies on these asymmetric principles to establish a secure channel. If you see an application that attempts to "roll its own" crypto by implementing a custom substitution cipher, flag it immediately. It is a classic example of security through obscurity, and it will never stand up to a motivated attacker.
Practical Implications for Pentesters
During an engagement, you will often encounter data that looks like ciphertext. Your first step should always be to determine if it is actually encrypted or just encoded. If you see a string of characters that changes in a predictable way when you modify the input, you are likely dealing with a simple substitution cipher or a weak encoding scheme.
Consider a scenario where you are testing an API that uses a custom token format. If you can identify a pattern in the token that correlates to specific user attributes, you are looking at a code, not encryption. You can often break these systems by collecting enough samples to perform a frequency analysis, just as cryptanalysts did for centuries.
If you are dealing with actual encryption, look for common implementation flaws. Are they using a secure mode of operation? For block ciphers, OWASP documentation provides excellent guidance on why you should avoid modes like ECB, which leaks patterns in the plaintext. If the implementation uses a weak key derivation function or fails to use a unique initialization vector (IV) for every encryption operation, the system is vulnerable regardless of how strong the underlying algorithm is.
Defensive Considerations
Defenders must prioritize the use of established, peer-reviewed cryptographic libraries. Never attempt to design a custom cipher. The history of cryptography is a graveyard of "unbreakable" systems designed by people who thought they were smarter than the cryptanalysts of their time.
Implementations should follow industry standards for key management and rotation. If your keys are stored in the same repository as your code, or if they are hardcoded in your configuration files, you have already lost. Use a dedicated Hardware Security Module (HSM) or a cloud-based key management service to ensure that your keys are protected and that access is strictly controlled.
Security is not about finding the most complex way to hide data. It is about using proven, standard algorithms and managing your keys with the same rigor you apply to your production infrastructure. If you find yourself explaining to a client why their custom "encryption" is a liability, point them toward the history of cryptanalysis. The lessons learned from the Enigma and the Navajo Code Talkers remain as relevant today as they were eighty years ago. Question the implementation, verify the math, and never assume that "obscure" means "secure."
Target Technologies
All Tags
Up Next From This Conference

Breaking Secure Web Gateways for Fun and Profit

Listen to the Whispers: Web Timing Attacks That Actually Work

Abusing Windows Hello Without a Severed Hand
Similar Talks

Inside the FBI's Secret Encrypted Phone Company 'Anom'

Exploiting Shadow Data in AI Models and Embeddings

