From 94181d58cf66c5b7b263fd435a344f1cd8872cff Mon Sep 17 00:00:00 2001 From: cirakg Date: Sun, 18 Oct 2026 23:44:18 +0200 Subject: docs: record M2 results and bump version to 0.2.0 CHANGELOG 0.2.0; PERFORMANCE (simulator benchmarks and what they mean for the watch); TESTING (vector sources, M2 results, watchdog caveat); FEASIBILITY (verified: no native HMAC-SHA1, AES-256 works, Long semantics); README status and targets; developer-guide Monkey C facts. Co-Authored-By: Claude Opus 5.5 --- docs/PERFORMANCE.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs/PERFORMANCE.md') diff --git a/docs/PERFORMANCE.md b/docs/PERFORMANCE.md index 2e668c2..daab3c2 100644 --- a/docs/PERFORMANCE.md +++ b/docs/PERFORMANCE.md @@ -25,6 +25,24 @@ The targets are in [README section 18](../README.md#18-performance-budgets). Thi ## Results +### M2, 2026-10-18 (version 0.2.0, crypto and OTP primitives) + +`test/BenchTest.mc`, simulator in Docker, average per call (identical within noise on all four test devices): + +| Operation | Time | Notes | +| --- | --- | --- | +| TOTP, SHA-1 | 0.35 ms | HMAC built on the native SHA-1 | +| TOTP, SHA-256 | 0.05 ms | Native HMAC-SHA256 | +| TOTP, SHA-512 | 17.5 ms | SHA-512 in Monkey C; was 27.9 ms before inlining the rotations | +| PBKDF2, 1000 iterations | 52 ms | Was 89 ms before removing the per-iteration wipe; native HMAC alone is about 3 ms | +| Seal + open a record | 0.25 ms | AES-256-CBC + HMAC-SHA256, two HKDF key derivations cached | +| Start-up self-test | 6.7 ms | All known-answer tests | +| PBKDF2 calibration for 1 s | about 12,000 iterations | In the simulator; the watch will choose far fewer | + +`make perf` and `make memtest` with the larger app: in-app start-up 1 to 7 ms; launch to first frame rose from 6.5 s to 10.5 s, because `monkeydo` now sends a larger debug program (crypto code and debug information), still under its 15 s guard. Memory after the first frame: 2.3 % (768 KB watches) to 3.4 % (Forerunner 255S). The signed package for 72 products is 1.5 MB. + +What this means for the watch, to be confirmed with the on-watch benchmark in M4: the simulator runs on a desktop CPU, so absolute times will be many times higher on the Forerunner 70. The ratios hold: SHA-512 entries cost about 50 times as much as SHA-1 entries, and Monkey C loop overhead, not the native HMAC, dominates PBKDF2. If the watch manages fewer than 2,000 PBKDF2 iterations per second, unlocking takes longer than the 1 s target (the lower bound is kept for security); M8 can move more of the XOR work into native calls. + ### M0, 2026-10-18 (version 0.1.0, placeholder app) Simulator in Docker on your PC (12 cores), debug builds: -- cgit v1.2.3