-2

I have very basic Idea about encryption/decryption and was wondering if we can break any encryption using this method. By break I mean to retrieve the encrypted data and the key.Possibly finding solution for ransomware.

to let the software attack our (dumb) data of which we have a backup.
Then we will have the encrypted data and original data and can compare the two.

Is it possible to break any encryption by knowing the data that was encrypted ?

4
  • Given enough time you can do it. But "enough" might be 100s of years :( Commented Dec 7, 2016 at 15:59
  • @SteffenUllrich I guess I should expect answers like that?answers like yes, but takes time... Commented Dec 7, 2016 at 16:01
  • if you already know the data (aka a backup), there's no need to decrypt.
    – dandavis
    Commented Dec 7, 2016 at 16:40
  • @dandavis you don't understand do you, my objective is to break that encryption means to retrieve the key and probably derive its algorithm so that we can crack the ransomware. Commented Dec 7, 2016 at 16:54

2 Answers 2

4

This is called a chosed-plaintext attack and its effectiveness depends on the algorithm in question.

An example of a cryptosystem that can be broken very easily in this way is a (poorly implemented) one-time pad. This cryptosystem can be implemented as follows: take your plaintext. Then generate a "key", which is a string of random symbols equal in length to your plaintext. To encrypt, XOR the plaintext with the key, symbol-by-symbol. Now, if you have a copy of the encryption machine and want to reverse-engineer the key using a chosen-plaintext attack do the following: choose a plaintext and encrypt it. Then XOR the resulting ciphertext with the plaintext you put in. The result will the key inside the machine. This is why proper implementations of a one-time pad only ever use a given key once.

An example of a cryptosystem that is specifically built to withstand chosen-plaintext attack is any public-key cryptosystem. Public key systems work by separating the encryption key from the decryption key, so you can publish the encryption key to allow others to encrypt info and send it to you, while keeping the secret key secret so that no one can decrypt it. The issue here is that anyone can now do the encryption (since the encryption key is published), so chosen-plaintext attacks are unpreventable. Public key systems must therefore be resistant to these types of attack.

Most (if not all) ransomware uses block ciphers such as AES 3DES, 3fish, etc. Some papers have been published about theoretical chosen-plaintext attacks on weakened versions of these algorithms which make some reduction to attack time, but even these theoretical attacks on non-existent weakened versions of these algorithms result in attack times longer than the remaining life-expectancy of the sun.

2

What you're proposing is a chosen-plaintext attack. While it is a powerful attack, modern cryptography, if correctly implemented isn't vulnerable to this kind of attack.

Not the answer you're looking for? Browse other questions tagged .