Deployed 0536056e with MkDocs version: 1.6.1

This commit is contained in:
2026-12-03 22:52:44 +00:00
parent bcebd58959
commit 60fd6f2734
15 changed files with 447 additions and 1366 deletions
+66 -14
View File
@@ -1054,6 +1054,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#drm-plugins" class="md-nav__link">
<span class="md-ellipsis">
DRM plugins
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2529,6 +2540,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#drm-plugins" class="md-nav__link">
<span class="md-ellipsis">
DRM plugins
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2644,8 +2666,9 @@ from the track, asks the CDM for a license challenge, sends that challenge to th
service's license server, hands the response back to the CDM to extract the keys, and
then decrypts the file with those keys.</p>
<h2 id="supported-drm-systems">Supported DRM systems<a class="headerlink" href="#supported-drm-systems" title="Permanent link">&para;</a></h2>
<p>unshackle implements seven DRM systems. Only the first two need a device file and a
license-server handshake. The rest are special cases.</p>
<p>unshackle has five DRM systems built in. Only the first two need a device file and a
license-server handshake. The rest are special cases. A DRM plugin adds another system (see
<a href="#drm-plugins">DRM plugins</a>).</p>
<table>
<thead>
<tr>
@@ -2681,18 +2704,6 @@ license-server handshake. The rest are special cases.</p>
<td>in-process AES-CBC</td>
</tr>
<tr>
<td><strong>MonaLisa</strong> (proprietary, WASM)</td>
<td><code>.mld</code></td>
<td>Ticket from the service API; keys extracted locally via WASM. No license server. Over <code>--remote</code> the server extracts the content key and sends it to the client, only when the remote session uses the server CDM.</td>
<td>The tool that the service names, else <code>bbtsdecrypt</code> per segment, else the built-in decrypter per segment, which needs no tool. Over <code>--remote</code> the client decrypts with its own tool or the built-in decrypter. An export holds the KID and the content key, and an import decrypts like a <code>--remote</code> client. After the merge FFmpeg decode-checks the video track; a content key that does not decode stops the track.</td>
</tr>
<tr>
<td><strong>Blowfish stripe</strong></td>
<td>none</td>
<td>The service gives the per-track key. No CDM, no license server.</td>
<td>in-process Blowfish-CBC on every third 2048-byte chunk</td>
</tr>
<tr>
<td><strong>ClearKey (CTR)</strong>, AES-128-CTR</td>
<td>none</td>
<td>The service gives the per-track key and IV. No CDM, no license server.</td>
@@ -3177,6 +3188,47 @@ systems can list different sets of KIDs, and unshackle keeps the content keys of
<li>A remote CDM that stores content keys can answer without a challenge to the service.</li>
</ul>
</div>
<h2 id="drm-plugins">DRM plugins<a class="headerlink" href="#drm-plugins" title="Permanent link">&para;</a></h2>
<p>A DRM system that is not built in comes from a plugin. A plugin is a zip file or a folder that holds
one Python package. Put it in <a href="../../reference/configuration/directories/"><code>directories.plugins</code></a>.
unshackle loads the plugins once per process, at the first DRM lookup, and never from a peer or a URL.
Restart <code>unshackle serve</code> after you add or replace a plugin. A plugin that
does not load gives one warning that names its file. A track that needs a plugin that is not loaded
stops with <code>No DRM plugin '&lt;id&gt;' is installed</code>.</p>
<p>A plugin sets the facts of its system: its id, its label, how it gets the content key, and how it
decrypts. The service gives the content key of a plugin that holds its key. A plugin device licenses
a plugin that licenses locally, at the licence step of a download, after the vault lookup, as for a CDM
track: <code>--list</code> sends no licence, and <code>--vaults-only</code> and <code>--cdm-only</code> apply. A plugin decrypts each segment and then the merged file, or the
merged file once. The README of each plugin gives its device files, its tools and its limits.</p>
<ul>
<li><strong>Devices:</strong> a plugin device file is <code>&lt;name&gt;&lt;suffix&gt;</code>, with the suffix that the plugin sets. A plugin
can carry its own device files and name a default device. unshackle looks for a device in
<code>directories.wvds</code>, then in <code>directories.prds</code>, then in the device files of the plugin, so your own
file comes first. A service that needs a plugin device gets the default device of the plugin when
its <a href="#selecting-which-device-to-use-the-cdm-config"><code>cdm</code></a> entry names no device of that system.
To use another device, name it under the plugin id in the <code>cdm</code> mapping, as you name a device
under <code>widevine</code>.</li>
<li><strong><code>--remote</code>:</strong> the server and each client must load the same plugin. When a client opens a
remote session, it sends the id and the version of each plugin it loads. For a plugin device, it also sends
the values of the device attributes that the plugin names (for example the security level), never a
path or a device file. The server sends the plugin id, the KIDs, the label and the data that the
plugin lets a peer carry; never a content key or a path. The server refuses a title with a track of
a plugin that the client did not send with <code>This title needs the DRM plugin '&lt;id&gt;', which your
unshackle does not have</code>, before it sends the track list. A client that sends no plugin list (an
older unshackle) gets <code>This title needs the DRM plugin '&lt;id&gt;', and your unshackle sends no plugin
list</code>. In a remote session that the client's device licenses, the service on the server reads the
values that the client sent, so it picks the data that the client's device can license.
In a remote session that uses the server CDM, the server licenses a plugin DRM that licenses locally
with its own plugin device, under the licence cap of the API key. With <code>--cdm-only</code>, in a session
that the client licenses, and for a track above the cap, the client licenses with its own plugin
device. The plugin data can be bound to the device that the service on the server read, so a
different client device can fail to read it.</li>
<li><strong>Export:</strong> an export writes a plugin DRM under the plugin id, with the same fields as <code>--remote</code>.
An import without the plugin stops with <code>Unknown DRM system '&lt;id&gt;' in the export</code>.</li>
<li><strong>Decode check:</strong> FFmpeg checks the content key of a plugin DRM that licenses locally after the
merge, as for a vault key. A content key that does not decode stops the track (see
<a href="../vaults/#wrong-keys-from-a-poisoned-vault">Vaults</a>).</li>
</ul>
<h2 id="keys-vaults-and-caching">Keys, vaults, and caching<a class="headerlink" href="#keys-vaults-and-caching" title="Permanent link">&para;</a></h2>
<p>Fetching a license is comparatively slow and, for some services, rate-limited.
unshackle therefore resolves each key ID in this order before ever contacting a