When I try gpg -K with my keyring (8744 keys), I found it costs 2.4s to query, but if I query my name, it only costs 0.2s. As keyboxd uses sqlite as the backend, it should have a similar performance. So I checked the source code. And then I found GnuPG never used the SQL query directly when gpg -K. It queries an OpenPGP key and uses the NEXT command to query the next key until it reaches the end. So GnuPG isn't querying, but is, instead, traversing.
Description
Description
Details
Details
- Version
- 2.4.3
Event Timeline
Comment Actions
That's right: -K is merely a -k which prints only keys which have at least one secret key or a stub key (for smartcards) available.