This is a minor bug report, identifying an incorrect message that gpg emits to standard error.
0 dkg@bob:~$ gpg --version
gpg (GnuPG) 2.4.7
libgcrypt 1.11.0
Copyright (C) 2024 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/.gnupg
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
0 dkg@bob:~$ echo test | gpg --encrypt --default-recipient-self > /dev/null
gpg: using "D477040C70C2156A5C298549BB7E9101495E6BF7" as default secret key for signing
0 dkg@bob:~$the message to stderr says "as default secret key for signing", but:
- the public key is used, not the secret key, and
- it is used for encryption, but not for signing.
The message should probably say something like "using […] as default recipient key for encryption"
This was first reported by Vincent Lefevre over on https://bugs.debian.org/1018719