I have two files, one in plain-text and one encrypted. I don't know what kind of encryption is used. But based on my limited knowledge, I guess it is possible to compare them.

Now I have a third encrypted file; however, this one does not have a corresponding plain-text file. So I need to figure the encryption out between the first two files to unlock the third. I know the encryption used is the same as with the other one.

I have heard about a known plain-text attack, but how do you do it?

How can I do this? Are there any software for it?

Thank you. :)

  • $\begingroup$ There are very few ways to distinguish between functions as one popular security property to target is that the function is indistinguishable from a random function. If you also know the key, then you may trial encrypt/decrypt the plain/cipher texts to compare equality. Otherwise, no, you'll also need to brute force the keys... $\endgroup$ – cypherfox Mar 23 '18 at 12:17
  • $\begingroup$ Chosen Plaintext Attacks (CPA) also require you know the function. $\endgroup$ – cypherfox Mar 23 '18 at 12:20
  • $\begingroup$ My two files are .cipher files and the plain message file is a .plain file, Am I even on the right track, if you know from this limited information? It is also said to be using a very old and insecure form of encryption.. :) $\endgroup$ – mjoerck Mar 23 '18 at 12:24
  • $\begingroup$ Here is a snippet of the encrypted version of the plain text: Z fZS ff. ffS ffO .c fff fZd .c n fZm $\endgroup$ – mjoerck Mar 23 '18 at 12:25
  • $\begingroup$ Known to be an old and insecure function? Okay, maybe this is enough to break it. But as a CTF or homework task, you'll need to look into many old functions and learn about their weeknesses. I certainly should, but I tend to focus on modern cryptography. Certainly plenty to learn from the mistakes immortalized as history. $\endgroup$ – cypherfox Mar 23 '18 at 12:30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.