I use gpg (GnuPG) 1.4.11. to encrypt a file
gpg -c foo.pdf. The encrypted file is then
foo.pdf.gpg and, additionally, the original file
foo.pdf exists. I can then decrypt
gpg foo.pdf.gpg as expected. However, if I use
gpg -o foo.pdf -c foo.pdf and choose to overwrite the existing file on encryption, then use
gpg foo.pdf to decrypt the encrypted file, and finally choose to overwrite the existing file
foo.pdf (again), the file is still protected and can't be viewed.
I then tried to execute
gpg foo.pdf again (I thought decrypting failed the first time, that's why I tried it again). Now the file seems to be corrupted:
gpg: [don't know]: 1st length byte missing. Any ideas? Is it generally not a good idea to overwrite the files? I expected to obtain one file
foo.pdf.gpg after encryption (with the original file
foo.pdf being removed automatically).