Technical guide

How to integrate device security signals

Integrate device security signals: verify origin with Android key attestation, check boot state and freshness, and test legitimate updates and adverse states.

  • Name the source

    Separate hardware-attested state, firmware evidence, management state and app observations before you assign trust to a signal.

  • Verify with attestation

    On Android, a key attestation certificate chain lets your server check boot state and lock state against a hardware-backed root.

  • Test state changes

    Exercise legitimate updates, delayed delivery and authorised adverse states against the same acceptance record.

Integrate a device security signal by proving where it came from before you act on it. On Android, the strongest proof is key attestation: the device generates a key in hardware-backed storage, and your server checks the certificate chain and the boot state, lock state and patch level it records. Then check that the observation is current, belongs to the right device and lifecycle, and is not a duplicate. Otukan Device Security supplies signals within an agreed model, chipset and integration scope. Managed Android, managed iOS and OEM firmware integrations each need their own scope record.

For the product context, see device integrity signals and Device Security.

Classify the source of each signal

Record which component observes the state, which transports it and which service decides what to do. A device identifier inside a message does not prove the message came from that device. An authenticated connection does not prove the observation inside it is true.

SourceWhat it can showHow you verify it
Hardware-backed attestationBoot state, bootloader lock, OS and patch level, app identityCertificate chain to a trusted root, checked on your server
Firmware or system componentState seen below the app layer, within the integrated modelsAuthenticated producer, signed payload, agreed contract
Management (MDM) stateEnrolment, policy compliance, configurationThe management server’s own records
App observationConditions seen from inside one appBound to platform attestation on the server

Keep these categories separate in your data. An app observation does not become hardware evidence because it is relabelled. iOS does not open its firmware to third parties, so managed iOS devices rely on management state and app-level evidence such as App Attest.

Verify Android device state with key attestation

Android Verified Boot builds a chain of trust from a hardware-protected root through the bootloader to the verified partitions. Key attestation lets your server read the result of that chain without trusting the operating system’s own report.

Generate an attested key

  1. Your server issues a random, single-use challenge.
  2. On the device, build a KeyGenParameterSpec with setAttestationChallenge(challenge) and generate the key in the Android Keystore. Request StrongBox with setIsStrongBoxBacked(true) where the device has it.
  3. Read the chain with KeyStore.getCertificateChain(alias) and send every certificate to the server.

Check the chain on the server

  1. Verify each certificate’s signature up to a Google hardware attestation root certificate published in the Android documentation. Keep that root list current.
  2. Check every certificate against Google’s attestation revocation status list.
  3. Parse the attestation extension (KeyDescription) in the leaf certificate. Confirm attestationChallenge equals the challenge you issued.
  4. Require an attestationSecurityLevel and a KeyMint (Keymaster) security level of TrustedEnvironment or StrongBox. A Software level proves nothing about the hardware.
  5. In the hardware-enforced list, read RootOfTrust:
    • verifiedBootState is Verified for a locked device running the manufacturer’s signed image. SelfSigned, Unverified or Failed mean a custom or broken boot chain.
    • deviceLocked shows whether the bootloader is locked.
    • verifiedBootKey identifies the key that signed the boot image; compare it with the values you expect for each model.
  6. Check osVersion, osPatchLevel, vendorPatchLevel and bootPatchLevel against your minimum, and attestationApplicationId against your app’s package and signing certificate.

The result is a hardware-rooted statement about the device at the moment of attestation. Store it with the device record and a timestamp, and repeat it when the device boots, updates or reaches a sensitive operation.

Define the interface contract

  1. Identify the models, chipsets, firmware builds and OS releases in the integration, and who may install or change each producer.
  2. Obtain the versioned contract and a redacted example. Map each value into your consumer’s internal representation.
  3. Specify the authenticated peer, trust roots, credential rotation and revocation. If payloads are signed, define verification and device binding separately from the transport.
  4. Separate read-only monitoring from services allowed to restrict a device or an operation.
  5. Reject malformed required data. Decide how unknown optional fields and unsupported versions are handled; never default them to healthy.
ConcernQuestion the implementation must answer
OriginWhich producer, device and control generated the observation?
MeaningIs the value an observation, an evaluation or an enforcement result?
Time and orderWhen was it observed, received and superseded?
CompletenessHow are unsupported, unavailable and failed checks shown?
VersionWhich schema and producer release define this meaning?
TrustWhat does the receiver verify before accepting it?

Process freshness, duplicates and errors

Test the receiver against fixtures first, then against the real producer. Fixtures prove your parser and decision logic; only a device proves detection.

  1. Validate the connection and any payload signature before parsing.
  2. Resolve the device binding and contract version. Send failures to a reviewable error state.
  3. Judge observation age by receipt time and attestation time, not by an unverified device clock alone.
  4. Deduplicate per the contract. Scope event keys to the producer and lifecycle; a reset or reassignment starts a new lifecycle.
  5. Never let a delayed observation overwrite newer evidence.
  6. Apply the agreed response only after these checks, and make repeated processing safe.

Keep a separate state for missing evidence. Lost connectivity, producer failure, revoked credentials and an unsupported control have different causes. None of them means “compromised”, and silence never means “trusted”. Set queue limits and an alert when delivery falls behind. Keep device identifiers out of broad application logs, and agree access, retention and deletion with fleet operations and privacy owners.

Test legitimate changes and adverse states

Pair each adverse scenario with a legitimate control on an authorised test device, and record the state change independently.

ExerciseAcceptance question
Unlocked bootloader or custom imageDoes attestation show deviceLocked false or a non-Verified boot state, and does the right consumer act?
Approved firmware or OS updateIs the new patch level accepted without an unjustified restriction?
Duplicate and delayed deliveryIs ordering kept without repeated action?
Revoked or expired producer credentialIs the evidence rejected with an actionable error?
Reset or reassignmentDoes old evidence stop influencing the new lifecycle?
Connection loss and restorationDoes missing evidence stay visible, and does recovery restore a coherent state?

Repeat installation, update, authentication and the sensitive workflow after every integration change. Test restrictions and their removal, not only the presence of a signal in a log.

  • Tested model, chipset, firmware and OS are recorded.
  • Expected observations and actions are agreed before the run.
  • Each decision traces back to an authenticated or attested source.
  • Recovery restores service without reusing stale trust.

For related reading, see hardware-backed mobile security and Android bootloader integrity.

Further reading

Common questions

  • Does a device identifier in a message prove which device sent it?

    No. A device identifier inside a message does not prove the message came from that device, and an authenticated connection does not prove the observation inside it is true. Record which component observes the state, which transports it and which service decides what to do.

  • What should the server check in an Android key attestation chain?

    Verify each certificate up to a Google hardware attestation root and against Google's revocation status list, confirm attestationChallenge matches, and require TrustedEnvironment or StrongBox security levels. Then read RootOfTrust (verifiedBootState, deviceLocked, verifiedBootKey), the patch levels and attestationApplicationId. A Software level proves nothing about the hardware.

  • Can managed iOS devices supply firmware-level signals?

    No. iOS does not open its firmware to third parties, so managed iOS devices rely on management state and app-level evidence such as App Attest. Managed Android, managed iOS and OEM firmware integrations each need their own scope record.

  • Does missing evidence mean a device is compromised?

    No. Lost connectivity, producer failure, revoked credentials and an unsupported control have different causes, and none of them means compromised. Silence is not a pass either. Keep a separate state for missing evidence, set queue limits and alert when delivery falls behind.

  • When should Android key attestation be repeated?

    When the device boots, updates or reaches a sensitive operation. The result describes the device at the moment of attestation, so store it with the device record and a timestamp. Judge observation age by receipt time and attestation time, not by an unverified device clock alone.

Connect device evidence to operational decisions

Tell us whether you are an OEM or institution, the models and platforms involved, and your integration role. We do not ask for firmware images, credentials or production data.

Or request a technical demo