Conversation
…and back `AuthenticationExtensionsClientInputsJSON.hmacGetSecret` was parsed and then dropped: GetAssertionRequestExtensions had no field for it, so a caller of GetAssertionRequest::prepare could only ask for hmac-secret through `prf`, which the platform upgrades to userVerification=required (webauthn#2337). The pre-PRF client extension asks for the raw salts under the request's own userVerification, as browsers served it. It now reaches the CTAP request as GetAssertionHmacOrPrfInput::HmacGetSecret (prf wins when both are present) and the decrypted output comes back as `clientExtensionResults.hmacGetSecret`, not `prf`.
Author
|
I apologize, my agent went rouge and opened a PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AuthenticationExtensionsClientInputsJSON.hmacGetSecretis parsed by the IDL model but then dropped:GetAssertionRequestExtensionshad no field for it, so a caller ofGetAssertionRequest::preparecould only reach hmac-secret throughprf, which the platform upgrades touserVerification=required(#183 / webauthn#2337). The pre-PRF client extension asks for the raw salts under the request's ownuserVerification, as browsers served it.This wires it through: the JSON input becomes
GetAssertionHmacOrPrfInput::HmacGetSecreton the CTAP request (prfwins when both are present), and the decrypted output is returned asclientExtensionResults.hmacGetSecretinstead ofprf. Salts must be 32 bytes, as before (HMACGetSecretInput). Most of the diff is the new field in existing struct literals.Tests:
test_request_from_json_hmac_get_secret_extension(JSON parse, wrong-length salt refused) andhmac_get_secret_input_is_sent_raw_and_answered_as_itself(conversion, prf precedence). Verified end to end against a CanoKey emulated by QEMU withuserVerification: "discouraged": no PIN asked, the same salt agrees across assertions, another salt differs.Motivation: a desktop service that derives a device identity from the security key and wants touch-only assertions (the spec's PRF policy requires UV, which the key's PIN would satisfy at every use).