Crypto 0 to hero - Episode 02 - Brief history of broken ciphers In...

@mattpiz
Matthieu Pizenberg@mattpiz
23 views Jun 26, 2024 ~3 min read
Advertisement
1
Crypto 0 to hero - Episode 02 - Brief history of broken ciphers

In cryptography, a cipher is an algorithm for encoding and decoding messages. Encoding is the process of transforming "plaintext" into "ciphertext" while decoding is the reverse operation. 1/n
Media image
2
Both the encryption and decryption are parameterized by keys. When the same key is used in both directions we call it a symmetric encryption, otherwise it’s an asymmetric encryption if a pair of keys is needed. 2/n
3
Probably the most well known cipher, still used for puzzles and such, is Caesar Cipher from 1st century BC. It consists in shifting letters by a fixed amount. So if we shift by 3 for example, "ABC...YZ" becomes "DEF...BC". Here is an encrypted message for you: "ldpkrvnb" 3/n
4
Nah just kidding!

Caesar Cipher, as well as other simple substitution ciphers, where each letter is replaced by another one, are easily broken by letter frequency analysis. Given a sufficient amount of ciphertext, the most common letter is "E". 4/n
5
Similarly, by analyzing digraphs (two-letter blocks) and trigraphs (three-letter blocks), one can easily retrieve the whole cipher key. These types of attacks are called ciphertext-only attacks as they need nothing else to decode the original plaintext message. 5/n
6
Vigenère Cipher (16th century) is another interesting one. The substitution is a shift determined by the letters in a repeated keyword. For example, let’s say our keyword is "ADA", and we want to encrypt the word "CARDANO". 6/n
7
We repeat "ADA" to have the same letter count as "CARDANO", and then shift by 1 all letters of the plaintext associated with an "A" and by 4 all letters associated with a "D". 7/n
Media image
8
However, given knowledge of the key size (3 here), we can extract all letters shifted by one character of the key, and perform the same kind of frequency analysis as for other simple substitution ciphers. And its possible to brute-force key sizes fairly easily. 8/n
9
Compressing first, to get higher entropy density, then encrypt would help against ciphertext-only attacks. However, this may not help against plaintext attacks where the attacker can use the encryption with known plaintext and get pairs of plaintext and ciphertext. 9/n
10
Another famously broken cipher is the Enigma machine used during World War II by the German army. In essence, it is a rotor machine with multiple successive rotors. 10/n
Media image
11
Each rotor performs a substitution, and every keypress triggers a rotor movement meaning substitutions are dynamically changing while composing a message. Eventually, the Allies found a way to break it, which significantly impacted the war outcomes. 11/n
12
The list of broken ciphers goes on, both for symmetric encryption and asymmetric encryption. For exemple, DES (Data Encryption Standard) is now vulnerable to brute-force attacks due to its small key size (56 bits). 12/n
13
RSA and DSA, both asymmetric algorithms, are also now considered insecure for versions with small key size and recommend at lest 2048 bits. 13/n
14
That’s all for today! I hope you liked it. Remember, do not make your own cipher, and see you in the next episode! 14/14
Actions
What You Can Do
  • Export as PDF or Markdown
  • Batch Export to Notion
  • Bookmark & Highlight
  • Screenshot Tweet
Create Free Account

Includes 7-day Premium trial

Advertisement