fix(dash): license a track whose only key system is the W3C common PSSH as ClearKey

This commit is contained in:
imSp4rky
2026-11-28 14:29:36 -07:00
parent b5b34cea02
commit 5f675bd5ff
7 changed files with 222 additions and 60 deletions
+7 -1
View File
@@ -48,7 +48,7 @@ license-server handshake. The rest are special cases.
|--------|-------------|--------------|------------|
| **Widevine** (Google) | `.wvd` | CDM challenge → license server → CDM parses → keys | shaka-packager / mp4decrypt |
| **PlayReady** (Microsoft) | `.prd` | CDM challenge (WRM header) → license server → CDM parses → keys | shaka-packager / mp4decrypt |
| **ClearKey (CENC)**, W3C EME `org.w3.clearkey` | none | JSON `{"kids":[...],"type":"temporary"}` → license server returns a JWK Set. No CDM. | shaka-packager / mp4decrypt |
| **ClearKey (CENC)**, W3C EME `org.w3.clearkey` or the W3C common PSSH | none | JSON `{"kids":[...],"type":"temporary"}` → license server returns a JWK Set. No CDM. | shaka-packager / mp4decrypt |
| **ClearKey (HLS)**, AES-128 `EXT-X-KEY` | none | Key fetched directly from a URI or `data:` URL. No CDM, no challenge. | in-process AES-CBC |
| **MonaLisa** (proprietary, WASM) | `.mld` | Ticket from the service API; keys extracted locally via WASM. No license server. | ML-Worker binary + AES-ECB, per segment |
| **Blowfish stripe** | none | The service gives the per-track key. No CDM, no license server. | in-process Blowfish-CBC on every third 2048-byte chunk |
@@ -474,6 +474,12 @@ license hook returns) and reads the JSON Web Key set back. You do not need a dev
file. The decrypted file still goes through shaka-packager or mp4decrypt like any
other CENC track, so the `decryption` setting applies.
A DASH manifest can also give the KID of a ClearKey track with only the W3C common PSSH
(`urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b`). The common PSSH can name KIDs for any DRM
system, so unshackle reads it as ClearKey (CENC) only when the manifest and the init segment
give no other DRM system. This scheme has no license URL in the manifest, so the content key
must come from the service's ClearKey license hook or from a key vault.
### ClearKey over a whole file (AES-CTR)
Some services encrypt one whole audio file with AES-128-CTR and give the content key and