Lesson
The theory — Rotating the Keys of a Live Stream
A content key is the AES key that encrypts the media. A player gets it inside a licence from a licence server, made out to that one device. Key rotation replaces the content key every crypto period while a live stream runs, so the player needs a new key each time. In a key hierarchy the licence carries a root key instead, and the content keys, called leaf keys there, travel inside the stream itself and are usable only with the root.
What each symbol means
T- the crypto period, how long one content key is in use, in seconds
N- viewers watching at the same time
w- how far apart their playheads sit behind the live edge, which is the window all of them cross a key boundary in
R- how long a root key lasts in a hierarchy, in hours
- Assumes
- One licence request per viewer per boundary, carrying every key of the period, and every viewer watching for the whole run. Asked on change, the requests spread evenly over the w seconds after a boundary; fetched ahead, evenly over the whole period. Real arrivals bunch and scatter around those averages and a server is sized with margin for it, so the peaks here are a floor for what a server must carry. Viewers joining and leaving, retries after a failed request and the licence every player fetches when it starts are left out.
- Breaks when
- When the key that leaks is the device's own. Rotation bounds what one content key opens and a hierarchy bounds what one root key opens, but a player whose device key has been extracted can go on asking for, or unwrapping, every key the service issues it. No crypto period helps then. The device has to be refused its licences, or, where there is no licence server to refuse them, revoked, which is what the device revocation page counts.
Problem solved in full
-
Can one licence server carry a final? 4 steps
How short can the crypto period be? Press A cup final: 3,000,000 viewers, keys rotating every two minutes and fetched ahead, 25,000 requests a second. The licence server is rated for 20,000. Find the shortest crypto period it can carry with the keys fetched ahead, what asking on change would demand of it, and what a daily root key fetched ahead would cost instead.
-
Fetched ahead, every viewer asks once a period and the asks spread evenly across it, so the load is N/T. It has to stay at or under the server's 20,000.
-
At two minutes the load is 1.25 times the rating. Solve for T instead: no shorter than 150 seconds.
-
Asked on change, the whole audience asks inside the 10 seconds its playheads are spread over: 300,000 a second, fifteen times the rating, at every boundary. T does not appear in N/w, so no crypto period fixes it; only playheads 150 seconds apart would.
-
In a hierarchy with a daily root whose licences are fetched at random moments during the previous day, the only requests are the roots, N over the 86,400 seconds of a day.
Answer
At least 150 s fetched ahead, 300,000 a second on change, 34.72 a second with a daily root fetched ahead. Two-minute rotation does not fit this server whichever way the content keys are handed out one at a time, and two and a half minutes fits it with no margin at all. The hierarchy fits 576 times over and pays for it the way the third insight says: one leaked root key opens a whole day of the final.
-
References (2)
- The three delivery modes the page compares, and its three quotations: key rotation signalled in-band so every player asks at once (§9.3), the key hierarchy with a root licence once a day (§9.4), and rotation's purpose stated as re-authorisation rather than security (§9.2): DASH Industry Forum, DASH-IF Interoperability Points, Part 6: Content Protection. DASH-IF IOP-6 V5.0.0, January 2022, clause 9 Key rotation.
- How a packager is handed one content key per crypto period, why a stream carries several keys at once, and the two-level root and leaf hierarchy: DASH Industry Forum, DASH-IF Implementation Guidelines: Content Protection Information Exchange Format (CPIX), version 2.2, §6.2 Key Rotation Support and §6.3 Hierarchical Keys.