WebAuthn: Difference between revisions

add citation
m clean explicit et al, gen fixes
Line 12: Line 12:


== Background ==
== Background ==
FIDO2 is the successor of the FIDO Universal 2nd Factor (U2F) legacy protocol. FIDO2 authentication has all the advantages of U2F—the primary difference is that a FIDO2 authenticator is a multi-factor authenticator.  
FIDO2 is the successor of the FIDO Universal 2nd Factor (U2F) legacy protocol. FIDO2 authentication has all the advantages of U2F—the primary difference is that a FIDO2 authenticator is a multi-factor authenticator.


A FIDO2 authenticator may be used in either single-factor mode or multi-factor mode. In single-factor mode, the authenticator is activated by a test of user presence (TUP), which usually consists of a simple button push. In multi-factor mode, the authenticator (''something you have'') is activated by either a [[Personal identification number|PIN]] (''something you know'') or a [[Biometrics|biometric]] (''something you are'').
A FIDO2 authenticator may be used in either single-factor mode or multi-factor mode. In single-factor mode, the authenticator is activated by a test of user presence (TUP), which usually consists of a simple button push. In multi-factor mode, the authenticator (''something you have'') is activated by either a [[Personal identification number|PIN]] (''something you know'') or a [[Biometrics|biometric]] (''something you are'').
Line 37: Line 37:
[[File:Passwordless_Web_Authentication.svg|thumb|right|A typical Web Authentication (WebAuthn) flow]]
[[File:Passwordless_Web_Authentication.svg|thumb|right|A typical Web Authentication (WebAuthn) flow]]


For the purposes of illustration, we assume the authenticator is a roaming hardware authenticator (see below for other options). In any case, the authenticator is a multi-factor [[Cryptography|cryptographic]] authenticator that uses [[Cryptography#Public-key_cryptography|public-key cryptography]] to sign an authentication assertion targeted at the WebAuthn Relying Party. Assuming the authenticator uses a [[Personal identification number|PIN]] for user verification, the authenticator itself is ''something you have'' while the PIN is ''something you know''.
For the purposes of illustration, we assume the authenticator is a roaming hardware authenticator (see below for other options). In any case, the authenticator is a multi-factor [[Cryptography|cryptographic]] authenticator that uses [[Cryptography#Public-key cryptography|public-key cryptography]] to sign an authentication assertion targeted at the WebAuthn Relying Party. Assuming the authenticator uses a [[Personal identification number|PIN]] for user verification, the authenticator itself is ''something you have'' while the PIN is ''something you know''.


To initiate the WebAuthn authentication flow,<ref>{{cite web |url=https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API |title=Web Authentication API  |at=Section&nbsp;[https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API#Authentication Authentication] |publisher=[[Mozilla]] |access-date=18 March 2019}}</ref> the WebAuthn Relying Party indicates its intentions to the WebAuthn Client (i.e., the browser) via [[JavaScript]]. The WebAuthn Client communicates with the authenticator using a JavaScript [[Application programming interface|API]] implemented in the browser. A roaming authenticator conforms to the FIDO [[Client to Authenticator Protocol]].
To initiate the WebAuthn authentication flow,<ref>{{cite web |url=https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API |title=Web Authentication API  |at=Section&nbsp;[https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API#Authentication Authentication] |publisher=[[Mozilla]] |access-date=18 March 2019}}</ref> the WebAuthn Relying Party indicates its intentions to the WebAuthn Client (i.e., the browser) via [[JavaScript]]. The WebAuthn Client communicates with the authenticator using a JavaScript [[Application programming interface|API]] implemented in the browser. A roaming authenticator conforms to the FIDO [[Client to Authenticator Protocol]].
Line 57: Line 57:
== Support ==
== Support ==


The WebAuthn Level&nbsp;1 standard was published as a W3C Recommendation by the [[Web Authentication Working Group]] on 4&nbsp;March 2019.<ref name="W3C-WebAuthn-Level-1" /><ref name="W3C-WebAuthn-announce" /><ref>{{Cite web |url=https://venturebeat.com/2019/03/04/w3c-approves-webauthn-as-the-web-standard-for-password-free-logins/ |title=W3C Approves WebAuthn as the Web Standard for Password-Free Logins |last=Protalinski |first=Emil |date=March 4, 2019}}</ref> WebAuthn is supported by the following web browsers: [[Google Chrome]], Mozilla [[Firefox]], [[Microsoft Edge]], and [[Safari (web browser)|Apple Safari]] (preview).<ref name="W3C-WebAuthn-announce" /> WebAuthn is also supported by the [[Opera web browser]].<ref>{{cite web |title=Can I use Web Authentication API? |url=https://caniuse.com/#feat=webauthn |accessdate=7 March 2019}}</ref>  
The WebAuthn Level&nbsp;1 standard was published as a W3C Recommendation by the [[Web Authentication Working Group]] on 4&nbsp;March 2019.<ref name="W3C-WebAuthn-Level-1" /><ref name="W3C-WebAuthn-announce" /><ref>{{Cite web |url=https://venturebeat.com/2019/03/04/w3c-approves-webauthn-as-the-web-standard-for-password-free-logins/ |title=W3C Approves WebAuthn as the Web Standard for Password-Free Logins |last=Protalinski |first=Emil |date=March 4, 2019}}</ref> WebAuthn is supported by the following web browsers: [[Google Chrome]], Mozilla [[Firefox]], [[Microsoft Edge]], and [[Safari (web browser)|Apple Safari]] (preview).<ref name="W3C-WebAuthn-announce" /> WebAuthn is also supported by the [[Opera web browser]].<ref>{{cite web |title=Can I use Web Authentication API? |url=https://caniuse.com/#feat=webauthn |accessdate=7 March 2019}}</ref>


The desktop version of Google Chrome has supported WebAuthn since version&nbsp;67.<ref name="chrome-support">{{cite web |url=https://developers.google.com/web/updates/2018/05/webauthn |title=Enabling Strong Authentication with WebAuthn |first=Christiaan |last=Brand |website=Google Developers |date=2018-06-03 |accessdate=2018-06-25}}</ref> Firefox, which had not fully supported the previous FIDO U2F standard, included and enabled WebAuthn in Firefox version&nbsp;60, released on May&nbsp;9, 2018.<ref>{{cite web |url=https://www.cnet.com/news/firefox-moves-browsers-into-the-post-password-future-with-webauthn/ |title=Firefox moves browsers into post-password future with WebAuthn tech |first=Stephen |last=Shankland |website=CNET |date=2018-05-09 |accessdate=2018-05-11}}</ref> An early [[Windows Insider]] release of Microsoft Edge (Build&nbsp;17682) implemented a version of WebAuthn that works with both [[Windows Hello]] as well as external security keys.<ref>{{cite web |url=https://blogs.windows.com/windowsexperience/2018/05/31/announcing-windows-10-insider-preview-build-17682/#oHYCS0GkF95OMzKH.97 |title=Announcing Windows 10 Insider Preview Build 17682 |author=Sarkar, et. al. |publisher=Microsoft |date=2018-05-23 |accessdate=2018-06-25}}</ref>
The desktop version of Google Chrome has supported WebAuthn since version&nbsp;67.<ref name="chrome-support">{{cite web |url=https://developers.google.com/web/updates/2018/05/webauthn |title=Enabling Strong Authentication with WebAuthn |first=Christiaan |last=Brand |website=Google Developers |date=2018-06-03 |accessdate=2018-06-25}}</ref> Firefox, which had not fully supported the previous FIDO U2F standard, included and enabled WebAuthn in Firefox version&nbsp;60, released on May&nbsp;9, 2018.<ref>{{cite web |url=https://www.cnet.com/news/firefox-moves-browsers-into-the-post-password-future-with-webauthn/ |title=Firefox moves browsers into post-password future with WebAuthn tech |first=Stephen |last=Shankland |website=CNET |date=2018-05-09 |accessdate=2018-05-11}}</ref> An early [[Windows Insider]] release of Microsoft Edge (Build&nbsp;17682) implemented a version of WebAuthn that works with both [[Windows Hello]] as well as external security keys.<ref>{{cite web |url=https://blogs.windows.com/windowsexperience/2018/05/31/announcing-windows-10-insider-preview-build-17682/#oHYCS0GkF95OMzKH.97 |title=Announcing Windows 10 Insider Preview Build 17682 |author=Sarkar |display-authors=etal |publisher=Microsoft |date=2018-05-23 |accessdate=2018-06-25}}</ref>


Existing FIDO U2F security keys are largely compatible with the WebAuthn standard, though WebAuthn added the ability to reference a unique per-account "user handle" identifier, which older authenticators are unable to store.<ref name="W3C-WebAuthn" /> One of the first FIDO2-compatible [[authenticator]]s was the second-generation [[YubiKey|Security Key]] by Yubico, announced on April&nbsp;10, 2018.<ref>{{cite press release |url=https://www.yubico.com/press-releases/280530/ |title=Yubico Launches New Developer Program and Security Key for FIDO2 and WebAuthn W3C Specifications |date=2018-04-10 |accessdate=2018-05-11}}</ref>
Existing FIDO U2F security keys are largely compatible with the WebAuthn standard, though WebAuthn added the ability to reference a unique per-account "user handle" identifier, which older authenticators are unable to store.<ref name="W3C-WebAuthn" /> One of the first FIDO2-compatible [[authenticator]]s was the second-generation [[YubiKey|Security Key]] by Yubico, announced on April&nbsp;10, 2018.<ref>{{cite press release |url=https://www.yubico.com/press-releases/280530/ |title=Yubico Launches New Developer Program and Security Key for FIDO2 and WebAuthn W3C Specifications |date=2018-04-10 |accessdate=2018-05-11}}</ref>
Line 79: Line 79:
The main points of criticism revolve around two potential issues that were problematic in other cryptographic systems in the past and therefore should be avoided in order to not fall victim to the same class of attacks:
The main points of criticism revolve around two potential issues that were problematic in other cryptographic systems in the past and therefore should be avoided in order to not fall victim to the same class of attacks:


* Through the mandated use of COSE (RFC 8152) WebAuthn also supports [[RSA_(cryptosystem)|RSA]] with [[PKCS_1|PKCS1v1.5 padding]]. This particular scheme of padding is known to be vulnerable to [[Adaptive_chosen-ciphertext_attack|specific attacks]] for at least twenty years and it has been successfully attacked in other protocols and implementations of the RSA cryptosystem in the past. It is difficult to exploit under the given conditions in the context of WebAuthn, but given that there are more secure cryptographic primitives and padding schemes, this is still a bad choice and is not considered to be best practice among cryptographers any more.
* Through the mandated use of COSE (RFC 8152) WebAuthn also supports [[RSA (cryptosystem)|RSA]] with [[PKCS 1|PKCS1v1.5 padding]]. This particular scheme of padding is known to be vulnerable to [[Adaptive chosen-ciphertext attack|specific attacks]] for at least twenty years and it has been successfully attacked in other protocols and implementations of the RSA cryptosystem in the past. It is difficult to exploit under the given conditions in the context of WebAuthn, but given that there are more secure cryptographic primitives and padding schemes, this is still a bad choice and is not considered to be best practice among cryptographers any more.
 
* The FIDO alliance standardized on an [[Public-key cryptography|asymmetric cryptographic]] scheme called ECDAA.<ref name="ecdaa-spec">{{cite web|url=https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-ecdaa-algorithm-v2.0-id-20180227.html|title=FIDO ECDAA Algorithm|publisher=FIDO Alliance|date=2018-02-27|accessdate=2018-10-09}}</ref> This is a version of [[Direct Anonymous Attestation|direct anonymous attestation]] based on [[elliptic curve]]s and in the case of WebAuthn is meant to be used to verify the integrity of authenticators, while also preserving the privacy of users, as it does not allow for global correlation of handles. However, ECDAA does not incorporate some of the lessons that were learned in the last decades of research in the area of [[Elliptic-curve cryptography|elliptic curve cryptography]], as the chosen curve has some security deficits inherent to this type of curve, which reduces the security guarantees quite substantially. Furthermore the ECDAA standard involves random, non-deterministic, signatures, which already has been a problem in the past.
* The FIDO alliance standardized on an [[Public-key_cryptography|asymmetric cryptographic]] scheme called ECDAA.<ref name="ecdaa-spec">{{cite web|url=https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-ecdaa-algorithm-v2.0-id-20180227.html|title=FIDO ECDAA Algorithm|publisher=FIDO Alliance|date=2018-02-27|accessdate=2018-10-09}}</ref> This is a version of [[Direct_Anonymous_Attestation|direct anonymous attestation]] based on [[Elliptic_curve|elliptic curves]] and in the case of WebAuthn is meant to be used to verify the integrity of authenticators, while also preserving the privacy of users, as it does not allow for global correlation of handles. However, ECDAA does not incorporate some of the lessons that were learned in the last decades of research in the area of [[Elliptic-curve_cryptography|elliptic curve cryptography]], as the chosen curve has some security deficits inherent to this type of curve, which reduces the security guarantees quite substantially. Furthermore the ECDAA standard involves random, non-deterministic, signatures, which already has been a problem in the past.


Paragon Initiative Enterprises also criticized the way in which the standard was initially developed, as the proposal was not made public in advance and experienced cryptographers were not asked for suggestions and feedback. Hence the standard was not subject to broad cryptographic research from the academic world.
Paragon Initiative Enterprises also criticized the way in which the standard was initially developed, as the proposal was not made public in advance and experienced cryptographers were not asked for suggestions and feedback. Hence the standard was not subject to broad cryptographic research from the academic world.


Despite these shortcomings Paragon Initiative Enterprises still encourage users to continue to use WebAuthn but have come up with some recommendations for potential implementors and developers of the standard that they hope can be implemented before the standard is finalized. Avoiding such mistakes as early as possible would prevent the industry from any challenges that are introduced by broken standards and the need for [[Backward_compatibility|backwards compatibility]].
Despite these shortcomings Paragon Initiative Enterprises still encourage users to continue to use WebAuthn but have come up with some recommendations for potential implementors and developers of the standard that they hope can be implemented before the standard is finalized. Avoiding such mistakes as early as possible would prevent the industry from any challenges that are introduced by broken standards and the need for [[Backward compatibility|backwards compatibility]].


== References ==
== References ==