with GnuPG 2.2.43, i sometimes see RSA decryption failing intermittently.
Using these files:
$ ./test gpg: keybox '/home/dkg/tmp/tmp.s3bXNsf1tj/g/pubring.kbx' created gpg: /home/dkg/tmp/tmp.s3bXNsf1tj/g/trustdb.gpg: trustdb created gpg: key 7AF6724289FFC389: public key "someone@example.org" imported gpg: key 7AF6724289FFC389: secret key imported gpg: Total number processed: 1 gpg: imported: 1 gpg: secret keys read: 1 gpg: secret keys imported: 1 gpg: encrypted with ECDH key, ID 4A85CC85DB26C8E9 gpg: encrypted with 2048-bit RSA key, ID E8A4FCC42E7BBEA4, created 2024-05-28 "someone@example.org" дружбаgpg: encrypted with ECDH key, ID 4A85CC85DB26C8E9 gpg: encrypted with 2048-bit RSA key, ID E8A4FCC42E7BBEA4, created 2024-05-28 "someone@example.org" […] дружбаgpg: encrypted with ECDH key, ID 4A85CC85DB26C8E9 gpg: encrypted with 2048-bit RSA key, ID E8A4FCC42E7BBEA4, created 2024-05-28 "someone@example.org" gpg: public key decryption failed: Wrong secret key used gpg: decryption failed: No secret key Succeeded 50 times before failure gpg (GnuPG) 2.2.43 libgcrypt 1.10.3 Copyright (C) 2023 g10 Code GmbH License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: /home/dkg/tmp/tmp.s3bXNsf1tj/g Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 $
(this was first reported to sequoia while sequoia tries to use gpg-agent)