AttestationChallenge
Represents a challenge for an attestation ceremony, including freshness, key-generation hints, the required DataAuthentication mode, and optional client-provided values that must be bound to the attestation.
The class provides serialization support for its fields and enforces strict requirements, such as the maximum size of the nonce. It includes both diagnostic and functional properties to support attestation protocols and ensure client compliance with server requirements.
Throws
If the nonce exceeds 128 bytes or is shorter than 4 bytes
Constructors
Types
Describes one client-provided value requested by the verifier.
Lets the verifier describe an ordered list of client-provided values carried in one dedicated CertificationRequestInfo attribute.
Properties
Optional user-defined payload.
The endpoint to post the signed CSR or unsigned TBS CSR containing the attestation proof to.
How the client authenticates the TBS CSR contents. DataAuthentication.Signature also proves possession of the private key; DataAuthentication.Hash binds the data through the platform attestation nonce without signing.
Whether to include a generic make and model (such as "Google Pixel 8", or "iPhone 16" with the attestation proof). Setting this to an OID other than null will include a device name on a best-effort basis. Defaults to null (i.e., no device name will be included).
The issuing time of the nonce. Useful to detect clock drifts and exit early. This is not considered sensible information, as clocks must be in sync anyhow.
Specifies key constraints for the client
The nonce chosen by the server. Must be at most 128 bytes long, as this is the largest nonce size supported by Android.
Ordered client-provided values to bind to the attestation. The values are stored under CertificationRequestAttributeAttestationDescriptor.oid and decoded according to CertificationRequestAttributeAttestationDescriptor.attributes.
Optional runtime-only attachment for application state.
How long this nonce is considered valid.
Lazily-evaluated property
Indicates the wire format version; needs to default to null for the default serializer to handle it correctly. The public constructor sets this to CURRENT_VERSION.