Repository navigation
Conversation
Add support for parsing and verifying FIDO2/WebAuthn assertion signatures formatted as webauthn-sk-ecdsa-sha2-nistp256@openssh.com, as specified in OpenSSH PROTOCOL.u2f, 'webauthn signatures'. In the OpenSSH security key specification, a WebAuthn key shares the sk-ecdsa-sha2-nistp256@openssh.com public key format (and the sk-ecdsa-sha2-nistp256-cert-v01@openssh.com certificate format), while its assertion signatures use the distinct signature format webauthn-sk-ecdsa-sha2-nistp256@openssh.com and carry the WebAuthn origin, clientDataJSON, and authenticator extensions in the trailing signature fields. Such signatures are produced by web browsers, so this package only verifies them and never produces them. Export SigAlgoWebAuthnSKECDSA256 and add it to the supported and default public key authentication algorithm lists, so that servers advertise and accept it like OpenSSH does, and to hashFunc and keyFormatForAlgorithm. It is deliberately not added to algorithmsForKeyFormat, which would make clients and servers presume that any AlgorithmSigner for an SK key can produce it, and advertise it as a host key algorithm. Preserve the trailing WebAuthn signature fields in parseSignatureBody, accept it for sk-ecdsa-sha2-nistp256@openssh.com keys and certificates in the server's public key authentication checks, and verify WebAuthn assertions in skECDSAPublicKey.Verify with the same checks as OpenSSH's webauthn_check_prepare_hash. Change-Id: Ib2f1c7d3387dbd7cd2e4871cda4c4952866d3690
|
This PR (HEAD: e27f963) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/860801. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/860801. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/860801. |
|
Message from Robin Thellend: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/860801. |
|
This PR (HEAD: 25b0fbe) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/860801. Important tips:
|
|
Message from Robin Thellend: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/860801. |
|
Message from Nicola Murino: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/860801. |
Add support for parsing and verifying FIDO2/WebAuthn assertion
signatures formatted as webauthn-sk-ecdsa-sha2-nistp256@openssh.com, as
specified in OpenSSH PROTOCOL.u2f, 'webauthn signatures'.
In the OpenSSH security key specification, a WebAuthn key shares the
sk-ecdsa-sha2-nistp256@openssh.com public key format (and the
sk-ecdsa-sha2-nistp256-cert-v01@openssh.com certificate format), while
its assertion signatures use the distinct signature format
webauthn-sk-ecdsa-sha2-nistp256@openssh.com and carry the WebAuthn
origin, clientDataJSON, and authenticator extensions in the trailing
signature fields.
Such signatures are produced by web browsers, so this package only
verifies them and never produces them. Export SigAlgoWebAuthnSKECDSA256
and add it to the supported and default public key authentication
algorithm lists, so that servers advertise and accept it like OpenSSH
does, and to hashFunc and keyFormatForAlgorithm. It is deliberately not
added to algorithmsForKeyFormat, which would make clients and servers
presume that any AlgorithmSigner for an SK key can produce it, and
advertise it as a host key algorithm.
Preserve the trailing WebAuthn signature fields in parseSignatureBody,
accept it for sk-ecdsa-sha2-nistp256@openssh.com keys and certificates
in the server's public key authentication checks, and verify WebAuthn
assertions in skECDSAPublicKey.Verify with the same checks as OpenSSH's
webauthn_check_prepare_hash.
Fixes golang/go#69999
Change-Id: Ib2f1c7d3387dbd7cd2e4871cda4c4952866d3690