output-protection oracle · timing harness

HDCP + Timing Probe

Sweeps MediaKeys.getStatusForPolicy() across the HDCP ladder per key system to read the output environment, then times each call with a high-resolution clock. ClearKey answers from a constant; Widevine queries the OS inside the call — so the per-call latency delta is an independent read on what the CDM is actually doing. Cross-origin-isolate the page (ship the _headers) for the sharp counter clock.

Output-protection sweep

Per-call timing

Clock: when crossOriginIsolated is true, a spinning SharedArrayBuffer counter in a worker provides a sub-microsecond free-running wall clock, calibrated against performance.now(); otherwise everything falls back to performance.now() (5 µs-clamped without isolation, which is too coarse to separate the CDMs). The counter is a free-running clock, so it measures elapsed time across the async call regardless of event-loop yields. Workers are started only for the timing pass and terminated after.

Reading it: ClearKey's getStatusForPolicy is a constant comparison, so its marginal cost over the await-floor is essentially pure IPC round-trip. Widevine's queries the OS, so a marginal cost meaningfully above ClearKey's is the signature of real output-environment work happening inside the call — and that gap may move between bare metal and a VM/RDP session.

Raw readout (JSON)