I have some encrypted files with double-key. I know public key and don't know private key. Can I obtain the private key (and decrypt all files) using two version of one file - crypted and decrypted? And if yes, how? Thanks a lot.


Short answer: No.

Public Key Encryption Basics

In public key encryption, public key is used to encrypt and private key is used to decrypt. It is not possible to decrypt using public key. It is also not possible to use public key to find private key. The opposite is commonly true: if you have private key, you likely can easily derive matching public key.

Using two versions of one file, crypted and decrypted, it may be possible to derive the public key. However, again, it will not be possible to use that for deriving the private key.

Implementation issues

The security properties you asked about are generally provided by public key cryptography. However, given the fact that it is not known what program was used and what key length + what padding, so the answer is based on assumption of ideally implemented public key cryptography.

In theory the files will be safe (i.e. undecryptable) from parties without access to the private key. In practice, theory is not neccessarily accurate.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.