open-standards/wai/wai-key-proxy
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science f004aa4f9c
Some checks failed
joule-moq-remote host agent / joule-moq-remote · does this change touch it (pull_request) Successful in 11s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 6s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 6s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 1m38s
energy meters on real hardware / RAPL and NVML on jetson-hub (pull_request) Successful in 44s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 26s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 21s
wai cross-architecture byte-equality / does this change touch it (pull_request) Successful in 18s
WAI conformance / does this change touch it (pull_request) Successful in 17s
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (pull_request) Successful in 1m9s
WAI energy receipts / does this change touch it (pull_request) Successful in 21s
wai formal verification (integer core) / does this change touch it (pull_request) Successful in 21s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 2m1s
WAI HTTP delivery / WAI HTTP · does this change touch it (pull_request) Successful in 15s
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 16s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Successful in 1m48s
wai-key-proxy / does this change touch it (pull_request) Successful in 12s
wai-ledger service / does this change touch it (pull_request) Successful in 10s
WAI neural decoders end-to-end / does this change touch it (pull_request) Successful in 10s
WAI neural sink gates / does this change touch it (pull_request) Successful in 9s
wai-ops-gpu integer operators on GPUs / does this change touch it (pull_request) Successful in 11s
wai-ops-npu integer operators on neural processors / does this change touch it (pull_request) Successful in 10s
wai-ops integer operators / does this change touch it (pull_request) Successful in 10s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 9s
wai-quantum command line / does this change touch it (pull_request) Successful in 7s
wai-quantum CUDA member / does this change touch it (pull_request) Successful in 6s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 2m56s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Has been skipped
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Has been skipped
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 6s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Has been skipped
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Has been skipped
wai-quantum signal processor / does this change touch it (pull_request) Successful in 6s
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Has been skipped
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Has been skipped
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 7s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Has been skipped
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Has been skipped
wai-quantum HIP member / does this change touch it (pull_request) Successful in 7s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Has been skipped
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Has been skipped
wai-quantum Metal member / does this change touch it (pull_request) Successful in 7s
wai-quantum Metal member / member · Metal (macos) (pull_request) Has been skipped
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Has been skipped
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 6s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Has been skipped
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Has been skipped
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 8s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Has been skipped
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Has been skipped
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 7s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Has been skipped
wai-quantum OpenCL member / member · OpenCL GPU (framework-128gb) (pull_request) Has been skipped
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Has been skipped
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Has been skipped
wai-quantum-qpu / does this change touch it (pull_request) Successful in 9s
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Has been skipped
wai-quantum service / does this change touch it (pull_request) Successful in 8s
wai-quantum service / service · linux (pull_request) Has been skipped
wai-quantum service / service · macos (pull_request) Has been skipped
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 7s
energy meters on real hardware / sink decode table · RAPL on jetson-hub (NVML surveyed) (pull_request) Successful in 2m43s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Has been skipped
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Has been skipped
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 7s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 7s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Has been skipped
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been skipped
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 7s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Has been skipped
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Has been skipped
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Has been skipped
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Has been skipped
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 8s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Has been skipped
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Has been skipped
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Has been skipped
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 3m43s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Has been skipped
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 7s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Has been skipped
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Has been skipped
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Has been skipped
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Has been skipped
energy meters on real hardware / sink decode table · per-task energy and the GPU rail on macOS (pull_request) Successful in 3m51s
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Successful in 8s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 9s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 10s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 2m48s
wai-ops-npu integer operators on neural processors / neural processor (framework-128gb silicon) (pull_request) Successful in 9s
wai-web wasm32 / does this change touch it (pull_request) Successful in 17s
joule-code conformance gate / joule-moq-relay, every target (pull_request) Successful in 4m27s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 4m33s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 5m8s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 5s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 1m13s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m10s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 6m47s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 2m28s
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Failing after 6m26s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 32s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Successful in 2m50s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 23s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 34s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 5m55s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 6m9s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 3m58s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 32s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 3m52s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 31s
wai formal verification (integer core) / every harness in one shard (pull_request) Successful in 13s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m19s
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m49s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 1m11s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 8m21s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 1m54s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 7m57s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 8m49s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 11m37s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 13m26s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 32s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m18s
wai formal verification (integer core) / kani (plan) (pull_request) Successful in 8m39s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 10m14s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 12m13s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 18m49s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 15m28s
wai formal verification (integer core) / kani (stage) (pull_request) Successful in 3m37s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 10m22s
wai formal verification (integer core) / kani (sound) (pull_request) Successful in 11m7s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 19m16s
wai-key-proxy / proxy · linux (pull_request) Successful in 1m5s
wai formal verification (integer core) / kani (arith) (pull_request) Successful in 14m12s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 8m23s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Successful in 1m19s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 19m31s
wai-ledger service / service · linux (pull_request) Successful in 1m34s
wai-ledger service / service · macos (pull_request) Successful in 49s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m26s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 20m27s
wai formal verification (integer core) / kani (integer-core) (pull_request) Successful in 5m39s
wai-ops integer operators / wasm32-wasip2 (wasmtime) (pull_request) Successful in 32s
wai-ops integer operators / linux-x86_64 (pull_request) Successful in 1m21s
wai-ops integer operators / independent checker (Python) (pull_request) Successful in 13s
wai-ops integer operators / macos-arm64 (pull_request) Successful in 59s
wai-ops integer operators / wasm32 under Node (pull_request) Successful in 21s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 6m43s
wai-ops-gpu integer operators on GPUs / builds · no adapter is not a pass (linux) (pull_request) Successful in 3m48s
wai-quantum command line / command line · linux (pull_request) Successful in 1m32s
wai-pack / wai-pack · linux (pull_request) Successful in 1m55s
wai-pack / wai-pack · macos (pull_request) Successful in 2m53s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 2m48s
WAI HTTP delivery / HTTP corpus · falsify patches 0/3 (pull_request) Successful in 6m22s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m17s
wai-quantum command line / command line · macos (pull_request) Successful in 59s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m23s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m25s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 2m45s
wai-ops-gpu integer operators on GPUs / Metal GPU and browser WebGPU (macos) (pull_request) Successful in 10m34s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 6m9s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m24s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 5m34s
wai formal verification (integer core) / kani (rans64-t2) (pull_request) Successful in 17m37s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 2m0s
WAI HTTP delivery / HTTP corpus · falsify patches 1/3 (pull_request) Successful in 6m42s
wai formal verification (integer core) / kani (stage-long) (pull_request) Successful in 20m51s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 3m7s
WAI HTTP delivery / HTTP corpus · falsify patches 2/3 (pull_request) Successful in 6m39s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 7m23s
WAI HTTP delivery / HTTP corpus · falsify mutations 0/3 (pull_request) Successful in 33m34s
WAI HTTP delivery / HTTP corpus · every patch and mutation in exactly one shard (pull_request) Successful in 44s
WAI HTTP delivery / HTTP corpus · falsify mutations 1/3 (pull_request) Successful in 32m51s
WAI HTTP delivery / HTTP corpus · verified both ways, and the differential (pull_request) Successful in 3m19s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 15m52s
wai-ops-npu integer operators on neural processors / builds · no device is not a pass (linux-arm64) (pull_request) Successful in 46s
WAI HTTP delivery / HTTP corpus · falsify mutations 2/3 (pull_request) Successful in 32m24s
WAI HTTP delivery / cache rules · controls and labelled caches (pull_request) Successful in 2m14s
wai-ops integer operators / linux-aarch64 (pull_request) Successful in 1m36s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 27s
wai formal verification (integer core) / kani (isqrt512) (pull_request) Successful in 46m45s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m49s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m22s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 2m33s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 7m8s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 58m51s
wai-audit, wai-key-proxy, wai-ledger: their locks on wai-quantum 0.6.16, as #498 moved it (#474, #471, #473)
Each lock resolves its path dependency's new version and nothing else (cargo
metadata, resolve only).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 18:47:47 -04:00
..
src wai-key-proxy: the signing proxy and key server of extensions/key-release.md 2026-10-25 21:41:51 -04:00
tests wai-key-proxy: the signing proxy and key server of extensions/key-release.md 2026-10-25 21:41:51 -04:00
Cargo.lock wai-audit, wai-key-proxy, wai-ledger: their locks on wai-quantum 0.6.16, as #498 moved it (#474, #471, #473) 2026-10-26 18:47:47 -04:00
Cargo.toml wai-key-proxy: the signing proxy and key server of extensions/key-release.md 2026-10-25 21:41:51 -04:00
README.md wai-key-proxy: the signing proxy and key server of extensions/key-release.md 2026-10-25 21:41:51 -04:00
smoke.sh wai-key-proxy: the signing proxy and key server of extensions/key-release.md 2026-10-25 21:41:51 -04:00

wai-key-proxy

A signing proxy in front of any licence server, and the key server it hands clear keys to. It is the service of extensions/key-release.md.

For every licence request it answers, the proxy signs a receipt: a release or a refusal. The decision is computed from signed inputs, so anyone holding the receipts recomputes it: the viewer's entitlement (signed by the operator's entitlement authority and bound to a key the viewer's device holds), the device's signature over the request, the content's commitment list (signed by whoever holds the content keys, and derived from the CPIX document the keys came in), the proxy's clock and the receipts before it. A licensor checks that keys went only to entitled, unexpired sessions from the log, not from a statement.

The proxy holds no content key:

  • each key_commit it signs is copied from the key holder's commitment list;
  • a content protection system's licence carries the key encrypted for the client's decryption module, and the proxy forwards it unchanged;
  • a key the client gets in the clear (an HLS key file, a Clear Key licence) is never relayed: the proxy answers 307 with a release ticket, and the key server, run by the key holder, redeems the ticket once.

A refused request never reaches the licence server.

Run it

cargo build --release
B=target/release/wai-key-proxy

$B keygen holder.key          # the key holder's signing key; prints its public key
$B keygen authority.key       # the entitlement authority's
$B keygen proxy.key           # the proxy's

# A commitment list from the CPIX document the packager and the key server exchanged:
$B list title.cpix.xml svod:premium holder.key https://packager.example title.wkl1

$B serve proxy.json           # the proxy
$B keyserver keys.json        # the key server, for HLS key files and Clear Key

proxy.json:

{
  "listen": "127.0.0.1:9710",
  "admin_listen": "127.0.0.1:9711",
  "signer_key": "/var/lib/wai-key-proxy/proxy.key",
  "signer_id": "https://keys.operator.example",
  "authorities": ["<entitlement authority public key, hex>"],
  "lists": ["/var/lib/wai-key-proxy/lists/title.wkl1"],
  "routes": [
    {"name": "title.a", "content_id": "title-0001", "delivery": "drm",
     "system_id": "<the content protection system's DASH-IF system ID>",
     "upstream": "http://127.0.0.1:9720/licence",
     "upstream_headers": {"<a header the licence server expects>": "<its value>"}},
    {"name": "title.hls", "content_id": "title-0001", "delivery": "hls-key-uri",
     "key_url": "https://keys.operator.example/v1/key"}
  ],
  "log": "/var/lib/wai-key-proxy/receipts.jsonl",
  "ticket_ttl_s": 60,
  "upstream_timeout_ms": 10000,
  "max_body": 65536
}

keys.json:

{
  "listen": "127.0.0.1:9712",
  "cpix": ["/var/lib/wai-key-server/title.cpix.xml"],
  "proxies": ["<proxy public key, hex>"],
  "redeemed": "/var/lib/wai-key-server/redeemed.txt"
}

The proxy refuses to start on a route whose delivery cannot carry a listed key's scheme (§3.3), on a list whose signature does not verify, on a log written by another proxy key, and on a log another process holds.

A licence server reached over TLS is reached through a local forwarder that originates TLS (upstream is http://): a reverse proxy listening on 127.0.0.1 whose upstream is the licence server's https:// address. The proxy carries no TLS stack of its own; the reverse proxy in front of it terminates the client's TLS.

Requests

A client sends the licence challenge (or nothing, for an HLS key file) to /v1/licence/<route> with the header fields of §6.2: WAI-Key-Ids, WAI-Key-Kind, WAI-Key-Time, WAI-Key-Entitlement, WAI-Key-Proof and, for a renewal, WAI-Key-Renews. wai-key-proxy sign-request writes them for a test or a tool; a player computes the proof with the Web Cryptography API (Ed25519 and SHA-256).

answer when
200 (or the licence server's status), the licence a content protection system's licence was granted and forwarded
307 to the key server with wai-ticket a clear key was granted
403 and the receipt, application/json refused; nothing was forwarded
400, 404 the request names no key or no route; it has no receipt

Every decided request names its receipt in WAI-Key-Receipt, readable at /v1/receipts/<identity>. /v1/lists and /v1/health describe the proxy; the whole log is on admin_listen at /v1/log, which is not public.

Check a log

$B verify receipts.jsonl <authorities,hex> <proxies,hex> title.wkl1 ...

runs the reference verifier of §10 over the log. The independent verifier of the conformance corpus is live-conformance/key_release_verify.py.

Tests

cargo test runs the proxy, the key server and a fixture licence server on loopback: releases, refusals that never reach the licence server, a replay sent while the first request is still being forwarded, offline licences and renewals, a licence server's refusal, tickets redeemed once, no key byte in the log, a restart that keeps the replay and renewal history, and the whole log under the reference verifier. bash smoke.sh runs the release binary as an operator would.