Browser requirements
- ? WebAssembly
-
? OPFS (
navigator.storage.getDirectory, secure context) - ? IndexedDB
-
? Web Locks (
navigator.locks) -
? WebCrypto Ed25519 (
crypto.subtlepresent; actual Ed25519 support is reported from the first verify) - ? WebGPU (optional, used by the capability profile only)
All Airplane Mode Labs demos share one browser origin (airplanemode-labs.github.io): storage, quota, estimate() and persist() are shared between them. This demo writes only under airplanemode-runtime.
Tested in Google Chrome. Firefox and Safari are not tested this sprint.
What this demo does not do yet
- No model is downloaded. The three assets are synthetic xorshift64* byte streams of 12, 8 and 6 MiB, generated at build time; they prove download, resume, hashing and eviction, not inference.
- Inference is not part of this page: the backend demo (models.html) detects your device tier and, only after you click, downloads a small test model and answers a prompt on WebGPU or WebAssembly. The assets here stay synthetic.
-
The fixture manifest carries no
expiresAtand is signed by a key generated for this build only, so it proves the verification path, not a publisher identity. - No key revocation, transparency log or Sigstore (security finding S1-001).
- Not yet: WebLLM (cut; revisit after the 8 GB measurement), Windows and 8 GB no-GPU measurements (not measured on 8 GB), revocation of a signing key, a real signing key.
-
This page can reach only its own origin (Content-Security-Policy
connect-src 'self', a Sprint 5 change): a manifest URL on another origin is refused in plain words before any request, because this origin also hosts the dockit demo's models. - The Tamper lab runs the vectors of manifest spec v0.1 against a trust set of two RFC 8032 public test keys that exists only inside the lab. It shows the refusals the spec publishes; it does not make a manifest trustworthy, and a real deployment's trust root is application configuration.
-
Chrome's real IndexedDB quota is unmeasured here; use the test quota field to see
eviction. Chrome under-reports IndexedDB usage in
estimate(). -
Resume after an interrupted download is verified on the local Range server and on
GitHub Pages (checked 9 Nov 2026:
Range: bytes=0-1023on the fixture answered 206 withAccept-Ranges: bytes). If a host ever answers 200 instead of 206, the download restarts from zero and is still hash-verified. - No service worker: offline after the first load is best effort (Chrome's HTTP cache), not guaranteed.
Settings
?store=.
Test hooks (window.__runtime) exist only on 127.0.0.1 / localhost; a hosted
page never exposes them.
Capability profile
detectCapabilities(): allow-listed device facts (cores, memory tier, storage
estimate, WebGPU adapter vendor and limits, WASM features). Never reads
navigator.userAgent.
Manifest verification
Manifest URL: ?. Trust root for this build:
? (keyId = sha256 of the raw Ed25519 public key).
Tamper lab
Each button runs the real verifier (or, for the two asset cases, the real asset manager)
over bytes copied verbatim from spec/vectors/tamper and
spec/vectors/tamper-assets (manifest spec v0.1 published in runtime/spec
(committed; public after the owner's push)). The verdict, reason code, per-signature
reasons and stage are what the library returns. Every case runs at the vectors' clock
(2026-11-14), on its own in-memory state and a fresh in-memory store: nothing here touches
this page's trust roots or its persistent storage.
RFC 8032 public test keys: demo only; allowTestKeys is false by default in the library
| Case | Run | Verdict | Reason | Signatures | Stage | Details |
|---|---|---|---|---|---|---|
|
Changed entry byte one hex digit of an entry's sha256 changed after signing |
||||||
|
Changed size an entry's size plus one, after signing |
||||||
|
Changed signature one bit of the signature flipped |
||||||
|
Swapped key key id and public key of key 2 over a signature made by key 1 |
||||||
|
Public key mismatch the key id names key 1, the embedded public key is key 2 |
||||||
|
Untrusted key validly signed by key 2, which is not in the trust set |
||||||
|
Truncated file the signed file cut at half its length |
||||||
|
Rollback version 1.0.0, validly signed, after 1.1.0 was accepted in the lab's own state |
||||||
|
Expired expiresAt 2026-11-10, before the vectors' clock |
||||||
|
Non-canonical signature S replaced by S + L, still 64 bytes |
||||||
|
Asset byte flip a valid manifest; one byte of the 4096-byte asset flipped |
||||||
|
Asset truncated a valid manifest; the asset is one byte short |
||||||
|
Valid manifest the unmodified base manifest: accepted |
||||||
|
Manifest for another product a validly signed manifest whose id is not the one this page expects: refused before the downgrade state is read |
Download, resume, verify
Each row drives one manifest entry through the asset manager:
ensure() downloads in 1 MiB chunks into a partial file, hashes while
streaming and commits only when the SHA-256 matches; getBlob() returns the
verified bytes.
This is a simulation: the page wraps fetch and cuts the response body after N
bytes of the first attempt, so ensure() fails with a network error. The next
ensure() reads the partial file and asks the server for the rest with a
Range header, which this page shows. A real refresh in the middle of a
download resumes the same way.
| Entry | Size | Progress | Resumed from | Actions |
|---|---|---|---|---|
| Load and verify a manifest first. | ||||
No Range header sent yet.
Storage
Only this demo's prefix is listed or touched: the OPFS directory
airplanemode-runtime/ and the IndexedDB database
airplanemode-runtime.
Quota and eviction
Without a test quota the manager plans against navigator.storage.estimate()
with the production headroom of 67108864 bytes (64 MiB). The walkthrough sets a 24 MiB
test quota and 1 MiB headroom, downloads demo-a (12 MiB) and demo-b (8 MiB), then demo-c
(6 MiB): 20 + 6 + 1 exceeds 24, so the least recently used entry is evicted.
Paste your own manifest URL
This page can only reach its own origin: its Content-Security-Policy is
connect-src 'self'. A URL from another origin is refused in plain words, with
AssetError code policy, before any request is made, so nothing
is fetched. The manifest must verify against one of the trust roots.
Events
airplanemode.event/0.1 records from the manager's in-memory ring buffer. They
never leave the page.