Test symmetrically encrypted files for errors - make sure they can be decrypted

Neal H. Walfield neal at walfield.org
Mon Jul 24 13:15:41 CEST 2017


At Sat, 22 Jul 2017 00:01:45 +0200 (CEST),
<karel-v_g at tutanota.com> wrote:
> I am using GnuPG 1.4.x to symmetrically encrypt files before I
> transfer them to "the cloud" for backup reasons.
> Is there any way to test these encrypted files for errors, i.e. to
> make sure they can be decrypted correctly without actually having to
> decrypt them again?
> Providing the passphrase again etc. is no problem, I only want to
> avoid to write the whole file to my disk a third time (unencrypted
> original, encrypted backup, decrypted test).
> If I can test the file somehow will I get back an errorlevel on
> success or error?
> In short I am searching for something like the test option for packed
> files that most archivers offer.

Probably the easiest solution is to sign and encrypt, and then verify
the signature.  If the encrypted data is somehow corrupted, then the
signature will be wrong.  This, of course, embeds the signature in the
OpenPGP message, which might not be desired.



More information about the Gnupg-users mailing list