Re: Creating key stubs from smartcard without public key

2016-07-25 Thread Thomas Glanzmann
Hello Felix,

> Is there any way those public keys or key stubs can be created from
> the keys stored on the Yubikey or any smartcard itself?

the easiest way is:

(infra) [~] ssh-add -L
ssh-rsa 
B3NzaC1yc2EDAQABAAACAQDhYUVGvoVX7jE40Tb/iI45EsyuPv6dbe7wH66OqSYoakImnuDbitQWjAb4rbHiOAtnE6hkbHjyDg6GZum+adG4lUEIhuSEj6pXYrWuToPa3wWUCVrBFH5zYbtHiz8sOGtTrGJk9HAcKKMo1cjYiZ/HMwRsXkG6DS5hMpleMh8vBURWhEaAyOFhupcfrvPIhjJ1JrQhA5EdARZnX0qNFYbo0LoJCpDCF+YShsp1HalRJbG+1LXaXf3EEcw73AeKLjpigVA5nXklzFSrFR+pQ1SQjrgqmwHnu0lkqKKptlWJ0r3lq1adLdKLS09QIuONOFxk9QBon0VwltNK0a6OeYVrsktPdsDJnEq2wgV+eD8Y2FJ2vQdG+BMowAHUEw/f3vilGvxbR5GW7/nJ+AAodfwLrdxXnPQU/ruHAJU96bqEzxR4V7gXmvV3r4o/73fcY0LYQhbGDIp1H0d0fhGb/YOAOk8I1m4NjqqL3uvynMWiBiE7K+pj4/koYdEphEeHgoi7ya/cac7pWX7YPHOV2JQ7DF6CqymdR4PRVCsRWJnZBk3WsvMkVE3uUtNar7SpwVz9bb6r2cL43HK6x7GXJkFgtvilB6pFNWEtvJ7j/o0dvJru3Ic3eUjiNvrXyG9e84tlCL1Vx64yadR8WUAYJ56Old6Vi8bsRLyJH7YvRnkR5Q==
 cardno:000604936887

Cheers,
Thomas

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Creating key stubs from smartcard without public key

2016-07-25 Thread Felix Winterhalter

So I've recently started experimenting with a Yubikey.

I started off by creating an encryption subkey from my master key and 
moving that to the Yubikey.


This worked fine until I moved to a different computer and tried using 
it there.
It didn't automatically recognize the key on the card until I imported 
my publickey as well.


As far as I understand public key encryption regenerating the public key 
should always be possible

using the private key (which should be stored on the card).

My expected result would have been that gpg --card-status reads the card 
and then imports all keys on the card

generating the public key associated on the fly for local use.

The situation gets even more complicated if I want to have an 
authentication subkey on my Yubikey and not have it bound
to any specific master key (and certainly not publish it on any 
keyservers).
How can I export the ssh key (using gpg --export-ssh-key) when trying to 
do so using the key id yields:


gpg2 --export-ssh-key 0x5FECDB8C8311CB07!
gpg: key "0x5FECDB8C8311CB07!" not found: No public key
gpg: export as ssh key failed: No public key

Is there any way those public keys or key stubs can be created from the 
keys stored on the Yubikey or any smartcard itself?


Best regards,
Felix



___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users