Using
gpg (GnuPG) 2.2.27
libgcrypt 1.9.3-unknown
(openSUSE Tumbleweed)
or
gpg (GnuPG) 2.3.2-beta132
libgcrypt 1.9.4-beta62
built from master.
I have a file that is encrypted with an unknown key (a test key not known to my standard keyring).
The file is 198 bytes long.
$ gpg --list-packets decrypt-me-annas-key.txt.gpg gpg: encrypted with ECDH key, ID 547ECA3FEAB73FC2 gpg: decryption failed: No secret key gpg: [don't know]: invalid packet (ctb=4f) gpg: [don't know]: invalid packet (ctb=72) gpg: uncompressing failed: Unknown compression algorithm gpg: processing message failed: Unknown compression algorithm # off=0 ctb=84 tag=1 hlen=2 plen=94 :pubkey enc packet: version 3, algo 18, keyid 547ECA3FEAB73FC2 data: [263 bits] data: [392 bits] # off=96 ctb=d4 tag=20 hlen=2 plen=100 new-ctb :aead encrypted packet: cipher=9 aead=2 cb=21 length: 100 # off=104 ctb=a0 tag=8 hlen=2 plen=229 :compressed packet: algo=118
There a several weirdnesses:
- The four lines
gpg: [don't know]: invalid packet (ctb=4f) gpg: [don't know]: invalid packet (ctb=72) gpg: uncompressing failed: Unknown compression algorithm gpg: processing message failed: Unknown compression algorithm
make no sense. What invalid packets? Why try uncompressing if decryption wasn't possible? I guess all of those errors are subsequent errors.
- The third packet at offset 104 makes no sense.
As far as I can tell, there are exactly two (top-level) packets in the file:
- A pubkey enc packet of length 2+94=96.
- An aead encrypted packet of length 2+100=102.
96+102 = 198 which is then size of the file.
I suspect that gpg tries to find packets in the undecrypted second packet.
This problem does not occur with another encrypted test file that is encrypted with two "unknown" keys. I'll attach the problematic encrypted test file.