Every real OTA update chain runs two independent checks before a device ever flashes new firmware:
verify(pkg) = HMAC_K(payload ‖ version) == pkg.signature
accept(pkg) = verify(pkg)
AND (version(pkg) > counter(device)) // if anti-rollback armed
counter(dev) ← max(counter(dev), version(pkg)) // monotonic, never decreases
- Signature verification — the publisher signs payload+version with a private key; the device only trusts a signature it can verify against its embedded public key. A tampered or attacker-forged package fails this check regardless of its claimed version.
- Anti-rollback counter — a monotonic counter burned into secure storage (often e-fuses) remembers the highest version ever installed. Even a validly signed old package is rejected if its version isn't strictly greater — this is what stops an attacker from "downgrading" a patched device back to a build with a known CVE.
- Staged rollout — the batch slider mimics canary deployment: push to a slice of the fleet first, watch for failures, then widen the wave, instead of flashing every device at once.
Staged rollout maths. If each wave reaches a random fraction p of the still-eligible devices, the unpatched share after k valid waves is (1-p)^k, so coverage = 1-(1-p)^k. The coverage box compares that expectation with the actual fleet. Honest simplifications: the "signature" is a non-cryptographic FNV-1a hash used only to make forged and genuine packages distinguishable; real devices use asymmetric signatures (e.g. Ed25519/ECDSA) verified against a key in ROM, a hardware-backed counter, and an A/B partition with automatic rollback on a failed boot. Transport, key rotation and device failures are not modelled. This is an educational model of defence only.
Try disabling each toggle separately: with signature checking off, a tampered package flashes clean; with anti-rollback off, a signed-but-old package silently reintroduces the vulnerability the update fleet had already patched.