Apple App Attest · Solidity · Base Sepolia

App Attest on chain

App Attest lets an app create a device-backed signing key and ask Apple to certify it. Dsmack's verifier contracts check that certificate, record the approved key, and use it to verify later signed messages from the app.

This page explains that process, then walks through a Mac attestation recorded on 21 October 2026. Your browser recomputes checks on the recorded bytes below. It uses the embedded capture; it does not connect to the Mac or request a fresh attestation.

Concept artwork of a Mac mini in an abalone shell; not a photograph of the attestation run.

From an Apple-certified key to a signed action

An App Attest key is a signing key created for an app on an Apple device. The app keeps the private key on the device and shares its public key with a verifier. An attestation is Apple's signed evidence about that key and app. Enrollment is the verifier's one-time check of that evidence before it records the public key. An assertion is a later message signed by the enrolled key, binding an action to data chosen by the application.

Apple supplies a certificate chain: a leaf certificate for the app's key, an intermediate certificate that signed the leaf, and a trusted Apple root above it. Verifying the signatures links the app's public key to that root. The verifier also checks the app's identity, its approved code hash and the data the app asked Apple to bind to enrollment.

The application data is called clientData; its hash is clientDataHash. Apple's authData carries identity, key, counter and extension fields. The CDHash identifies the signed app's CodeDirectory, which describes its signed code. The deployed adapters compare that hash with their approved-build policy.

Contract setup, enrollment and verification

The four boxes below show the lifecycle, beginning with deployment of the root trust anchor. After deployment, the contract calls are endorseIntermediate once per intermediate, enroll once per app key, and verify for each signed action. A returning key needs the verification call, rather than the whole sequence. Gas figures are measurements from the live Base Sepolia run on 21 October 2026.

Apple packages an attestation as a CBOR map, a compact binary data format, containing the certificate chain, a fraud-service receipt and authenticator data. The client extracts the leaf certificate, authData and raw clientData before sending them to the contracts. The contracts use an entry id to refer to the intermediate certificate checked earlier.

P-384 and P-256 are the elliptic-curve signature schemes used by the certificate chain and app key. DER is the certificate's binary encoding. The Mac key ACL is its access-control policy. These terms appear in the checks below.

PinnedApple rootApp Attestation Root CA P-384 key, compiled into AppleEndorsements. Expiry 2045-03-15.deploy only
Once, anyoneendorseIntermediateSHA-384 and P-384 in Solidity check CA 1 against the root. Stores subject hash, key and validity under an entry id.15,141,525 gas
Once per keyenrollStrict-DER leaf parse, nonce, authData, App ID, CDHash, Mac key ACL, P-384 leaf signature. Stores the P-256 key.14,245,575 gas · ZK 4,498,881
Per actionverifyAssertion authData, counter strictly increasing, CDHash still admitted, P-256 signature via precompile 0x100.186,290 gas

Solidity is the language used for these Ethereum smart contracts. The enroll path performs the certificate and policy checks directly in contract code. The alternative zero-knowledge (ZK) proof path performs the leaf-certificate checks in a Noir circuit, a program whose execution can be proved, and gives the contract an UltraHonk proof to verify. Both enrollment paths accept the same attestations.

enrollLeafProof verifies that proof and compares its 24 public fields against the adapter's policy. This moves the leaf-check computation out of Solidity while preserving the contract's policy checks. The live leaf proof took 13.9 s and 2.97 GB on a 12-core Linux box.

Inspect the recorded Mac attestation

The CodeBindingProbe app generated this attestation on a Mac mini running macOS 27.0 (26A428). The key was enrolled on all three deployed adapters on 21 October 2026. Its clientData names the chain and both adapter addresses. The recorded fixture is fixtures/live-apple.json in the repo; key id 617beba0…1a62.

Hover over or tap a labeled field to see its meaning in the 280-byte enrollment authData. The check results underneath are recomputed locally with WebCrypto, your browser's cryptography API. They let you inspect this historical capture without starting the Mac app, connecting a wallet or sending a transaction.

Enrollment authData · 280 bytes
Hover or tap a field.
Recomputed in your browser with WebCrypto

Reference: Apple's nine validation steps

This table follows Apple's server-side validation recipe in its original order. Each Solidity entry links to the check and names the error returned when it fails. In the ZK column, “circuit” means the Noir leaf circuit enforces the check; “adapter” means the AppleAttestZK contract checks one of the proof's public fields.

#AppleSolidity enrollZK enrollLeafProof

Certificate and policy checks

The contracts enforce the following additional parsing and app-policy rules. The second column records fields and rules outside those checks, so an integrator can see the exact policy implemented by this version. DER is the certificate encoding; an OID is a numeric identifier for a certificate field or extension; an ACL describes the key's access-control policy.

Checked beyond Apple's list

  • Strict DER. Exact algorithm identifiers, v3 only, minimal non-negative integers, scalars in range, UTCTime profile, no trailing bytes, at most 16 extensions with no duplicates. Unknown extensions must be non-critical.
  • Leaf extension values. basicConstraints 3000, keyUsage 030204f0, and the Apple EKU 1.2.840.113635.100.4.24, all byte-exact.
  • Mac key ACL (OID 1.2.840.113635.100.8.6). The value must equal Apple's documented aclBlob for "SIP and full security mode enabled", outer wrapper included.
  • CDHash. apple_cd_hash_hash_01 must be present, 32 bytes, type SHA-256, and admitted by the adapter's policy, on enrollment and on every assertion.
  • Validation category (apple_validation_category_01) must equal the adapter's pin: 3, Apple Development, for the deployed adapters.
  • authData shape. ED flag required, reserved bits zero, byte-exact COSE key, canonical CBOR with a closed set of extension keys.
  • Time. Leaf, intermediate and root validity against block.timestamp. A key's expiry is the earlier of the leaf's and the intermediate's notAfter.

Fields and rules outside the checks

  • OID 1.2.840.113635.100.8.7 (OS version, build, platform). Present in every leaf and skipped as a non-critical extension.
  • OID 1.2.840.113635.100.8.5 (holds the App ID string among other fields). Skipped; the App ID is bound through the RP ID hash instead.
  • apple_bundle_version_01. Parsed and allowed, never compared. Apple says to check it on assertions. Mac captures don't carry it; the iPhone capture does.
  • The receipt. It is for Apple's fraud-metric service and never reaches the chain.
  • Low-s. High-s leaf signatures are accepted (the circuit normalizes to match). Assertions use the precompile, which doesn't enforce low-s either.
  • Intermediate issuer name and root expiry at endorsement time. Only the root signature binds the intermediate; root expiry is enforced later, in enroll and verify.
  • The measure offsets in CDRegistry aren't checked to point at __LINKEDIT and LC_CODE_SIGNATURE. Pass cd_args.py output verbatim.

Verifying later assertions

Once a key is enrolled, the app can sign an assertion for an action. The verifier checks the signature and a strictly increasing counter, which prevents the same assertion from being accepted twice. It also checks that the key is still valid and its app build is still approved.

verify(context, abi.encode(keyId, authData, r, s)) can be called only by the adapter's registry address. context is the clientDataHash the app passed to generateAssertion; the fixtures store its preimage, a short JSON string, and the caller hashes it. The contract checks the key is enrolled and unexpired, runs the same authData rules without the attested-credential part, re-admits the CDHash, requires the counter to go up, then calls P256VERIFY at 0x100 with sha256(sha256(authData ‖ context)). The 21 October 2026 run replayed assertion a1 and got assertion replay.

Because admission runs on every assertion, the registry adapter tracks the code that is approved now. Approving a new build with setBuild makes earlier CDHashes stop resolving, and keys enrolled under them stop verifying. A renamed and re-signed copy of the approved build is admitted through the open registerBuild without an owner transaction.

Reference values

Use this table to look up exact identifiers, certificate fields and deployed values. The labels distinguish contract constants, chain observations, capture contents and Apple documentation.

pinned compiled into a deployed contract on chain read from Base Sepolia capture observed in our attestations Apple Apple's certificate or documentation unverified not yet confirmed

Click a value to copy it.

NameValueStatusSource

Apple's own test vector

Apple publishes one worked iOS attestation in its Attestation Object Validation Guide. It passes our strict-DER leaf parse, the iOS ACL check and the P-384 signature under CA 1. enroll rejects it at three points:

  • certificate nonce: the sample's nonce is sha256(authData ‖ raw challenge), while the guide's text says sha256(authData ‖ clientDataHash).
  • auth flags: flags are 0x40, without the ED bit, although an extensions map follows.
  • missing extension: no apple_cd_hash_* entries. This one is our CDHash policy, which Apple doesn't require.

The first two look like errors in Apple's sample. Others have reported them in Apple developer forums thread 842509, along with a wrong public key hash in the guide's text and a bundle version shown as "1.0" that is "1" in the data.

Other verifiers on the same captures

For the October 2026 comparison recorded here, we ran three open-source App Attest verifiers on our five captures (three Mac, one iPhone, one Developer ID Mac). Each library's clock was set inside the leaf's three-day validity window. The versions listed below did not accept the complete macOS 27 or iOS 27 attestation-and-assertion flow as published; the table separates their attestation and assertion results.

LibraryAttestationsAssertionsWhy
webauthn4j-appattest 0.31.11 (Java)all 5 acceptedall rejectedApple sets the AT flag on assertions without credential data, and the parser underflows reading it.
takimoto3/app-attest v1.4.2 (Go)all rejectedall rejectedunknown key: apple_cd_hash_hash_01. Chain, nonce, key id and the Mac aclBlob all pass before that.
bas-d/appattest (Go, last commit 2022)all rejectedGo panicRejects the extension map after the COSE key; slice bounds panic on assertions.

With two diagnostic workarounds (clearing AT on a parse copy for webauthn4j; an 8-line patch adding the two CDHash keys to takimoto3), both libraries accept every capture our contract accepts and agree with it on chain, nonce, key id, credentialId, RP ID hash, AAGUID, counter and signature.

In that comparison, they were looser in four places: neither re-checks the CDHash on assertions, so assertions from a modified build pass; neither compares the authData key with the certificate key; neither stops accepting assertions when the leaf expires; and webauthn4j checks no ACL, category or CDHash. takimoto3 checks the Mac aclBlob (same value as ours) only through an unexported function, and reports the category without enforcing it.

One intermediate, many samples

In the research recorded through October 2026, Apple's public-key infrastructure (PKI) pages listed the App Attestation root but no intermediate. We decoded about 60 distinct real attestations published in GitHub repos, from August 2020 to October 2026, iOS 14.0 to 27.2 and macOS 27.0 and 27.0.1, development and production. Every one is issued by Apple App Attestation CA 1, serial 09bac5e1…0854, including Apple's own 2026 sample. That search found no "App Attestation CA 2". CA 1 expires on 13 March 2030; no successor announcement was found in that research. Leaf certificates used to be valid for 9 to 12 months and have been valid for 3 days since late 2025, so a successor would have to appear before leaves start outliving CA 1. The contract can add a successor through one more endorseIntermediate transaction.

The receipt has its own chain: Application Attestation Fraud Receipt Signing (valid about 13 months) → Apple Application Integration CA 5 - G1 → Apple Root CA - G3. The contracts don't use it.

Public macOS attestations: arkavo-org/authnz-rs (27.0, category 3), hellas-ai/hellas (27.0 beta, category 6 with CDHash, one assertion), Augustas11/macprovider (27.0.1, no extensions, two assertions) and amiller/abalone (27.0, category 3 with CDHash). iOS 27 samples are in webauthn4j issue 1497, webauthn4j's test resources, glincker/theauth and procivis/one-core. Older iOS fixture sets with assertions are in veehaitch/devicecheck-appattest, iansampson/AppAttest, appattest-rs and warden-supreme.

Shapes seen in those samples that a strict parser has to decide about: the ED flag is 0x40 in Apple's sample and in the macOS 27.0.1 sample but 0xc0 elsewhere; iOS 27 assertions set AT with no credential data (99 bytes); and the macOS 27.0.1 sample has no extensions even though its app opts in to the CDHash. Our contract requires ED and the CDHash, so it would reject the last one.

Questions left by the October 2026 captures

  • Does macOS 27.0.1 still put the CDHash in authData? The one public 27.0.1 sample has no extensions at all, not even the category. Its app declares the opt-in entitlement as the string "CDhash", where ours uses the array ["CDhash"], so the entitlement may be the cause rather than the OS. Our captures are 27.0.
  • The 8.7 sub-tags. Apple names 8.7 only as DeviceAttestationDeviceOSInformation, in xnu's CoreTrust header. Reverse engineering gives [1400] OS version, [1403] build, [1026] platform and [1029] build variant ("Beta", "Internal"); [1104], [1401] and [1418]–[1420] are unconfirmed.
  • 8.5 (DeviceAttestationKeyUsageProperties): [1204] is the App ID; [4] is 10 on every iOS sample and 13 on every Mac; the rest are unknown.
  • Whether to enforce apple_bundle_version_01 on assertions. Apple says to verify it and gives no comparison rule; every sample carries "1", Xcode's default CFBundleVersion. Mac captures don't carry it.
  • Whether to require 8.7. One reverse-engineering report says the device chooses which extensions go into the leaf.
  • A Developer ID build (category 6) needs its own adapter.