Skip to content

R12 — AES-GCM, authentication and nonce uniqueness

Status: NOT EXECUTED as a complete hardware procedure — T2B1 and T3B1.

Use the shared acceptance record, with a separate result for every required model/OS. Host and emulator output remains separate evidence.

Preconditions

R01 passed; locally created disposable AES key with Every operation policy; physical PC/SC client implementing the complete AES-GCM annex; switchable power.

Steps

  1. Follow SELECT AID, MSE and PSO in ../protocols/aes-gcm-iso7816-v1.md. Encrypt/decrypt known data with empty and non-empty AAD; compare authenticated plaintext. Verify 12-byte nonce, 16-byte tag and 3584/256-byte limits.
  2. Corrupt tag, nonce, ciphertext and AAD separately, then decrypt: no plaintext portion may be released before failure. Test disabled keys, incorrect kid and excessive lengths; compare published status words.
  3. Accept, refuse and time out confirmations. Switch a key to Once per session; verify first consent, session authorisation and its loss after locking/re-enumeration.
  4. For the same key, collect at least 10,000 successful-operation nonces under session policy in the controlled test environment. Cut VBUS at 30 timings around counter reservation; after each restart collect again and compare all nonces. No duplicates are permitted.
  5. Restore an older backup on the same device and continue; its counter must not roll back. Test cross-device restoration and document the profile’s probabilistic inter-device prefix limitation without claiming absolute global uniqueness.
  6. Run uv run pytest -q tests/host/card/aes as complementary evidence, separate from physical testing.

Expected result

Exact round trips; tag/AAD verified before output; distinct observed nonces for a key; persistent reservations survive power loss; authorisation follows policy.

Evidence to retain

Actual client/script and parameters, vector hashes, responses/status words, nonce collection/duplicate check, power-cut and counter/restore traces. Never publish AES keys.