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 when outcome is verified, else null. Today every passport proof is substantial. high (passport and face match) and basic (OS age signal, estimation) arrive with those methods.
  • unique: true only for passport methods and only when verified; else false.
  • personCode: only when unique is true; else null.
  • method: passport_nfc when verified from a chip read during the request; passport_stored when the Nod ID app made the proof from stored chip data (a session created with freshRead: true, or an app set to require a fresh read, refuses it); null otherwise (other methods later).
  • Test mode (the Simulator, with a test key) never reaches your backend: its results carry mode: "test", assurance: "test" and method: "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 unique when the app requires it, is not_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's nonce.
  • 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:

  1. If attestation is present: CBOR format apple-appattest; certificate chain to a pinned Apple App Attestation root, valid at the verifier's clock; the leaf's extension 1.2.840.113635.100.8.2 holds SHA256(authData || CDH_att); SHA256(leaf public key) == keyId; authData.rpIdHash == SHA256(appId) for one of the app's iosAppIds; counter 0; credential id equals the key id; AAGUID appattest + 7 zero bytes (production) or appattestdevelop (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.
  2. Assertion: CBOR {signature, authenticatorData}; rpIdHash equal to the stored key's; counter strictly greater than the stored counter (updated in one atomic UPDATE ... WHERE counter < ?); ECDSA-SHA256 signature by the stored key over SHA256(authenticatorData || CDH_as).
  3. 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 (skipped or pass/fail).
  • SDK 0.1.x grace: verifier config attest_grace_until (unix seconds). Until then a submission with no attest object is accepted for production apps and recorded legacy. After it, such submissions are not_verified. Off by default. A submission that does carry attest is 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).