Skip to main content

Cryptography Basics, Part 2: Attack Models for Cryptanalysis

Welcome back my aspiring cyber warriors!
In an earlier tutorial, I tried to explain some of the basic concepts and terms of cryptography. Not only are those terms and concepts key to becoming effective in the world of cyber security, but they are required to pass such certification exams such as the CISSP, CWA, Security+ and many others.
In this tutorial we will address the various attack models for cryptanalysis. In other words, what methods can a cryptanalyst use to break the encryption without knowing the key. Besides being fascinating, you are likely to find these methods, concepts and analysis on the CISSP and CASP exams.
Terminology
Some terminology before we begin.
plaintext - text that has not been encrypted
ciphertext - text that has been encrypted
cryptanalyst - person knowledgeable in breaking encryption without the key
cipher - a way of hiding the content and message of plaintext
We can divide these methods into four types and further classify them as passive and active.
Let's look at the passive methods first.
Passive
Ciphertext-Only attackers (COA)
In this attack on the encryption, attacker/cryptanalyst can only observe the ciphertext. In order words, they can only see what all of us see, what appears to be indecipherable nonsense that comes out after the encryption such as that below.
The cryptananlyst doesn't have any of the plaintexts that went into the encryption algorithm, they have no idea what plaintexts created the ciphertexts, and they are totally passive (they can't send known--their own-- plaintext through the algorithm and observe the ciphertext.
Most encryption algorithms are NOT vulnerable to this type of attack and the attackers/cryptanalyst's probability of success is VERY low.
Known-Plaintext Attack (KPA)
In this attack, the attacker/cryptanalysts know the plaintext that generates the ciphertext. They can't select the plaintext, but they can observe plaintext-ciphertext pairs. This attack has a significantly better chance of success than KPA. Simple XOR ciphers and the old PKZIP were vulnerable to this attack.
From a historical context, this is one of the approaches taken at Bletchley Park by Allen Turing and his team to decipher the Nazi messages generated by the German Enigma machine (they knew that German messages had some common plaintext in their messages such as headers and weather forecasts).
Now, Let's look at two active attacks.
Active Attacks
Chosen-Plaintext Attack (CPA)
In this attack, the attacker/cryptanalyst can select or choose the plaintext that is sent through the encryption algorithm and observe the ciphertext that it generates. This is an active model where the attacker actually gets to chose the plaintext and do the encryption.
Being able to chose any plaintext and observing the ciphertext gives the attacker a strong foothold into the inner workings of the algorithm and secret key. One approach here would be to generate a database of popular plaintexts and ciphertexts and then use this database of common plaintext-ciphertext pairs to determine the cipher text input.
As you might imagine, by being able to select the plaintext and observe the ciphertext, the chances of breaking the encryption is significantly improved.
Chosen-Ciphertext Attack
In this attack, the attacker can both encrypt and decrypt. This means that they can select plaintext, encrypt it, observe the ciphertext and then reverse the entire process. Note that the cryptanalyst is not necessarily trying to find the plaintext, but rather is trying to decipher the algorithm and secret key used to encrypt the plaintext.
This model has a good probability of success.
Summary
Although this information might seem a bit geeky and obscure, the professional-level cyber warrior must be conversant in these techniques and concepts.


from hackers-arise full article here

Popular posts from this blog

Malwarebytes CrackMe 2: contest summary

About three weeks ago, we published our second CrackMe . It triggered a lot of interest, and we got many high-quality write-ups. Choosing the winner was really difficult! In this post, I am going to summarize the contest and comment on the received submissions. CrackMe 2 challenge The topic of the challenge was Python, and its goal was to teach how the Python scripts can be packaged and integrated with native executables. The involved Python script was not obfuscated, and the user was supposed to adapt it for the purpose of finding the solution. The CrackMe was made of three components, cooperating with each other: a Python script (converted to EXE with the help of PyInstaller) a native DLL, loaded with the help of the above script a Python script unpacked by the DLL and injected into Actxproxy.dll In the first level, the user was supposed to find a valid PIN to decode a URL, from which the next level was downloaded. The next level was a native DLL that was inject...

Windows Driver Backup and Restore Guide and Software for All Versions

Computer is a collection of hardware and To work properly these hardware we need to install some drivers. Drivers may vary for different versions of operating systems. By default an operating system doesn't have all your computer drivers so we need to take driver backup from current OS for future use. Virus and Worms becomes more popular now to corrupt our computer or their software and that is another reason to always keep your computer driver backup to re-use them without any issue. Taking your driver backup can solve a lot of issue related to your computer. Windows Driver Backup and Restore Guide The method is very manageable and smooth, You will need to use a utility software that will create backup of all drivers in your Windows operating system and later you can restore them whenever you change your operating system, or some of your drivers get corrupted. So proceed with some simple steps below. Steps to Backup and Restore Drivers on Windows Using Double Driver Fi...

Why you need Network Forensic Tool in your life

CyberScan is an open source network penetration testing toolkit that can perform various forensics and network scanning tasks, such as data packet analysis, packet decoding, pinging networks, ports scanning, and gathering geographical data for a given IP address.  CyberScan is capable of sending, capturing, and decoding data packets. The toolkit can decode Ethernet, IP, TCP, […] from Learn Ethical Hacking and Penetration Testing Online full article here