Skip to content

R08 — TOTP/HOTP vectors and atomic HOTP counter

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

R05/R07 passed; public RFC test secrets only; device isolated from real services; script generating test URI PNGs.

Steps

  1. Run uv run pytest -q tests/host/otp/test_hotp_totp.py and record all reference vectors/parameters. Import the RFC 4226 ASCII secret 12345678901234567890, HOTP SHA1/6 digits/counter 0.
  2. Generate ten times, confirming each generation, and compare against RFC 4226: 755224, 287082, 359152, 969429, 338314, 254676, 287922, 162583, 399871, 520489. Refuse an intermediate generation and verify no code is returned.
  3. For TOTP SHA1/SHA256/SHA512, use the test file’s secrets/results with dates accepted by CDC (2024–2100). Measure delay between TIME and display and calculate the vector for the observed period; the old RFC epoch of 59 seconds is not accepted by the production protocol.
  4. Cut power before/after HOTP generation, restart and verify an already displayed code is never reissued. Repeat after restoring an older backup of the same secret.
  5. Verify TOTP refresh at the period boundary and refusal when time is absent.

Expected result

Exact codes for algorithm/digits/period; persistent monotonic counter; no TOTP without time; restoring the same secret cannot roll HOTP backward.

Evidence to retain

Test URIs/images, code-by-code comparison, effective epoch and period boundary, power-cut/restore traces and public campaign counters.