Generating card keys via gpg-connect-agent

Jiri Kerestes jiri.kerestes at trustica.cz
Tue Sep 10 16:33:39 CEST 2019


Hello,

I'm trying to automate generating keys on a smart card using
gpg-connect-agent. However, there is no documentation at all on using
"SCD GENKEY" command. [1]

Running this command generates the key, but the key is not added to the
keyring.

$ gpg-connect-agent 'SCD GENKEY --force 1' /bye
S KEY-CREATED-AT 1568124470
S KEY-DATA q
4023152B5972F631E7CB641A636C060DE8DA6E2233D4B7D81AAAB4FBE0B44612EB
S KEY-DATA curve 092B06010401DA470F01
S KEY-FPR 4AC38BF258507FBF1B1E26066291278FDDA260D1
OK

Log inspection shows that 'gpg --card-edit' does not pass user-supplied
information (e.g. name, email, key expiration date) to gpg-agent, so it
must use some other mechanism.

Is it even possible to generate keys on smart card using just gpg-agent?

[1]: https://gnupg.org/documentation/manuals/gnupg/Scdaemon-GENKEY.html

Best regards,
Jiri



More information about the Gnupg-devel mailing list