Hi, I have been testing on GPG v 1.2.3 and 1.4.2 and they both give me the same problem as follows:
I sometimes get the message "gpg [don't know]: invalid packet (ctb=14)" and the exit value of 2 from decrypting a file, however gpg still gives me the output file. Since I have the original file, I compare the original to the decrypted output and they are identical. So I encrypted <-> decryted that original file (on the same computer) for a couple of time and sometime gpg gives me the above error, and sometime it does not and gives exit value 0. The decryption always give me the valid decryted files (from comp). Does anyone have that problem and know what's going on there? The file is a small binary file and the file is handle as binary throughout. I also tried with ASCII armor swicth on (both end) but still get the error. I run gpg from a script which take exit value 0 as success and anything else as fail. So the main problem is the exit value 2. The command is encrypted gpg.exe --no-default-keyring --homedir "[keys' home directory]" --batch --always-trust -e -o "[encrypted file]" --cipher-algo AES256 -r [key_name] "[file_to_encrypt]" decrypted gpg.exe --no-default-keyring --homedir "[keys' home directory]" -o "[decrypt file]" "[encrypted file]" if I list-packet the encrypted file, I get the follow: - The encrypted file which will give error when decrypt. gpg.exe --list-packet --no-default-keyring --homedir "[keys' home directory]" "[encrypted file]" :pubkey enc packet: version 3, algo 16, keyid [key id] data: [1024 bits] data: [1023 bits] gpg: NOTE: cipher algorithm 9 not found in preferences :encrypted data packet: length: unknown mdc_method: 2 gpg: encrypted with 1024-bit ELG-E key, ID [ID], created 2003-03-17 "[key name]" :compressed packet: algo=2 :literal data packet: mode b, created 1131996107, name="[filename]", raw data: 9750 bytes gpg: [don't know]: invalid packet (ctb=14) - The encrypted file which does not give error and give exit value 0 gpg.exe --list-packet --no-default-keyring --homedir "[keys' home dir]" [encrypted file] :pubkey enc packet: version 3, algo 16, keyid [key id] data: [1024 bits] data: [1023 bits] gpg: NOTE: cipher algorithm 9 not found in preferences :encrypted data packet: length: unknown mdc_method: 2 gpg: encrypted with 1024-bit ELG-E key, ID [ID], created 2003-03-17 "[key name]" :compressed packet: algo=2 :literal data packet: mode b, created 1131997441, name="[filename]", raw data: 9750 bytes The two encryptions use the same original file, command, and key. The --list packet result shows the correct infomation regarding the key. Note: I cannot post the original file. I tried encrypt the original file with several keys (all ELG-E key) and they all have the problem. Thanks, Taniya _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users