1# Introduction to DRM Kit 2 3You can call the APIs provided by Digital Rights Management Kit (DRM Kit) to decrypt DRM-protected audio and video content and manage DRM certificates and media keys on devices. 4 5## Available Capabilities 6- Decryption and playback: provides unified audio and video decryption capabilities, which enable audio and video applications to play DRM-protected content after integrating with DRM. 7 8- DRM scheme support: supports various DRM schemes. 9 10- Online certificate download: supports device certificate requests and settings. 11 12- Online/Offline media key authorization: supports online media key requests and settings, and offline media key requests, loading, updates, deletion, and status query. 13 14## Features 15 16- Media key and decryption session management 17 18 DRM Kit supports multiple sessions, allows users to request and set media keys in sessions, and binds decryption sessions to media keys. 19 20- Secure and non-secure video channels 21 22 DRM Kit supports secure video channels with encrypted memory calls and decoding. It also supports non-secure channels with non-encrypted memory calls and decoding. 23 24## Basic Concepts 25Be familiar with the following basic concepts before development: 26 27- DRM scheme (DRM plugin) 28 29 Below the DRM framework layer, there are drivers that implement the DRM Hardware Device Interface (HDI) layer. Content decryption is implemented in the drivers. 30 31- DRM session (MediaKeySession) 32 33 DRM sessions are used for media key management and media decryption. Their lifecycle are managed by DRM instances (MediaKeySystem). 34 35## Development Model 36 37Specific DRM implementation manners and technical details vary according to the types of the content, protection requirements, and use scenarios. 38 39The DRM working process can be summarized into three parts: device certificate management, media key management, and decryption management. 40 41- After creating a DRM instance, the client creates a DRM decryption session. If the client detects that the device does not have a device DRM certificate or the certificate is abnormal, it starts the online certificate download process. 42 43- After the certificate is downloaded, the client creates a DRM decryption session and generates a media key request. The client obtains the response to the media key request from the server and sets it on the device. There are online and offline media keys. You can obtain the IDs of media keys, check their status, and clear them. 44 45- The client sets the decryption configuration to decrypt the content. 46 47The figure below illustrates the DRM development model for you to better develop applications with digital rights protection. 48 49**Figure 1** DRM development model 50 51 52 53The player application calls DRM APIs to implement basic operations such as device certificate management, media key management, and decryption management. To implement these basic operations, you need to create a DRM instance and request and set a device certificate. Then, you need to create a session instance and request and set a media key. When an encrypted stream arrives, the player application sends it to a specific DRM plugin for decryption through the bottom-layer HDI. 54