Result format, App Attest and evidence log
The exact format of a result, how Nod ID checks that a proof came from your genuine app, and the evidence log you can export.
1. Result format
GET /v1/sessions/<id>/result (customer backend, secret key). Additive: the keys customers already read stay.
{
"outcome": "verified",
"assurance": "substantial",
"unique": true,
"personCode": "<hex>",
"method": "passport_nfc",
"versions": { "circuit": "...", "vk": "...", "dscTree": "...", "sdk": "0.2.0" }
}
outcome:verified | not_verified | cancelled | technical_error.assurance:high | substantial | basic, present only whenoutcomeisverified, elsenull. Today every passport proof issubstantial.high(passport and face match) andbasic(OS age signal, estimation) arrive with those methods.unique:trueonly for passport methods and only when verified; elsefalse.personCode: only whenuniqueistrue; elsenull.method:passport_nfcwhen verified from a chip read during the request;passport_storedwhen the Nod ID app made the proof from stored chip data (a session created withfreshRead: true, or an app set to require a fresh read, refuses it);nullotherwise (other methods later).- Test mode (the Simulator, with a test key) never reaches your backend: its results carry
mode: "test",assurance: "test"andmethod: "test_sample", and never count as live. versions.sdk: the SDK version the phone reported ("unknown"for SDK 0.1.x). It is attested from 0.2.0 on (the assertion covers it); for older SDKs it is self-reported.- A result below the app's minimum assurance, or without
uniquewhen the app requires it, isnot_verified, decided when the proof is submitted, so the stored outcome, the counts and the evidence log agree. The host app learns no reason (rule 7).
Per-app settings (dashboard): minAssurance (basic | substantial | high, default basic), requireUnique (default false), testMode (default false), iosAppIds (list of TEAMID.bundle.id, needed for attestation).
2. App Attest on every passport proof
The attested app is the customer's host app (Team ID + bundle ID), not Nod ID. The customer adds the App Attest capability to their app and lists its App ID in the dashboard.
Byte definitions (all hashes SHA-256; || is concatenation; integers big-endian):
- Session nonce
N: the 32 bytes of the session'snonce. - Proof hash
PH = SHA256( "nodid.proof.v1" || path_utf8 || 0x00 || for each proof in order: u16(len(circuit)) || circuit_utf8 || u32(len(proof)) || proof_bytes )Raw proof bytes, never the JSON text. - Attestation challenge hash
CDH_att = SHA256( "nodid.attest.v1" || N ) - Assertion client data hash
CDH_as = SHA256( "nodid.assert.v1" || N || PH || sdk_utf8 )
Proof body (POST /v1/sessions/<id>/proof) adds:
{ "path": "...", "proofs": [...], "sdk": "0.2.0",
"attest": { "keyId": "<base64>", "assertion": "<base64>", "attestation": "<base64, first use of this key only>" } }
Verifier checks, in order:
- If
attestationis present: CBOR formatapple-appattest; certificate chain to a pinned Apple App Attestation root, valid at the verifier's clock; the leaf's extension1.2.840.113635.100.8.2holdsSHA256(authData || CDH_att);SHA256(leaf public key) == keyId;authData.rpIdHash == SHA256(appId)for one of the app'siosAppIds; counter 0; credential id equals the key id; AAGUIDappattest+ 7 zero bytes (production) orappattestdevelop(accepted only for apps in test mode). Idempotent: attesting an already stored key with the same public key is accepted and does not reset the counter. - Assertion: CBOR
{signature, authenticatorData};rpIdHashequal to the stored key's; counter strictly greater than the stored counter (updated in one atomicUPDATE ... WHERE counter < ?); ECDSA-SHA256 signature by the stored key overSHA256(authenticatorData || CDH_as). - Replay protection comes from the single-use session nonce (claimed before any check) plus the counter.
Attestation result recorded in the evidence log: pass, fail, skipped (test-mode app sent none), legacy (see below).
- Production app (testMode off): no valid attestation means
not_verified. - Test-mode app: attestation is optional and never blocks; the result is still recorded (
skippedorpass/fail). - SDK 0.1.x grace: verifier config
attest_grace_until(unix seconds). Until then a submission with noattestobject is accepted for production apps and recordedlegacy. After it, such submissions arenot_verified. Off by default. A submission that does carryattestis always checked fully. - Key store: key id, public key, counter, environment, rpIdHash. It has no link to sessions, person codes or evidence entries, and the key id is never written to the evidence log (rule 4).
3. Evidence log
One entry per verification outcome: every proof submission (verified or not) and every SDK report (cancelled, technical_error). A session that expires unused gets no entry (nothing was verified).
A separate hash chain per app (so a customer can verify their own entries alone and learns nothing about others).
Fields: seq (1, 2, 3 ... per app), ts (unix seconds), app, method (passport_nfc, or -), circuit (versions joined by +, or -), sdk (unknown when not reported, or -), assurance (or -), outcome, attestation (pass|fail|skipped|legacy|-), proofHash (hex of PH, or -). Never: country, identity data, IP, person code, key id.
Canonical line (ASCII, fields joined by |):
v1|<seq>|<ts>|<app>|<method>|<circuit>|<sdk>|<assurance>|<outcome>|<attestation>|<proofHash>
hash = hex SHA256( prev_hash_hex || "|" || line ), where prev_hash_hex is the 64 hex characters of the previous entry's hash (64 zeros for the first entry ever of that app). Check one in a shell: printf '%s|%s' "$prev" "$line" | shasum -a 256.
Retention: 13 months. Old entries are deleted from the front, so the oldest retained entry's prev is the anchor. The export carries anchor and verification starts there.
Dashboard: export own entries as JSON or CSV, and "verify chain" (recompute every hash, check the links, seq contiguous).