Decryption error: "[don't know] partial length for packet type 20"

Hello.

  • We generated a key pair (RSA 2048) with GnuPG 2.4.3 libgcrypt 1.10.2 on Windows (Gpg4Win 4.2.0)
  • We imported the public key on Windows with GnuPG 2.4.5 libgcrypt 1.10.3 and here encrypted a file using the following command (on command line):
    gpg --rfc4880 --output cryptfile.gpg --encrypt --recipient $public_key --trust-model always clearfile.txt
  • We installed the private key on Red Hat Enterprise Linux release 8.8 (Ootpa) with GnuPG 2.2.20 libgcrypt 1.8.5 and then tried to decrypt the file generated in the previous point with the following command: gpg --decrypt --yes --recipient $private_key --output clearfile.txt cryptfile.gpg
  • the decrypt didn’t worked and we obtained the following message: gpg [don’t know] partial length for packet type 20

I know this is a problem of gpg versions compatibility and read some articles on the subject, but actually we cannot modify the gpg installations on Windows or Linux when we encrypt/decrypt the files, So I kindly ask if someone can suggest a way to resolve

Hi @FrankNewcastle,
sorry to read that you are having problems.

Can you make sure that the transferred file is complete? (You could use a checksum tool, e.g. sha256sum, but any would do.) Sometimes files get damaged in transfer.

You could also add a --verbose flag to the decryption call of gpg to see if there is more to the messages.

RSA 2024 should be completely compatible. I am using elder versions of GnuPG as well to decrypt newer messages.

Regards,
Bernhard