Skip to content

Commit 452e79a

Browse files
committed
Clarify relationship between PRF and hmac-secret extensions
1 parent 3bcf9d5 commit 452e79a

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

index.bs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7440,11 +7440,30 @@ This [=client extension|client=] [=registration extension=] and [=authentication
74407440

74417441
As a motivating example, PRF outputs could be used as symmetric keys to encrypt user data. Such encrypted data would be inaccessible without the ability to get assertions from the associated [=credential=]. By using the provision below to evaluate the PRF at two inputs in a single [=assertion=] operation, the encryption key could be periodically rotated during [=assertions=] by choosing a fresh, random input and reencrypting under the new output. If the evaluation inputs are unpredictable then even an attacker who could satisfy [=user verification=], and who had time-limited access to the authenticator, could not learn the encryption key without also knowing the correct PRF input.
74427442

7443-
This extension is implemented on top of the [[FIDO-CTAP]] `hmac-secret` extension. It is a separate [=client extension=] because `hmac-secret` requires that inputs and outputs be encrypted in a manner that only the user agent can perform, and to provide separation between uses by WebAuthn and any uses by the underlying platform. This separation is achieved by hashing the provided PRF inputs with a context string to prevent evaluation of the PRFs for arbitrary inputs.
7443+
This extension is modeled on top of the [[FIDO-CTAP]] `hmac-secret` extension, but can also be implemented by other means.
7444+
It is a separate [=client extension=] because `hmac-secret` requires that inputs and outputs be encrypted
7445+
in a manner that only the user agent can perform,
7446+
and to provide separation between uses by WebAuthn and any uses by the underlying platform.
7447+
This separation is achieved by hashing the provided PRF inputs with a context string
7448+
to prevent evaluation of the PRFs for arbitrary inputs.
74447449

74457450
The `hmac-secret` extension provides two PRFs per credential: one which is used for requests where [=user verification=] is performed and another for all other requests. This extension only exposes a single PRF per credential and, when implementing on top of `hmac-secret`, that PRF MUST be the one used for when [=user verification=] is performed. This overrides the {{UserVerificationRequirement}} if neccessary.
74467451

7447-
Note: This extension may be implemented for [=authenticators=] that do not use [[FIDO-CTAP]] so long as the behavior observed by a [=[RP]=] is identical.
7452+
This extension MAY be implemented for [=authenticators=] that do not use [[FIDO-CTAP]]
7453+
so long as the behavior of the [=client extension inputs=] and [=client extension outputs=] obeys the following interface:
7454+
7455+
- Let |salt1| and |salt2| be the variables of the same names in the below client processing steps.
7456+
- Let |CredRandom| be an [=authenticator=]-defined, per-credential secret. |CredRandom| is static for the lifetime of the credential.
7457+
- The <code>{{AuthenticationExtensionsPRFOutputs/results}}.{{AuthenticationExtensionsPRFValues/first}}</code> output is
7458+
<code>HMAC-SHA-256(K=|CredRandom|, text=|salt1|)</code> [[!RFC2104]].
7459+
- The <code>{{AuthenticationExtensionsPRFOutputs/results}}.{{AuthenticationExtensionsPRFValues/second}}</code> output is
7460+
<code>HMAC-SHA-256(K=|CredRandom|, text=|salt2|)</code> [[!RFC2104]]
7461+
when |salt2| is present, and absent otherwise.
7462+
7463+
Note: Implementing on top of `hmac-secret` causes [=authenticator extension outputs=] that are not present otherwise.
7464+
These outputs are encrypted and cannot be used by the [=[RP]=],
7465+
but also cannot be deleted by the client since the [=authenticator data=] is signed.
7466+
74487467

74497468
: Extension identifier
74507469
:: `prf`

0 commit comments

Comments
 (0)