I've spent good half of the day trying to figure out this error. As it first started to fail without errors on gopass.
What I've managed to find out is that the Ubuntu is able to encode message to macos and macos is able to decode it. When it does it reports: gpg: AES256.CFB encrypted data
While when the same file is encoded on macos during decoding gpg outputs gpg: AES256.OCB encrypted data
So @dave_thompson_085 had a good guess.
Solution (update to answer above)
TLDR: Disable AEAD in your key prefs by running gpg --edit-key ... and then setpref SHA512 SHA384 SHA256 SHA224 SHA1 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed then y then save. Then reencrypt your messages.
I've went to the bottom of this issue. CFB is not an AEAD algorithm it just indicate what cipher block was used. AEAD defines a cider block and a way to authenticate associated plain text like package headers etc. It is a faster alternative to MDC - Modification Detection Code.
GPG has no option to disable AEAD and force MDC if AEAD is enabled in your Key preferences, and it is set so by default when you generate a key with new gpg. The only way to fix the issue is to edit key preferences to remove any AEAD algorithms.
How to edit key pref to make it compatible with gpg 2.2.x
Let's first make a small test to see that the AEAD is being used:
$ [email protected]
$ echo test | gpg --encrypt --recipient $KEY | gpg --verbose --decrypt
...
gpg: AES256.OCB encrypted data
gpg: original file name=''
test
As you can see the OCB is being used.
Let's now edit the key preferences. You can show your current preferences with showpref
$ gpg --edit-key $KEY
gpg> showpref
[ultimate] (1). Piotr Czapla <[email protected]>
Cipher: AES256, AES192, AES, 3DES
AEAD: OCB
Digest: SHA512, SHA384, SHA256, SHA224, SHA1
Compression: ZLIB, BZIP2, ZIP, Uncompressed
Features: MDC, AEAD, Keyserver no-modify
The tweak the following command to match your prefs but disable AHEAD. It will ask you for confirmation before changing the prefs. In may case this list did the trick: setpref SHA512 SHA384 SHA256 SHA224 SHA1 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
Once you have your just confirm change and save your key.
gpg> setpref SHA512 SHA384 SHA256 SHA224 SHA1 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
Set preference list to:
Cipher: AES256, AES192, AES, 3DES
AEAD:
Digest: SHA512, SHA384, SHA256, SHA224, SHA1
Compression: ZLIB, BZIP2, ZIP, Uncompressed
Features: MDC, Keyserver no-modify
Really update the preferences? (y/N) y
sec ed25519/285CE99FAA64E280
created: 2022-07-20 expires: 2025-07-19 usage: SC
trust: ultimate validity: ultimate
ssb cv25519/C2C95918A535E298
created: 2022-07-20 expires: 2025-07-19 usage: E
ssb ed25519/CDEBF13E9DE11878
created: 2022-07-21 expires: 2027-07-20 usage: A
[ultimate] (1). Piotr Czapla (api key used to decrypt gopass on less secure instances) <[email protected]>
gpg> save
Then test that aead is not being used:
$ echo test | gpg --encrypt --recipient $KEY | gpg --verbose --decrypt
...
gpg: AES256.CFB encrypted data
gpg: original file name=''
test
And observe how the default CFB is being selected.
--list-packetson both versions to see.