Encryption has advanced more in the past few years, and more businesses and household computer software are using cryptography for protection. There are a variety of universal techniques and traits that can be found through cryptanalysis.
While solving a cipher can take weeks, months, or even years, there are certain ways to reduce the time required. Many cryptanalysts know these tricks of the trade by heart.
It’s also important to be familiar with the language that the native text is written in. If you can’t solve a coded message because it’s written in Russian and you only speak English, then it’s probably impossible to use cryptanalysis to discover the original text.
However, through cryptanalysis, many cryptographic ciphers can be analyzed and broken down. The easiest ones to break are those that have been around for a long time.
This cryptanalysis guide goes through some of the methods and techniques to figure out ciphers and decrypt code. However, most of these methods will not work for modern cryptographic algorithms used in most cybersecurity platforms today. We show you why below.
Different Methods for Cryptanalysis
Complicated ciphers require a combination of experimentation, lucky hunches, and experience. The most difficult ciphers are short yet long blocks of characters. When cryptography incorporates word breaks or spaces between each word, it makes deciphering simpler.
Cryptanalysts typically look for groups of repeated characters and analyze the placement of these ciphers as they fall within the context of words, leading to guesses as to what they might mean.
There are typically three types of ciphers:
- Classical: These are notable for being around before computers and were typically used up until the 1950s. Some of these include Atbash Cipher, ROT13 Cipher, Bifid Cipher, Trifid Cipher, Base65 Cipher, and Autokey Cipher.
- Mechanical: These were used in World War II and rely on gearing mechanics to encipher the original text. These include Enigma Cipher and Lorenz Cipher.
- Modern: These are the hardest ciphers to break, as they use the latest technology, such as block ciphers, public-key cryptosystems, and other algorithmic ciphers. However, there are weakened versions that can help you learn more about how they behave and look for similarities.
Specific Cipher Cryptanalysis Breakdown
Many ciphers have already been broken, and there are multiple examples of how to break them. Most of the modern techniques rely on automated techniques using a computer, so these are much different than classical methods which were done by hand.
Some of the most notable ciphers broken with these modern methods include Affine Cipher, AutoKey cipher, Foursquare Cipher, Vigenere Cipher, Playfair cipher, Hill Cipher, Simple Substitution, and Bifid cipher.
There are a number of “candidate keys” that can be used to luck out and isolate a piece of code that provides a readable result. Text characterization automatically looks at different pieces of text to see how natural it might be to the flow of the English language. This method helps cryptanalysts, but it’s also used in cracking security software.
These methods include:
- Quadgram statistics as a fitness measure
- Unicity distance
- Word statistics as a fitness measure
- Index of coincidence
- Identifying unknown ciphers
- Monogram, bigram, and trigram frequency counting
- Chi-squared statistics
Breaking Machine Ciphers
In other cases, cryptanalysis must look at more advanced ciphers, such as M-209 or Enigma, which are known from their usage in World War II. These are more complicated than most and rely on techniques like the index of coincidence, hill climbing, and quadgram statistics.
Recently, a man claimed to have solved the pigeon code from World War II after finding an old message attached to a buried pigeon’s leg.
Letter Frequencies for Different Languages
Cryptanalysts also use ngram models to understand different languages and how they flow. These include:
- Danish letter frequencies
- Finnish letter frequencies
- French letter frequencies
- German letter frequencies
- Icelandic letter frequenties
- Russian letter frequencies
- Swedish letter frequencies
- English letter frequencies
Most languages have already been included in frequency libraries under cryptography.
There are some methods to breaking common modern ciphers using LFSRs and the Berlekamp-Massey Algorithm. Basically LFSR or Linear Feedback Shift Registers, use a semi-random number generators to stream ciphers. They can be used as a predictor in cryptography.
Why Cryptanalysis Matters
Cryptanalysis – This is the analysis of cryptographic techniques to shorten the time required to solve a cipher. It is a combination of experimentation, luck, and experience that makes this process possible.
How to Prevent Brute Force Attacks
Preventing Brute Force Attacks – These are methods that can be used to reduce the effectiveness of brute force attacks. While it is not possible to completely prevent an attack, captchas and login timeouts provide quite a bit of protection.
Guidance for Security by Obscurity
Security by Obscurity – Obscurity refers to keeping something secret or hidden. This is an early security principal that specified that keeping your security measures secret is the best way to keep your system safe. This principle has long since been rejected.
Why is 2^256 Encryption So Secure?
2^256 Encryption – This is a 78-digit number which is used in encryption techniques. It’s main benefit is the fact that it is exponentially larger than any number the human mind can comprehend, making a brute force attack almost impossible.
Other Known Cryptanalysis Attack Types
Since cryptanalysis uses mathematical formulas to search for vulnerabilities, it can be difficult to spot a savvy hacker who can breakdown your system’s cryptography.
Here are some of the ways that cybercriminals use cryptanalysis:
Known-Plaintext Analysis (KPA)
This is where the attacker decrypts ciphertexts with a known partial plaintext.
Chosen-Plaintext Analysis (CPA)
The cryptanalyst uses a ciphertext that matches a piece of plaintext arbitrarily selected yet it matches the same algorithm method.
Ciphertext-Only Analysis (COA)
The attacker will use known ciphertext collections to break down your cryptography piece by piece.
Man-in-the-Middle Attack (MITM)
This is when two parties use a key sharing or message sharing platform for communication via a channel that seems secure in your system, but it’s actually been corrupted. The attacker may use this attack to listen in on messages that pass through this channel. You can use hash functions to prevent these types of MITM attacks.
Adaptive Chosen-Plaintext Attack (ACPA)
Like a CPA, this method uses a piece of plaintext and ciphertext that was found via previous encryption data.
How to Stop Cryptanalysts
The most important thing to remember is that cryptanalysis relies on previously used algorithms and known ciphers. Since many of these methods are already known, the latest and proven algorithms and implementations should be used to protect your system.
Some ways to do this include:
- Choosing an initialization vector with more random numbers
- Generating keys using the best sources for more random numbers and avoiding weak, well-known keys
- Using trusted protocols and implementations
- Picking the best cryptographic algorithm for your industry, system, or usage context