Business · Product · Technology · AI

Separate passkey signature verification from challenge consumption

A Movo-X patient-passkey case tracing RP/origin checks, credential bytes, three signature algorithms, counter policy and the authoritative challenge lifecycle.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: valid credential bytes are only part of sign-in

A passkey sign-in depends on more than a well-shaped credential object. The application must interpret the reported origin and relying-party data, verify the assertion with the stored key and ensure the challenge is still valid for the intended operation. Those decisions cross a local cryptographic boundary and an authoritative state boundary.

The inspected Movo-X patient implementation performs selected byte and signature checks locally, then passes proof context to its sign-in operation. Eight isolated cases examine that path with synthetic keys and data. No actual browser, phone authenticator or patient account participates.

Distinguish the patient verifier from the staff JSON relay

The patient module reuses local credential-shape helpers but additionally parses client data and authenticator bytes. The separately reviewed staff-management routes relay their selected credential representation to a provider. These are different implementation paths and should not be described as if one helper performs every WebAuthn decision.

The patient parser requires its selected ceremony type, an accepted origin, a challenge representation and the expected relying-party hash. Existing fixtures exercise selected foreign-origin, wrong-RP, missing-user-verification and credential-identifier mismatches. They do not evaluate every possible browser or authenticator response.

Treat reported presence and verification flags precisely

The local checks require the selected user-presence and user-verification flags. The registration fixture also checks selected backup metadata and transport values returned by the parser. These are constructed authenticator-data inputs, not observations of a real biometric prompt or device interaction.

The source requests none attestation and does not rely on an attestation statement to establish authenticator vendor or model. A parsed public key and reported flags must therefore not become a claim that this research verified hardware provenance or watched a person complete an authenticator ceremony.

Apply a constrained parser without claiming complete CBOR conformance

The module contains a minimal definite-length CBOR decoder for its selected attestation and key representations. Existing cases refuse selected indefinite and truncated inputs. Supplemental cases check oversized array/map declarations and the selected nesting boundary.

Those results establish the exercised parser limits. They are not a complete CBOR conformance, fuzzing, memory-use or denial-of-service audit. The surrounding credential and request-size checks are separate constraints. Decoder acceptance also does not establish that a challenge belongs to the current account or remains unused.

Verify signatures with the selected stored public key

The assertion verifier builds the signed input from authenticator data and a hash of the raw client-data bytes. The existing P-256 fixture checks accepted signatures, a different key, missing verification and altered client data. Supplemental generated-key fixtures exercise RSA and Ed25519 branches and selected refusal cases.

The RSA case also checks the implementation’s refusal of a shorter key. These are local cryptographic interoperability fixtures, not a certification that every offered algorithm works with all target devices. The W3C verification procedure provides broader context for the ceremony checks; selected cases do not establish full implementation conformance.

Describe the counter rule without inventing a universal device identity

The inspected policy refuses a non-increasing signature counter when both stored and newly reported values are nonzero. Supplemental fixtures show that a zero value is handled differently and does not create a monotonic-counter guarantee.

A counter policy is only one part of evaluating an assertion. It should not be presented as definitive proof of a cloned device, a unique physical authenticator or a complete replay defence. The stored counter update and challenge state belong to the authoritative operation, and the local fixtures do not execute that database update.

Look up the key before accepting the proof

The sign-in route parses the assertion, asks its dependency for the selected stored credential key and verifies the signature before invoking the final sign-in operation. The injected route fixture checks that sequence and a forged-signature path that reaches lookup but does not proceed to successful sign-in.

That is a useful call-order boundary: a structurally valid object cannot bypass signature checking merely because a credential identifier exists. The fixture supplies the key lookup and final session responses. It does not prove current credential ownership, actual session creation or authoritative rejection of a reused challenge.

Consume challenges in the authoritative state protocol

The selected SQL lookup checks challenge hash, device context, purpose, expiry and unused state before returning credential metadata. A separate proof branch locks and checks challenge/key state, applies its selected counter rule and records consumption and the updated key metadata. Registration has its own purpose and session checks.

Those branches were reviewed in source without execution. The local registration helper returns a challenge hash for its caller to compare; it does not itself know the stored challenge. This separation should remain explicit when adding another sign-in or proof endpoint rather than treating a successful local parse as a complete authentication event.

A practical passkey acceptance package

Keep RP/origin, credential-identity, flag, parser-boundary, signature, tamper, counter and route-order fixtures. Execute authoritative tests for expired, consumed, wrong-device and wrong-purpose challenges and concurrent proof attempts. Then use controlled native and browser ceremonies to validate actual domain association, platform support and recovery behaviour.

For a CTO, the case makes representation, signature and challenge-state responsibilities independently reviewable. The pinned implementation and eight scoped cases establish selected local behaviour and inspected SQL design. They do not establish real authenticator acceptance, current account security or complete WebAuthn conformance.

Compare the reviewed boundaries

Independent passkey verification responsibilities

On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.

BoundarySelected evidenceFurther acceptance
Representation and RP/originConstructed credential and parser fixturesActual platform and domain-association behaviour
SignatureGenerated P-256/RSA/Ed25519 fixturesReal authenticator interoperability
Counter policySelected zero/nonzero casesAuthoritative update and policy evaluation
Challenge lifecycleRoute order fixture and SQL source reviewExecuted expiry, consumption and concurrency tests

Illustrative control flow

Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.

assertion = parse_expected_credential_and_client_data(input)
key = authoritative_challenge_and_credential_lookup(assertion)
require_valid_signature_and_selected_counter_policy(assertion, key)
result = authoritative_proof_consumption_and_session_operation(assertion)

# The local verifier does not decide whether a stored challenge is unused.
# A generated-key fixture is not a real authenticator ceremony.

Additional implementation references

These provider references explain current implementation context. Historical Movo-X observations remain tied to the source records described above.

About this engineering series

Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.

Explore the Movo-X engineering series → · Related implementation experience →

Discuss a similar engineering problem

Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.

Discuss your project on WhatsApp ↗
WhatsApp Omer about this project ↗