



What you need is the creation timestamp and the public key parametersįrom the card.
#GOANYWHERE OPENPGP STUDIO EXPORT PUBLIC KEY EMPTY CODE#
There is no code for this, you need to hack the source. However, if you really lost the public key and you need it back, it is possible to re-create the public key with the same fingerprint. Gpg: keybox '/home/smalatho/.gnupg/pubring.kbx' createdĪccording to the maintainer of GnuPG, it is technically possible to reconstruct the public key using only information from the card but it isn't easy: Gpg: new configuration file '/home/smalatho/.gnupg/gpg.conf' created Gpg: new configuration file '/home/smalatho/.gnupg/nf' created Gpg: directory '/home/smalatho/.gnupg' created General key info.: pub rsa4096/6825CB0EBDA94110 john doe Public and secret key created and signed. Gpg: directory '/home/xxx/.gnupg/openpgp-revocs.d' created Gpg: key 6825CB0EBDA94110 marked as ultimately trusted Gpg: /home/xxx/.gnupg/trustdb.gpg: trustdb created What keysize do you want for the Authentication key? (4096)Ĭhange (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o What keysize do you want for the Encryption key? (4096) What keysize do you want for the Signature key? (4096) Gpg: Note: keys are already stored on the card! Make off-card backup of encryption key? (Y/n) n Is there any way of retrieving the public key from the smart card after deleting the key rings?īelow are the steps being followed: $ gpg -card-editĪpplication ID. fetch doesn't seem to work.Īt this stage I do not want to share the public key on any online server. The issue is that I cannot test encrypting a file after the above steps have been performed as the public key seems to be missing. access smart card to re-generate GnuPG home directory.Trying to emulate this locally the following is being done: The smart card is then to be shipped off to the user. I am working on a use-case where OpenPGP is being used to generate a public key pair on a smart card (Yubikey).
