2
$\begingroup$

I wanted to know if mass encrypting files (both well known and not so well known) on my external HDD would somehow hurt the security of my private key.

As for the details: I am using GPG with a key that is 4096 bytes with RSA and DSA set as the algorithm. I am also using a long passcode on the key. I am mass encrypting these files using a bash script I wrote up earlier today as these files were long overdue to be encrypted and I did not want to encrypt the whole drive, just parts of it.

I took a look at this question, but I am not sure that this is the same thing as my question as this talks about hashes. I appreciate the patience as I know almost nothing about cryptography.

TL;DR : Can encrypting well known files (think "known plaintext attack" etc.) hurt the security of the key?

$\endgroup$
  • 4
    $\begingroup$ As a general rule, any modern encryption program is secure under chosen plaintext attack, and that's a goal of GPG, thus encrypting well known files should not hurt the security of your private key or otherwise compromise the confidentiality of your encrypted files; other causes with a much better potential for that abound. $\endgroup$ – fgrieu Sep 8 '16 at 4:53
  • $\begingroup$ Here's some basic research, which would probably have answered your questions: GPG on Wikipedia where you can find the known vulnerabilities (in the past). Modern cryptography requires symmetric ciphers (which is part of file encryption) to resist known plaintext attacks. That implies directly, that is is infeasable to learn the key from a pair of known plaintext + ciphertext $\endgroup$ – tylo Sep 8 '16 at 14:52
  • $\begingroup$ Thank you @fgrieu and everyone else, I just reread the comment now and realized that it does protect against decryption by well known files! Thanks! I am going to make this an answer now and accept it! $\endgroup$ – SenorContento Sep 8 '16 at 14:54
2
$\begingroup$

Fgrieu answered my question in a comment to show that my key will be protected even despite the fact that I encrypted well known files.

As a general rule, any modern encryption program should aim at security under chosen plaintext attack, and that's a goal of GPG, thus encrypting well known files should not hurt the security of your private key or otherwise compromise the confidentiality of your encrypted files; other causes with a much higher potential for that abound. [edited]

$\endgroup$
  • $\begingroup$ I am not sure, I want to ask first, but would it be a bad idea to come back to this answer later and write an explanation of why this is safe one I learn why or should I wait until someone else asks and then proceed by answering them? $\endgroup$ – SenorContento Sep 8 '16 at 17:52
  • $\begingroup$ First up: you're always free and more than welcome to add your own, personal answer. Since this answer here represents Fgrieu's "comment as an answer", I would leave this one as-is (to avoid potential confusion later on). Hope that helps... $\endgroup$ – e-sushi Sep 8 '16 at 21:59

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.

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