Given an encrypted file, and a non-encrypted version of the same file, can the encryption key be easily recovered? [closed]

StackOverflow https://stackoverflow.com/questions/20979491

Question

This question is partly theoretical and partly practical. A perfect answer would answer theoretically why, and practically how.

Question

Given an encrypted file, and a non-encrypted version of the same file, can the encryption key be recovered? More specifically how might one achieve this?

Background

I have some backup files from a colleagues old machine. They have been stored in an encrypted 7zip file. The file table has not been encrypted, so it should be possible to isolate individual files. What I don't have is the actual encryption key (due to a storage medium failure). I do however have some unencrypted files which are also in the container. How can I use these to recover the whole archive?

Was it helpful?

Solution

As others have said, this is a "Known Plaintext Attack". All good cyphers are proof against such an attack. Any cypher which cannot withstand such an attack never gets off the starting blocks.

The best suggestion is to find out the specific encryption method used and look for specific weaknesses in that particular method. Alternatively, ask people who knew the key if they can remember even part of the original password. "It began with a D" will reduce the work you need to do to brute force it by a factor of 26 or 52.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top