[Bug 2432] New: ssh-keygen and tools should be able to get public part directly from private key (portability)

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Jul 20 23:33:34 AEST 2015


            Bug ID: 2432
           Summary: ssh-keygen and tools should be able to get public part
                    directly from private key (portability)
           Product: Portable OpenSSH
           Version: 6.9p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Smartcard
          Assignee: unassigned-bugs at mindrot.org
          Reporter: jjelen at redhat.com

After testing and discussion with Nikos about Smart cards, and after
finding out that opencryptoki-swtok doesn't even store PUBLIC_KEY on
the card which makes it unusable with openssh (sending public key in
first step) I think we should be able to handle this also different

Some tools are yet working this feature of ssh around by creating
self-signed certificates [1]. Before openssh-7 release, it seems to me
like great time to rethink smart cards handling. The thing is that even
if you don't have public key object on the card, you are able to
reconstruct public key from private key (p11tool example):

$ p11tool --login --export-pubkey
Enter PIN: 
-----END PUBLIC KEY-----

This is example from opencryptoki, where it works well with swtoken and
I don't see any problem with this approach using yubikey. Also other
cards should be able to export public information from private key.

This is done using method C_GetAttributeValue with template:

The only drawback is that you need unconditionally log in to access
these fields, which is usability issue only for ssh-keygen tool -- you
are entering pin for ssh-add both ssh when connecting to remote server,
but it would be required to preserve session in ssh connect between
both stages (I'm not sure how much pain this would cause).

Still thinking about compatibility. Nikos says that this approach
should be possible to take with all the cards. There is problem in all
the tools if there is not public key.
Possibility will be to use this only as fallback option when there will
be no PK available. Or more radical change to use this as default and
fallback to public keys? Both would probably make more sense than
creating login options for ssh, ssh-add, ssh-keygen as we started
discussing in bug #2430.

I will have a look into codebase later. I just wanted to put everything
in together and then I can have a look at all the technical challenges,
since this will not be one-liner.


You are receiving this mail because:
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list