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¶
- Run
uv run pytest -q tests/host/otp/test_hotp_totp.pyand record all reference vectors/parameters. Import the RFC 4226 ASCII secret12345678901234567890, HOTP SHA1/6 digits/counter 0. - 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.
- 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.
- 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.
- 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.