How do I check if a file is a valid encrypted file before I decrypt it?

Todd Patrick Todd.Patrick at dtn.com
Tue Jul 11 23:26:45 CEST 2006


Version:

gpg (GnuPG) 1.2.6
Copyright (C) 2004 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA, ELG
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256
Compression: Uncompressed, ZIP, ZLIB


Summary:

How do I check if a file is a valid encrypted file before I decrypt it?


Issue:

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?

Looking at the man pages, there is a --verify argument, but that deals
with the sigfile and not an encrypted file.

Basically, I'd like to check the file to make sure it was encrypted
properly before I attempt to decrypt it.

Suggestions, examples or thoughts are greatly appreciated.

Thanks,

--Todd



More information about the Gnupg-users mailing list