validateAssertionOverChallenge
abstract fun validateAssertionOverChallenge(validatedAttestation: ValidatedAttestation, assertion: ByteArray, expectedChallenge: ByteArray, lastSeenCounter: Long, maxCounterAdvance: Long = Long.MAX_VALUE): Result<Assertion>(source)
Verifies an assertion whose entire client data is expectedChallenge, tied to validatedAttestation.
The client must pass SHA-256(expectedChallenge) as clientDataHash to generateAssertion. App Attest does not include the challenge or client data in the assertion; verification succeeds because the assertion signature is reconstructed using expectedChallenge. The caller must obtain the expected challenge from trusted server-side state and enforce its expiry and single use.
Parameters
validatedAttestation
the previously validated attestation
assertion
the assertion to validate
expectedChallenge
the server-issued challenge used as the complete client data
lastSeenCounter
the counter of the last validated assertion
maxCounterAdvance
the maximum permitted counter advance since lastSeenCounter