App protection

App attestation vs device attestation

What app attestation and device attestation each prove, what neither tells you about the user, and how a backend should verify freshness and decide.

App attestation asks whether a request came from your genuine, unmodified app. Device attestation asks whether the phone it runs on is genuine hardware in an expected state: a locked bootloader, a verified operating system, a hardware-backed key. Each answers a different question, and neither tells you who the user is or whether the session has been hijacked. Useful attestation combines both kinds of evidence, binds them to the request, and lets your server decide. This article covers Android and iOS, which offer different platform services and must be treated separately.

App attestation asks

  • Is this my code, signed with my key?
  • Has the package been repackaged or modified?
  • Was it installed through an expected channel?
  • Is this a genuine instance of my app?

Device attestation asks

  • Is this genuine hardware?
  • Is the bootloader locked and the OS verified?
  • Is the key held in hardware-backed storage?
  • What is the device's patch level?
Two different questions. A server that trusts one answer for the other trusts something that was never measured.

Four kinds of evidence

People say “attestation” for several different claims. Separating them avoids trusting a result for something it never measured.

Application evidence

This says the code is yours: signed with your key, not repackaged, installed through an expected channel. On Android, the Play Integrity API returns an app integrity verdict that states whether Google Play recognises the package and certificate. On iOS, App Attest creates a key in the Secure Enclave and has Apple certify that the key belongs to a genuine instance of your app.

Environment evidence

This describes the running state: is the device rooted or jailbroken, is a debugger attached, is a hooking framework loaded, is it an emulator. Platform verdicts give a coarse view. In-app runtime checks see much more, but they run on the same device as the attacker, so their results must travel to the server as evidence rather than as a verdict.

Hardware evidence

This is device attestation in the strict sense. On Android, key attestation produces a certificate chain from the hardware-backed key store that describes the key and the device’s verified boot state and patch level. It proves properties of the device and the key. The certificate also names the package and signing certificate of the app that created the key, as the operating system reports them, but it says nothing about whether that app’s code was altered at runtime.

Identity evidence

Attestation does not authenticate a person. A stolen password typed into a genuine app on a genuine phone passes every check above. Account and session identity come from your login, step-up and device binding design.

Platform attestation services
  1. 2016

    Android key attestation

    Introduced with Android 7.0: a hardware-backed key store can certify its keys and the device's boot state.

  2. 2020

    App Attest on iOS

    Introduced with iOS 14: a Secure Enclave key that Apple certifies as belonging to a genuine instance of the app.

  3. 2021

    Play Integrity API

    Google announces a single API for app, device and licensing verdicts, succeeding the SafetyNet Attestation API.

Verification: freshness and the relying party

Evidence is only as good as the server that checks it. The relying party is your backend or gateway, and the app never tells the server whether it passed.

  1. Server issues a challenge

    A single-use value, or a hash of the request the app is about to send.

  2. App collects evidence

    Platform attestation plus in-app runtime evidence, bound to the challenge.

  3. Evidence travels with the request

    The app forwards it; it never computes its own verdict.

  4. Server verifies

    Signatures, challenge match, validity window, single use.

  5. Server decides per endpoint

    Allow, step up, limit or refuse, and log the result.

A generic verification sequence. Freshness comes from the server's challenge; the decision stays on the server.
  • Issue a challenge. Your server creates a single-use value, and the evidence must include it or a hash of the request.
  • Check it where the attacker cannot. Verification runs on your side, never in the app.
  • Limit its life. Evidence carries a short validity window and is accepted once, across every backend instance.
  • Decide per endpoint. A balance read and a payee change deserve different thresholds and different failure responses.
  • Log the failures. Rejected evidence, replays and emulator signals are the early warning your fraud team needs.

Choosing what to rely on

Evidence sourceShowsLeaves unknownDepends on
Play Integrity (Android)App recognised by Google Play; device verdict tierRuntime hooking after the check; the userGoogle Play services and Google’s servers
App Attest (iOS)Key belongs to a genuine instance of your app on Apple hardwareJailbreak state; runtime tampering; the userApple’s servers and supported devices
Android key attestationHardware-backed key; boot, lock and patch state; the package that created the keyRuntime tampering inside the app; the userA hardware-backed key store on the device
In-app runtime checksReports hooking, debugging, emulators, root or jailbreak and code changes, as evidence for the serverThe userProtection built into your release
Login and step-upWho is actingWhether app or device is genuineYour identity design

Read the “Leaves unknown” column first. Every row has a gap, and the user appears in all but the last. That is why sound designs combine sources rather than pick one.

Operational boundaries

Platform services have availability and quota limits, they need network access, and they do not exist on every device. Some markets use phones without Google Play services. Plan a fallback tier, test the failure path in observe mode before enforcing, and keep one verification contract for both platforms so your backend team does not maintain two logic trees.

Before you enforce

  • List the endpoints that need evidence, and the failure response for each.
  • Confirm every piece of evidence is bound to a server challenge or a request hash.
  • Reject reused evidence across all backend instances, not only the one that saw it first.
  • Decide the trust tier for devices without Google Play services.
  • Run in observe mode and review the failure rate before switching to enforcement.

How Otukan brings the evidence together

Otukan gives your backend fresh, request-bound evidence that keeps app authenticity, device environment and request freshness as separate results. It works alongside Play Integrity on Android and App Attest on iOS, and labels which evidence came from the platform and which from Otukan’s own runtime checks for root, jailbreak, hooking, debugging and emulators.

Flutter and React Native apps are protected too, scoped per platform. The product control is covered on mobile app attestation.

Common questions

  • Does attestation replace user login or multi-factor authentication?

    No. Attestation tells your server about the software and hardware that produced a request. It says nothing about the person holding the phone. A genuine app on a genuine device can still be used by someone who stole a password or who is being coached by a scammer, so attestation belongs next to authentication, not in place of it.

  • What happens on devices without Google Play services?

    Play Integrity depends on Google Play services, so some devices cannot produce its verdicts. Decide in advance which trust tier those requests receive. Otukan supports a fallback policy for devices where platform attestation is unavailable.

  • Can an attacker replay a valid attestation token?

    Replay is possible unless your server prevents it. Bind each piece of evidence to a server-issued challenge or to a hash of the request, give it a short validity window, record it as used, and reject it the second time. Replay defence is a property of your verification design.

  • Should the app decide whether it passed?

    No. The app runs on a device the attacker may control, so a verdict computed on the phone can be edited before it is sent. The app collects evidence and forwards it; the server verifies it and decides. That split is what makes attestation worth having.

Keep reading

Know which requests you can trust

Tell us your platforms, the endpoints you want to protect and whether some users run devices without Google Play services. We never request binaries, signing keys or production credentials.

Or request a technical demo