Side Read: Keys, Licences and How the Stream Stays Protected
First: what is DRM?
DRM (Digital Rights Management) is the system that lets your device play a film without letting you copy it. It isn't one piece of software. It's three things working together:
- Lock the video. The video file is encrypted, so on its own it's useless noise.
- Hand out the key carefully. The key that unlocks it comes separately, only to viewers who are allowed to watch, and only in a form that works on their one device. This package is called a licence.
- Unlock it somewhere you can't reach. Your device unlocks the video inside a sealed-off part of its chip or software. The unlocked video goes straight to the screen. Neither you nor any app ever sees the key or the unlocked frames.
A simple way to picture it: everyone receives the same locked box by ordinary post. The key comes by a separate courier, who checks your ID first. And the box can only be opened inside a sealed room in your house that you can look into but can't reach into.
DRM and watermarking do different jobs. DRM tries to stop copying. It can't stop everything, because once the picture is on the screen, someone can film it with a camera (more below). Watermarking covers that gap: every viewer's stream carries a hidden mark that's unique to them, so if a copy leaks, Netflix can find out which account it came from. DRM is the lock. Watermarking is the fingerprint left on whatever gets out anyway.
The words you'll meet in this side read:
- Content key — the secret that unlocks an encrypted video file. Netflix never sends it out in readable form.
- Licence — a small signed message from Netflix's licence server. It holds the content keys (locked so only your device can open them) plus rules: how long they last, the highest quality allowed, and whether offline viewing is allowed.
- Licence server — the Netflix service (in AWS) that decides whether to issue a licence. It checks your account, plan, country, device and how many streams you already have running.
- CDM (Content Decryption Module) — the DRM component built into your browser, phone or TV. It asks for the licence, keeps the keys and does the decrypting. The Netflix app only passes messages to and from it.
- TEE (Trusted Execution Environment) — a walled-off, secure area of a device's chip. The best DRM does all its work in here.
- Widevine, PlayReady, FairPlay — the three DRM systems, from Google, Microsoft and Apple. Each platform only supports its own, so Netflix supports all three.
- Watermark — an invisible, per-viewer mark hidden in the video, used to trace a leaked copy back to its source.
What is being protected, and from whom
"Security" here means several different jobs. They use different tools, and it helps to keep them apart:
| What's protected | The threat | Main defence |
|---|---|---|
| The films and shows | Someone copies the stream and shares it | DRM: encrypted files + per-viewer licences. Watermarking to trace leaks. |
| What you watch (privacy) | Your ISP, or someone on your Wi-Fi, sees which titles you watch | TLS (HTTPS) on the video path |
| Your account | Stolen passwords; sharing beyond one household | Login security, device and session tokens, household checks |
| The appliances | They sit in buildings Netflix doesn't control (see Open Connect) | They hold only locked files — no keys, no member data — and serve only signed requests |
| The control plane APIs | Forged or replayed requests | Authenticated, encrypted messages between device and server |
The first row is the one studios care about most. Netflix doesn't own most of what it streams, and its licensing contracts require DRM — often with stricter rules for HD and 4K. So content protection isn't optional, and it has to work on thousands of device models.
The core idea: lock the file once, hand out keys one viewer at a time
The obvious approach would be to encrypt the video separately for each viewer. That would break everything in the Open Connect part. An appliance in an ISP works because it stores one copy of each file and serves it to thousands of people. Per-viewer encryption would mean per-viewer files, and caching would stop working.
So Netflix splits the problem in two:
- The content path carries the big, locked files. They are the same for everyone, so they can be cached anywhere — including in someone else's building.
- The key path carries the tiny keys that unlock them. This path is personal: every request is checked, and every answer is locked to one device.
Key: video bytes — large, cached, identical for every viewer · keys — small, personal, issued per session · the device asking for a licence · the only place a key is ever unlocked
Step 1 — Locking the files, at encode time
After a rung is encoded (see Per-title encoding), a packager encrypts it with AES-128, a standard, fast cipher that phones and TVs can undo in hardware. The format is Common Encryption (CENC), an ISO standard. "Common" is the important word: one encrypted file can be unlocked by several different DRM systems (Google's, Microsoft's, Apple's). Netflix doesn't have to store a separate copy per DRM system — which again protects caching.
Three details matter:
- Only the picture data is encrypted. Headers, timing and sizes stay readable. That's how the player can parse segments, read sizes and pick rungs (see Per-title encoding) without holding any key.
- The file says which key it needs, not what the key is. Each file carries a key ID — a label like "key 7f3a…". It also carries a small block of data for each DRM system, which the device passes along when it asks for a licence.
- There are two encryption modes.
cencuses AES in counter mode.cbcsuses AES-CBC and encrypts only a pattern of blocks (typically 1 in every 10). That's enough to make the video useless without the key, and it's cheaper for weak devices. Apple's FairPlay requirescbcs, and the industry is moving to it, so one file can serve everyone.
Step 2 — Getting a licence, when you press play
After Step 1, every video file is locked. To play one, your device needs the key, and the only way to get it is inside a licence: a small message from Netflix that holds the keys your device may use, plus the rules for using them.
One thing to get straight first: the video file tells the player which key it needs, but not the key itself. It carries a key ID, a label like "key 7f3a…". Think of it as the number on a locker. Knowing the locker number doesn't open the locker; you still have to ask someone for the key.
The steps, in order. Three parties are involved: the Netflix app, the CDM inside your device, and Netflix's licence server. The CDM and the licence server never talk directly; the app carries every message between them.
- Find out which key is needed. The player reads the key IDs from the manifest (the small file that lists the qualities and where the segments are). No video has to download first. Now the player knows the locker number, but it still can't decrypt anything.
- The app asks the CDM to write a key request. The CDM is the DRM component built into your browser, phone or TV. It's separate from the Netflix app, and only it is trusted with keys. The app hands the CDM the key ID and says "please write a request for this." The CDM builds the request ("I need key 7f3a…, here is my device certificate, and here is my security level"), signs it with a secret the device got at the factory, and hands it back to the app.
Who can read this request? Only Netflix's licence server. Think of a letter in an envelope addressed to Netflix: the app is the postman, who carries it but can't open or rewrite it. Two protections make this work:- Signed with the factory secret. This proves the request came from a genuine, certified device and wasn't changed on the way. The licence server checks the signature.
- Encrypted for Netflix. The device's identity is locked with Netflix's public key (its service certificate, which the app fetched from Netflix and handed to the CDM earlier), so only the licence server can read it, not the app and not anyone watching the network.
- The app carries the sealed request to Netflix. The CDM has no network connection of its own, so the Netflix app acts as the courier. It forwards the sealed request, unopened, to the licence server in AWS, together with proof of which member is logged in.
- The licence server decides. It checks:
- Is the member's account active?
- Does their plan include this quality (for example 4K)?
- Is this title available in their country?
- Are they already using all the streams their plan allows?
- Is this device genuine and not on the banned list?
- Is the device secure enough for this quality?
- The licence comes back to the app, and the app hands it to the CDM. The licence is sealed too. The keys inside are encrypted so that only this device's CDM can open them, so the app just passes it along, and copying it to another device is useless. The licence also carries rules: how long it's valid, when to renew it, whether the screen connection must be secure (HDCP), and whether the title can be downloaded for offline viewing. The CDM opens it and keeps the keys. From now on the app hands it locked video segments and the CDM decrypts them. The keys never leave the CDM.
Netflix app CDM (in device) Licence server (AWS)
| 1. read key ID from manifest
|-- 2a. "write a request for key 7f3a" -->|
|<-- 2b. sealed, signed request ----------|
|-- 3. sealed request + member proof ------------------------------->|
| 4. check account, plan,
| country, streams, device
|<-- 5a. sealed licence (keys locked to this device) ----------------|
|-- 5b. "here's the licence" ------------>| CDM unlocks + keeps keys
|
|-- locked video segments --------------->|--> decrypted frames --> screen
The app is always the go-between. It carries both sealed messages but can open neither.
The licence server can open the request; only the CDM can open the licence.
In a browser, EME is the API for these handoffs:
2a = generateRequest(keyId) 2b = "message" event 5b = update(licence)The two key pairs behind this. A public certificate can't sign anything; signing needs a private key. There are two separate key pairs, one for each side:
| Device key pair (the "factory secret") | Netflix key pair (the "service certificate") | |
|---|---|---|
| Private half | Sealed inside the CDM, put there at the factory (or at first-use setup). Never leaves the device. | Held only by Netflix's licence server |
| Public half | The device certificate, sent with every request | The service certificate, fetched by the app and handed to the CDM before the first request (setServerCertificate() in a browser) |
| Vouched for by | The DRM vendor (Google, Microsoft or Apple): "this is a genuine device, model X, security level L1" | The same DRM vendor: "this is really Netflix" |
| Used for | ① Signing the request, to prove it's this genuine device. ② Unlocking the licence, because the keys inside are locked to this device. | ① Hiding the device's identity from anyone but Netflix. ② Proving to the CDM that it's talking to a genuine, approved service. |
The DRM vendor is the trusted middleman: it vouches for devices to Netflix, and for Netflix to devices. Here's how each key gets used on one request:
CDM builds the request
a) put in the key ID + device certificate
b) ENCRYPT the device identity with Netflix's public key → only Netflix can read it
c) SIGN the request with the device's private key → proves it's this genuine device
Licence server receives it
a) DECRYPT the identity with Netflix's private key
b) CHECK the device certificate was signed by the DRM vendor → genuine model, its security level
c) CHECK the signature with the device's public key → really from this device, unchanged
d) LOCK the content key with the device's public key → only this device's private key opens itSo the factory secret does two jobs. It proves the device is genuine, because a cracked app can't produce a valid signature without it. And it's the only thing that can open the licence, which is why copying a licence to another device is useless.
Does this slow down pressing play? Not much, for two reasons:
- Video downloads at the same time. The player can start buffering locked segments while the licence request is still on its way. It just can't decrypt them until the licence arrives.
- The licence can come early. It can come back in the same round trip as the manifest (see One press of Play), or be fetched before you press play, for a title you're likely to pick.
Why this step can't fail gracefully. This is the "DRM licence issuance" hop in the One press of Play part, one of the two start-up steps with no fallback. Most Netflix services can return a sensible default when they're down; this one can't, because there's no safe default for "yes, this device may have the 4K key". If the licence server is down, protected playback can't start. That's why Netflix puts heavy reliability investment here.
Step 3 — Inside the device: how much can it be trusted?
A key has to exist unlocked somewhere to decrypt video. The real question is where. Every DRM system grades devices by how well they hide that moment:
| Where decryption happens | Widevine (Google) | PlayReady (Microsoft) | How hard to attack |
|---|---|---|---|
| Hardware. Keys, decryption and decoding all happen in a secure area of the chip (a TEE). Decoded frames go straight to the screen and never pass through normal memory. | L1 | SL3000 | Hard — needs a flaw in the chip's secure area |
| Protected software. Obfuscated, tamper-resistant code, but on the normal processor. | L3 (and the rare L2) | SL2000 | Much easier — the key is in ordinary memory, just well hidden |
Apple's FairPlay fills the same role on Apple devices, which have secure hardware built in. Netflix matches the quality you get to the trust level of the device:
- Hardware-level DRM plus a secure screen connection → up to 4K.
- Software-only DRM → capped lower. For years, desktop browsers using software Widevine were limited to 720p, while the same PC could get 4K through Edge or the Windows app using hardware PlayReady.
This is one of the hidden inputs behind "the manifest is built for you" in the Per-title encoding part. The rungs a device never sees are often missing because of its security level, not its screen.
Step 4 — From the device to the screen: HDCP
A decrypted frame still has to travel down an HDMI cable to the TV, and a cheap capture box could record it there. HDCP encrypts that link, too. A licence can require it: typically HDCP 2.2 for 4K, and some version of it for HD. If the TV, cable or splitter doesn't support it, the CDM won't play those rungs. The player then falls back to a lower one — or shows an error if nothing is allowed. That's the usual reason for "4K works on my TV's built-in app but not through my old AV receiver."
While you watch: renewals, stream limits and downloads
| Short-lived licences | A streaming licence is valid for a limited time, and a long session renews it in the background. Each renewal is a chance to re-check the account: a cancelled plan or an over-limit account can be stopped mid-stream without ever touching the appliance. This is the one control-plane call a long session still needs (the Per-title encoding part’s three-clocks diagram). |
|---|---|
| Simultaneous streams | Your plan allows a fixed number of streams at once. That's enforced at play time and again on renewals — the key path is where "who is watching right now" is actually known. |
| Offline downloads | A download gets a persistent licence, stored on the device and tied to it, with an expiry date. Studios can limit how many times a title can be downloaded, and the device has to check in now and then to keep downloads valid. The file is still the same kind of locked file; only the licence is different. |
When a device gets cracked: revocation
Sooner or later, some device model's keys get extracted. DRM is designed to fail small and recover, not to be unbreakable:
- Revoke the device. Each device model (and often each device) has a certificate. The licence server keeps a revocation list. Once a model is on it, it gets no licence, or only low-quality keys, until it gets a firmware update.
- The damage is limited to that device's tier. Thanks to per-tier keys (the trap above), a cracked software player exposes only software-player quality.
- No files need re-encrypting. The fix lives on the key path. The terabytes sitting on appliances don't change.
This is also why Netflix runs a device certification program. A TV or set-top box only gets the Netflix app — and the higher quality tiers — after its DRM and secure video path have been tested.
Tracing a leak: forensic watermarking
The gap DRM can't close. DRM protects the video only while it's digital: the locked file, the key, the decryption inside the chip, even the cable to the TV (HDCP). But in the end the TV has to show the picture as light so you can see it, and DRM has no control after that. A pirate can point a good camera at the screen, or use a capture device that grabs the signal after it's been decrypted. Either way they end up with an ordinary, unlocked video file. This is often called the "analog hole", and no DRM can close it: if a person can see the picture, a camera can too.
What watermarking does about it. Watermarking doesn't stop the copying. It makes the copy traceable:
- Hide a mark in the picture. Tiny changes to the image itself, such as very slight brightness changes in certain spots. You can't see them, but software can detect them.
- Make it different for every viewer. Each session's stream carries its own mark, so the mark works like an ID number for that account or session.
- Make it survive copying. The mark is part of the picture, not data attached to the file. It survives someone filming the screen, re-compressing or shrinking the video, or cropping it a little.
- Trace the leak. When a pirated copy appears online, a detector reads the hidden ID and points to the account or session it came from. That account or device can be banned, the loophole closed, or legal action taken.
How to give every viewer a different mark cheaply. Encoding the whole film separately for millions of viewers would break caching (see Open Connect). The standard trick builds on the Per-title encoding part’s segments instead. Encode each few-second segment twice, as variant A and variant B, with slightly different hidden marks. Then give each session its own mix of A's and B's, for example A-B-B-A-B…, which spells out a session ID in binary (A = 0, B = 1). The appliance still serves ordinary cached files (just twice as many), and the choice of which variant to fetch is made per session. Studios often require this for their most valuable content. Netflix hasn't published details of its own set-up, so treat this as how the industry does it rather than a description of Netflix's system.
DRM is the lock; watermarking is the fingerprint. DRM makes copying hard. Watermarking makes whatever does get copied traceable, so leaking stops being anonymous. Neither is enough on its own.
Protecting what you watch: TLS on the video path
DRM protects the studio. It does nothing for your privacy: with plain HTTP, anyone on the network path could see which title you were streaming. Around 2015–2016, Netflix moved its appliances to HTTPS. The hard part was cost, not cryptography. An appliance's whole job is to push tens to hundreds of gigabits per second straight from disk to network, and encrypting every byte in software would have cut that badly. Netflix's answer was to move TLS encryption into the FreeBSD kernel, so files could still go from disk to network without being copied into a normal program. Later appliances hand that encryption to the network card itself.
So a segment is encrypted twice on the way to you, for two different reasons:
| DRM (CENC) | TLS (HTTPS) | |
|---|---|---|
| Protects | The content, for the studio | Your privacy and the data in transit |
| Applied | Once, at encode time | Every connection, by the appliance |
| Same for everyone? | Yes — that's what makes caching possible | No — new session keys per connection |
| Key held by | Only your device's CDM | The appliance and your app |
| Removed | Inside the CDM, just before decoding | As soon as the bytes reach your app |
Around the content: accounts, sessions and the appliances
| Device ↔ Netflix messages | Netflix built and open-sourced MSL (Message Security Layer), a protocol for authenticated, encrypted messages between devices and its servers. It proves which device and which member is asking, and it blocks replayed requests. Netflix used it for sensitive calls like manifests and licences, on top of or instead of plain TLS — useful on devices where TLS support was old or weak. |
|---|---|
| Sessions, not passwords | After login, a device holds tokens, not your password. A token can be revoked on its own — "sign out of all devices" — without changing anything else. |
| Households | Since 2023, Netflix limits sharing to one household, which it infers from signals like IP address, device IDs and account activity. It's enforced on the control plane, at sign-in and play time. |
| Signed URLs to appliances | The steering service (see Open Connect) hands out appliance URLs carrying a signed, expiring token. The appliance checks the signature itself, with no call to AWS, and refuses anything else. That stops strangers from using Netflix's appliances as a free file server. |
| Appliances are low-value targets | An appliance holds encrypted files, no content keys, and no member data. Netflix manages the box end to end — the ISP only provides power, space and network. Breaking into one gets an attacker very little. |
The whole design follows from one split: content is public-shaped, keys are personal. Lock the file once so the content path can be cached anywhere, and put every decision — who, what quality, which device, for how long — on the small key path, where it can be checked and revoked.