Skip to content

Commit 602639f

Browse files
Merge pull request #49 from leandromoreira/feature/48/adds-content-protection-information
adds content protection information fixes #48
2 parents c3174c3 + 686d4f4 commit 602639f

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

README.md

+51-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ All the **hands-on should be performed from the folder you cloned** this reposit
2121

2222
# Changelog
2323

24+
* added DRM system
2425
* released version 1.0.0
2526
* added simplified Chinese translation
2627

@@ -736,11 +737,60 @@ HEVC has bigger and more **partitions** (and **sub-partitions**) options than AV
736737

737738
## Content protection
738739

740+
We can use **a simple token system** to protect the content. The user without a token tries to request a video and the CDN forbids her or him while a user with a valid token can play the content, it works pretty similarly to most of the web authentication systems.
741+
739742
![token protection](/i/token_protection.png "token_protection")
740743

744+
The sole use of this token system still allows a user to download a video and distribute it. Then the **DRM (digital rights management)** systems can be used to try to avoid this.
745+
741746
![drm](/i/drm.png "drm")
742747

743-
[TODO]
748+
In real life production systems, people often use both techniques to provide authorization and authentication.
749+
750+
### DRM
751+
#### Main systems
752+
753+
* FPS - [**FairPlay Streaming**](https://developer.apple.com/streaming/fps/)
754+
* PR - [**PlayReady**](https://www.microsoft.com/playready/)
755+
* WV - [**Widevine**](http://www.widevine.com/)
756+
757+
758+
#### What?
759+
760+
DRM means Digital rights management, it's a way **to provide copyright protection for digital media**, for instance, digital video and audio. Although it's used in many places [it's not universally accepted](https://en.wikipedia.org/wiki/Digital_rights_management#DRM-free_works).
761+
762+
#### Why?
763+
764+
Content creator (mostly studios) want to protect its intelectual property against copy to prevent unauthorized redistribution of digital media.
765+
766+
#### How?
767+
768+
We're going to describe an abstract and generic form of DRM in a very simplified way.
769+
770+
Given a **content C1** (i.e. an hls or dash video streaming), with a **player P1** (i.e. shaka-clappr, exo-player or ios) in a **device D1** (i.e. a smartphone, TV, tablet or desktop/notebook) using a **DRM system DRM1** (widevine, playready or FairPlay).
771+
772+
The content C1 is encrypted with a **symmetric-key K1** from the system DRM1, generating the **encrypted content C'1**.
773+
774+
![drm general flow](/i/drm_general_flow.jpeg "drm general flow")
775+
776+
The player P1, of a device D1, has two keys (asymmetric), a **private key PRK1** (this key is protected<sup>1</sup> and only known by **D1**) and a **public key PUK1**.
777+
778+
> **<sup>1</sup>protected**: this protection can be **via hardware**, for instance, this key can be stored inside a special (read-only) chip that works like [a black-box](https://en.wikipedia.org/wiki/Black_box) to provide decryption, or **by software** (less safe), the DRM system provides means to know which type of protection a given device has.
779+
780+
781+
When the **player P1 wants to play** the **content C'1**, it needs to deal with the **DRM system DRM1**, giving its public key **PUK1**. The DRM system DRM1 returns the **key K1 encrypted** with the client''s public key **PUK1**. In theory, this response is something that **only D1 is capable of decrypting**.
782+
783+
`K1P1D1 = enc(K1, PUK1)`
784+
785+
**P1** uses its DRM local system (it could be a [SOC](https://en.wikipedia.org/wiki/System_on_a_chip), a specialized hardware or software), this system is **able to decrypt** the content using its private key PRK1, it can decrypt **the symmetric-key K1 from the K1P1D1** and **play C'1**. At best case, the keys are not exposed through RAM.
786+
787+
```
788+
K1 = dec(K1P1D1, PRK1)
789+
790+
P1.play(dec(C'1, K1))
791+
```
792+
793+
![drm decoder flow](/i/drm_decoder_flow.jpeg "drm decoder flow")
744794

745795
# How to use jupyter
746796

i/drm_decoder_flow.jpeg

81.1 KB
Loading

i/drm_general_flow.jpeg

72.1 KB
Loading

0 commit comments

Comments
 (0)