Cryptanalysis in Cryptography - How Decrypting the Encrypted Data?


Cryptography and Cryptanalysis are two sides of the same coin. Cryptography disguises plaintext into ciphertext to prevent it from being comprehended by unauthorized people. Cryptanalysis seeks the reverse, i.e., to decode encryptions.

Cryptanalysis is a fascinating area of study with great scope, which will be explored in this article. 

What is Cryptanalysis?

Cryptanalysis is the process by which an encrypted code is decrypted without knowing/partially knowing the key, the original plaintext source, or the algorithm used. It is a scientific technique and a practiced art all in one. 

The method tries to retrieve the readable plaintext block from the encrypted, unreadable format. Cryptanalysis also studies mathematical variations in algorithms and codes.

Function and Working of Cryptanalysis

At first glance, cryptanalysis seems like the tool criminals would use to decrypt text they aren't allowed access to. But it is also a professional undertaking to test vulnerabilities in the code, algorithms, and encryption keys used to make them stronger.

Businesses and governments hire cryptanalysts to see how fast or easily they can break encrypted text. This way, they can fix the gaps in whichever component is the weakest link and fortify their security systems.

Cryptanalysts work with incomplete information; mathematical assessments are conducted with partial bits of intercepted text or by extrapolating knowledge from similar formats of plain/ciphertext blocks or algorithms that may have been used in other cases. Available data is used to conceptualize and decode hidden messages and patterns. Experience with several encryption techniques and decryption assignments works to an analyst's advantage as the options you can try increase. Cryptanalysts work on 3 types of encryptions – symmetric key, asymmetric key, and Hash functions.

Types of Cryptanalysis Attacks

Cryptanalysts try to understand and counter-attack by understanding how they function and fixing the defects.

Cryptanalysis is done using two primary mechanisms: Linear and Differential.

  • Linear Cryptanalysis is used predominantly for block ciphers. Attempts are made to find the closest approximation to the cipher key by processing single bits one by one, which yields the linear relationship between input text, pieces of the key, and cipher text. One encryption cycle is run, in which all possible subkeys are tried, and the intermediate ciphertext is analyzed.

  • Differential Cryptanalysis can be used on the block, stream, and hash ciphers/functions. In this method, differences in input attributes and transformations in the intermediate output are correlated by retaining a non-random key. The plaintext can be deciphered by comparing multiple encrypted cycles of intermediate text and the differences therein.

Using either of these two mechanisms, the main types of cryptanalytical attacks are as follows −

  • Known-Plaintext Attack (KPA) − This is a basic attack format in which the attacker has possession of the ciphertext and some/all of the corresponding plaintext. Or, they may have access to some combination of matched ciphertext-plaintext, which are employed to deduce the encryption key. All encrypted messages using the same key can be decrypted with the key. This kind of attack works best on elementary substitution ciphers, not on sophisticated encryptions.

  • Chosen Plain-Text Attack − The attacker can access the encrypting device or algorithm. Random plaintext blocks are chosen and passed through the algorithm to deduce the private key used for decryption. This is feasible because the encryption key in this kind of attack is an asymmetric public key. Variations of this attack include Differential and Integral Cryptanalysis attacks that use pairs or sets instead of single text blocks.

  • Ciphertext-Only Attack − The attacker only has the ciphertext and no access to plaintext or the encryption key. If the attacker gains a single seminal hint about the plaintext, even a format, the cipher can be decoded. With only one component to crack, i.e., ciphertext, this attack is more common but equally challenging.

  • Man-in-the-Middle Attacks (MITM − The attacker infiltrates private communications between two individuals. If a public/asymmetric key is being exchanged, the attacker intercepts and swaps the key for an imposter key without either party knowing. With this key, the attacker accesses the decryption/private key, with the two transactors none the wiser even though the key is no longer secure or authentic.

  • Side-Channel Attack − This attack doesn't target the plain/ciphertext or the key. Instead, attackers observe the physical parameters of systems involved in the process. They measure system response times for data retrieval queries, the amount of power used or electromagnetic radiation emitted during information-acquiring tasks, etc. Measurements are exploited to force processors to re-iterate tasks, giving up the location of sensitive information.

  • Dictionary Attack − This attack manipulates people's tendency to use familiar words or common phrases in their passwords. Words in the dictionary are encrypted, then compared with password hashes to find matches.

  • Brute Force − Attackers try all possible passcodes repeatedly until they can break into the system.

Cryptanalysis attempts can have varying degrees of success. Total Deduction by figuring out the key is rare. Usually, attackers get partial clues that then gradually may lead to complete discovery.

Sometimes they may glean small but crucial titbits of information, such as prominent names, formats, protocols, etc., that give away the key. This is called Information Deduction, and when the data is bits of the plain/ciphertext themselves, it is called Instance Deduction. If the attacker guesses the algorithm mimics the key, it is called Global Deduction.

Types of Ciphers

Commonly encountered ciphers include traditional ciphers and block ciphers.
Traditional Ciphers include Substitution ciphers like Hill, Caesar, and Playfair, where plaintext alphabets are replaced with ciphertext alphabets/numerals, and Transposition Ciphers which permute the plaintext order.

Block Ciphers include S-Box, P-Box, and Product Block Ciphers.

Conclusion

Cryptanalysts can go on to become ethical hackers or forensic investigators. Everyday duties include processing and analyzing raw data and encrypted materials, sorting jumbled intercepts from different sources, debugging software, diagnosing flaws in computer networks, and detecting data flow issues. Standard tools for cryptanalysis include Cryptool, CryptoBench, and Ganzua, amongst others, apart from the tools in academic papers.

Updated on: 09-Dec-2022

258 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements