OpenBSD Journal

OpenSSH U2F/FIDO support in base

Contributed by rueda on from the more-than-a-token-effort-(basically) dept.

Damien Miller (djm@) posted to tech@:

Hi,

I just committed all the dependencies for OpenSSH security key (U2F)
support to base and tweaked OpenSSH to use them directly. This means
there will be no additional configuration hoops to jump through to use
U2F/FIDO2 security keys.
Hardware backed keys can be generated using "ssh-keygen -t ecdsa-sk"
(or "ed25519-sk" if your token supports it). Many tokens require to be
touched/tapped to confirm this step.

You'll get a public/private keypair back as usual, except in this case,
the private key file does not contain a highly-sensitive private key but
instead holds a "key handle" that is used by the security key to derive
the real private key at signing time.

So, stealing a copy of the private key file without also stealing your
security key (or access to it) should not give the attacker anything.

Once you have generated a key, you can use it normally - i.e. add it to
an agent, copy it to your destination's authorized_keys files (assuming
they are running -current too), etc. At authentication time, you will be
prompted to tap your security key to confirm the signature operation -
this makes theft-of-access attacks against security keys more difficult
too.

Please test this thoroughly - it's a big change that we want to have
stable before the next release.

-d

It will be great to see this fully-supported in the base system. Please help the team by testing as Damien requests.

(Comments are closed)


Comments
  1. By Linda j (lindajpol) lindajpollock53@gmail.com on https://emus4u.download/

    The U2F specification allows the creation of EC keys on the NIST P-256 curve, and assertions via ECDSA signatures with those keys. These are the basic building blocks of a U2F interaction. WebAuthn/FIDO2 expanded on the possibilities, but U2F and its CTAP1 transport are a functional subset of FIDO2.OpenSSH only needs the functionality provided by U2F, so they decided to integrate U2F as a key type. That said, this should work with any FIDO1 or FIDO2 compatible security key.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]