How do I check if a file is a valid encrypted file before I
decrypt it?
Robert J. Hansen
rjh at sixdemonbag.org
Wed Jul 12 05:19:25 CEST 2006
> Before I decrypt a file, this file does have a .pgp extension, how do I
> know if it is a valid encrypted file before I decrypt it?
I'm not sure what you're asking here, to be honest. What's an invalid
encrypted file? If I send you an encrypted file containing nothing but
random data, the successful decryption of the valid file will be
statistically indistinguishable from trying to decrypt it with an
incorrect session key.
And in some other respects, the OpenPGP standard makes it very easy for
an implementation to detect bad or corrupted data and to bail out early.
So without knowing precisely what you mean by 'validity', I don't know
what to tell you, I'm sorry.
More information about the Gnupg-users
mailing list