Available in Classic and VPC
You can apply DRM encryption to content via the CPIX API. The CPIX API is an API implemented based on the Content Protection Information Exchange Format (CPIX) standard defined by the DASH Industry Forum. It defines the key interoperability specifications required for applying multi-DRM during the media content packaging process. Using the CPIX API, you can easily integrate encoder/transcoder solutions supporting CPIX-based key interoperability with DoveRunner (formerly PallyCon) multi-DRM.
For more information on integrating the Live Station service, see Create Live Station channel.
CPIX API-based DRM content encryption
The following describes how to apply DRM content encryption using the CPIX API.
| Type | Path | Description |
|---|---|---|
| DoveRunner CPIX API | DoveRunner CPIX API integration guide | CPIX API implemented by DoveRunner (formerly PallyCon), enabling multi-DRM application when integrated with encoder/transcoder solutions. Also utilized for integration with Flussonic Media Server. |
| SPEKE API | SPEKE guide | CPIX API implemented by AWS Elemental, pre-integrated with DoveRunner to enable multi-DRM application in AWS Elemental MediaPackage and MediaConvert |
| ATEME NEA-DVR CPIX API | ATEME NEA-DVR guide | CPIX API implemented by Anevia (now acquired by ATEME), pre-integrated with the NEA-DVR solution for multi-DRM application |
- The DoveRunner (formerly PallyCon) CPIX API client provides pre-implemented CPIX client modules for each major development language.
- Each module generates XML-formatted request data for communication with the KMS server and provides a feature to interpret response data.
DoveRunner CPIX API specifications
The DoveRunner (formerly PallyCon) CPIX API client supports the following specifications.
| Item | Specification | Description |
|---|---|---|
| Development language | C++, C#, Java, Python | Sample code for each language according to the development environment for DRM packaging integration |
| DRM type | Widevine, PlayReady, FairPlay, NCG, HLS_NCG |
|
| Encryption method | CENC, CBC1, CENS, CBCS | Specify CENC or CBCS, depending on the AES encryption method supported by the client platform. |
| Track type | ALL_TRACKS, AUDIO, SD, HD, UHD1, UHD2 | Use to apply different encryption keys for each track when packaging multiple keys. |
Multi-DRM encryption type
The following describes the encryption methods for DRM content.
| Encryption method | Protocol | DRM type | Encryption algorithm | Supported devices |
|---|---|---|---|---|
| DRM | HLS |
|
AES-CBC | Mac/iOS Safari browser, iOS/iPadOS/tvOS app, HLS HTML5 |
| DRM | DASH |
|
CENC (Common Encryption) | MS Edge, IE11, Chrome, Firefox, Opera DASH HTML5 |
One Click Multi DRM scenario
The following describes a usage scenario for the One Click Multi DRM service.
- Encrypt DRM content.
- Request a DRM license from the client (player). The request requires content configuration information such as
contentIdanddrmType. - Play the DRM content using the license issued to the client.
The One Click Multi DRM service issues licenses with playback and security rules applied according to the policies set on the site. Therefore, if the requested license information does not match the encrypted DRM content information, playback may be restricted or fail.
Live content DRM encryption
The following describes how to encrypt DRM for live content.
When using Live Station
The following describes how to encrypt the DRM for live content when using Live Station.
- Create a site using One Click Multi DRM.
- Create a channel in the Live Station > Channel Management menu.
- When creating, select the site created in Step 1 under the Multi DRM field.
When not using Live Station
The following describes how to encrypt the DRM for live content when not using Live Station.
- Call the content DRM encryption API by combining the following items.
- URL: API-specific key request URL (e.g., DoveRunner (formerly PallyCon) CPIX API or SPEKE API)
- Additional URI: KMS token obtained via the One Click Multi DRM site details
- Obtain the encryption data for content encryption via the API response.
- Apply the obtained DRM encryption information to a third-party encoder/transcoder/packager integration solution.
The following describes the DRM encryption information obtained from the CPIX API response.
| Field | Description |
|---|---|
key_id_hex, key_id_b64, key_hex, key_b64, iv_hex, iv_b64 |
Hexadecimal or Base64-encoded key ID, key, and IV values |
pssh |
PSSH data (including headers) used by PlayReady or Widevine |
pssh_payload_only |
Payload portion of PSSH data, excluding headers |
key_uri |
URI parameter value contained in the #EXT-X-Key tag of an HLS m3u8 file with FairPlay DRM applied |
VOD content DRM encryption
The following describes how to encrypt the DRM for VOD content.
When using VOD Station
The following describes how to encrypt the DRM for VOD content when using VOD Station.
- Create a site using One Click Multi DRM.
- When using an external DRM service, you can skip this step.
- Create a channel in the VOD Station > Channel menu.
- When creating, apply one of the following to the Multi DRM field.
- One Click Multi DRM
- DRM site: Select an enabled DRM site.
- Content ID: Unique identifier of the content to be played (used during DRM packaging)
- Example:
drm-contents
- Example:
- External DRM
- DRM type: Select the DRM type to use.
- Content ID: Unique identifier of the content to be played (included in the CPIX API request body (XML))
- Example:
drm-contents
- Example:
- DRM system ID: Unique identifier of the DRM system (included in the CPIX API request body (XML))
- Depending on the selected DRM type, one or two system IDs are required. Make sure to enter each on a separate line.
- Example:
9A04F079-9840-4286-AB92-E65BE0885F95,EDEF8BA9-79D6-4ACE-A3C8-27DCD51D21ED
- DRM key URL: CPIX API request URL
- Enter according to the DRM provider's encryption key request format.
- Example:
https://kms.example.com/cpix/v1/key/ujllldopmquy==
- One Click Multi DRM
- When creating, apply one of the following to the Multi DRM field.
DRM encryption through VOD Station supports only CPIX v1.
When not using VOD Station
The following describes how to encrypt the DRM for VOD content when not using VOD Station.
- Call the content DRM encryption API by combining the following items.
- URL: API-specific key request URL (e.g., DoveRunner (formerly PallyCon) CPIX API or SPEKE API)
- Additional URI: KMS token obtained via the One Click Multi DRM site details
- Obtain the encryption data for content encryption via the API response.
- Apply the obtained DRM encryption information to a third-party encoder/transcoder/packager integration solution.
Request
The following describes the request format using the DoveRunner (formerly PallyCon) CPIX API.
- Request URL
POST https://kms.pallycon.com/v1/cpix/pallycon/getKey/{kmsToken}
- Request headers
- Request body
Field Type Required Description cpix:CPIXObject Required Root element of the CPIX document containing content keys and DRM system information └ cpix:ContentKeyListObject Required Container element defining the list of content keys └ cpix:ContentKeyObject Required Individual content key information with the kid(key ID) attribute└ cpix:DRMSystemListObject Required Container element defining the list of DRM systems └ cpix:DRMSystemObject Required Information for each DRM system with kid(key ID) andsystemId(DRM system identifier) attributes - Request example
curl --location --request POST 'https://kms.pallycon.com/v1/cpix/pallycon/getKey/{kmsToken}' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Content-Type: application/xml' \ --header 'x-ncp-region_code: KR' \ --data '<?xml version="1.0" encoding="UTF-8"?> <cpix:CPIX id="your-content-id" xmlns:cpix="urn:dashif:org:cpix" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc" xmlns:speke="urn:aws:amazon:com:speke"> <cpix:ContentKeyList> <cpix:ContentKey kid="681e5b39-49f2-4dfa-b744-86573c22e6fb"></cpix:ContentKey> </cpix:ContentKeyList> <cpix:DRMSystemList> <!-- Common encryption / MSS (Playready) --> <cpix:DRMSystem kid="681e5b39-49f2-4dfa-b744-86573c22e6fb" systemId="9a04f079-9840-4286-ab92-e65be0885f95" /> <!-- Common encryption (Widevine)--> <cpix:DRMSystem kid="681e5b39-49f2-4dfa-b744-86573c22e6fb" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" /> </cpix:DRMSystemList> </cpix:CPIX>'
Response
The following describes the response format using the DoveRunner (formerly PallyCon) CPIX API.
- Response body
Field Type Required Description cpix:CPIXObject - Root element of the CPIX document containing content ID (CID) keys and DRM system information └ cpix:ContentKeyListObject - Container element defining the list of content keys └ cpix:ContentKeyObject - Individual content key information with kid(key ID) andexplicitIV(initialization vector) attributes- The
kidvalue is newly generated fromKMS, separate from the value entered in the request data. The key and IV are returned in Base64 form.
└ cpix:DataObject - Element containing the content key data └ pskc:SecretObject - Element containing the secret data of the content key └ pskc:PlainValueString - Base64-encoded content key value └ cpix:DRMSystemListObject - Container element defining the list of DRM systems └ cpix:DRMSystemObject - Information for each DRM system with kid(key ID) andsystemId(DRM system identifier) attributes└ cpix:ContentProtectionDataString - Payload portion of Base64-encoded PSSH data with header removed └ cpix:PSSHString - Base64-encoded PSSH data (including header) - The
- Response example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cpix:CPIX id="cpix-test-cid" xmlns:cpix="urn:dashif:org:cpix" xmlns:speke="urn:aws:amazon:com:speke" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc" > <cpix:ContentKeyList> <cpix:ContentKey explicitIV="MDEyMzQ1Njc4OWFiY2RlZg==" kid="12ea753c-23e7-bc02-4474-b2b976c43beb"> <cpix:Data> <pskc:Secret> <pskc:PlainValue>SzC1qc1cEpyFU6t/lL7Byw==</pskc:PlainValue> </pskc:Secret> </cpix:Data> </cpix:ContentKey> </cpix:ContentKeyList> <cpix:DRMSystemList> <!-- Common encryption / MSS (Playready) --> <cpix:DRMSystem kid="12ea753c-23e7-bc02-4474-b2b976c43beb" systemId="9a04f079-9840-4286-ab92-e65be0885f95"> <cpix:ContentProtectionData>qAUAAAEAAQCeB...A=</cpix:ContentProtectionData><!-- Added in V2 --> <cpix:PSSH>AAACwnBzc2gAAAAAmgTweZhAQoarkuZb4IhflQAAAqKiAgAAAQABAJgCPABXAFIATQBIAEUAQQBEAEUAUgAgAHgAbQBsAG4AcwA9ACIAaAB0AHQAcAA6AC8ALwBzAGMAaABlAG0AYQBzAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAvAEQAUgBNAC8AMgAwADAANwAvADAAMwAvAFAAbABhAHkAUgBlAGEAZAB5AEgAZQBhAGQAZQByACIAIAB2AGUAcgBzAGkAbwBuAD0AIgA0AC4AMAAuADAALgAwACIAPgA8AEQAQQBUAEEAPgA8AFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBFAFkATABFAE4APgAxADYAPAAvAEsARQBZAEwARQBOAD4APABBAEwARwBJAEQAPgBBAEUAUwBDAFQAUgA8AC8AQQBMAEcASQBEAD4APAAvAFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBJAEQAPgBQAEgAWABxAEUAdQBjAGoAQQByAHgARQBkAEwASwA1AGQAcwBRADcANgB3AD0APQA8AC8ASwBJAEQAPgA8AEMASABFAEMASwBTAFUATQA+AC8ARgA3AEIAMQBmAEgAMgBlADAAYwA9ADwALwBDAEgARQBDAEsAUwBVAE0APgA8AEwAQQBfAFUAUgBMAD4AaAB0AHQAcABzADoALwAvAHQAZQBzAHQAdABvAGsAeQBvAC4AcABhAGwAbAB5AGMAbwBuAC4AYwBvAG0ALwByAGkALwBwAGwAYQB5AHIAZQBhAGQAeQAvAGwAaQBjAGUAbgBzAGUATQBhAG4AYQBnAGUAcgAuAGQAbwA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==</cpix:PSSH> </cpix:DRMSystem> <!-- Common encryption (Widevine)--> <cpix:DRMSystem kid="12ea753c-23e7-bc02-4474-b2b976c43beb" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cpix:ContentProtectionData>qAUAAAEAAQCeB...A=</cpix:ContentProtectionData><!-- Added in V2 --> <cpix:PSSH>AAAAVXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADUIARIQEup1PCPnvAJEdLK5dsQ76xoMaW5rYWVudHdvcmtzIg1jcGl4LXRlc3QtY2lkKgJIRA==</cpix:PSSH> </cpix:DRMSystem> </cpix:DRMSystemList> </cpix:CPIX>