Suppose I have generated a public/private RSA4096
keypair using GPG
. Is it secure to use this keypair to encrypt/decrypt documents solely for personal use, i.e., have an encrypted backup of some very important files of mine. In that case I'd be using something like:
gpg --encrypt --recipient "<my info>" a_document.pdf
# Then when I need to recover that document:
gpg --decrypt a_document.pdf.gpg
Is this a secure practice? Could an attacker recover the original PDF? As a separate note, if they also have the secret GPG key file (but obviously not the passphrase itself) would they be able to recover it?
Would it be better to encrypt using --symetric
?
Until now I was thinking of this practice (encrypting files using public/private key pair) as perfectly secure (even when somebody has the private key but not the passphrase) but now I'm going through the Coursera Cryptography I course and one of the first points mentioned in the RSA cryptography is to never encrypt the message itself using RSA.