feat(webauthn): support hmac-secret-mc CTAP 2.2 extension (fix #147)#212
Draft
AlfioEmanueleFresta wants to merge 1 commit into
Draft
feat(webauthn): support hmac-secret-mc CTAP 2.2 extension (fix #147)#212AlfioEmanueleFresta wants to merge 1 commit into
AlfioEmanueleFresta wants to merge 1 commit into
Conversation
Enables PRF evaluation at MakeCredential time on authenticators that advertise hmac-secret-mc. Falls back gracefully to hmac-secret: true (PRF via GetAssertion) when the extension is unsupported. Wire format and processing reuse the existing GA hmac-secret path.
Member
Author
|
Smoke-tested against a YubiKey reporting CTAP 2.1 ( Credential created with |
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.
Adds CTAP 2.2
hmac-secret-mcsoprf.evalatcreate()time skips the GA round-trip on authenticators that advertise it. Falls back tohmac-secret: true(PRF via GA) when unsupported.Wire format and decryption reuse the GA
hmac-secrethelpers (CalculatedHMACGetSecretInput/Ctap2HMACGetSecretOutput).Ctap2MakeCredentialRequest::needs_shared_secretgates ECDH on advertised support + buffered input;hmac-secret-mcis never sent withouthmac-secret: true(§ 12.8). The PRF→HMAC salt mapping is extracted toPRFValue::to_hmac_secret_inputand shared with the GA path.Test plan
cargo test --workspace --all-features— 182 unit + 5 integrationcargo clippy --workspace --all-features --tests --examples -- -D warnings,cargo fmt --check --alltest_webauthn_prf_eval_at_create_degrades_when_unsupported)hmac-secret-mc— not available to me; reviewers welcome to validate