Device Authentication and Secure Key Exchange
1. Overview
SSP provides a service called Device Authentication Service (DAS) and related client SDKs. This service enables operators to:
Authenticate a device from the operator backend. This authentication is based whenever possible on secure platform-level elements like hardware root of trust or TEE, whether shared or not with the DRM platform.
Secure the delivery of symmetric keys provided by the operator and intended to be used by the application running on the device. These keys can then be used by applications to encrypt/decrypt or sign/validate data sent or received to/from either a server in a client-server protocol or other devices in a peer-to-peer protocol.

2. Deployment Architecture
NAGRA provides the DAS only as a SaaS from AWS. It can be interfaced from any operator services either running on their premises or in the cloud. These operator services need to be authenticated using SSP credentials when interacting with the DAS.
NAGRA also provides three kinds of client SDKs depending on the nature of the targeted device.
Details about the different SDKs, demo applications, and documentation can be found here.

3. Supported Algorithms and Features
Scheme | Signing/Validation Algo | Encryption/Decryption Algo | Persistence | Multi-session |
---|---|---|---|---|
Connect scheme | CMAC-AES128 | AES-128/CBC/PKCS7Padding | Always enabled | Not supported |
Widevine scheme | HMAC-SHA256 | AES-128/CBC/NoPadding | Not supported | Supported |
Web scheme | HMAC-SHA256 | AES-128/CBC/PKCS7Padding | Not supported | Supported |
TVKeyCloud scheme | Not supported | Not supported | Not supported | Not supported |
Persistence and multi-session details:
Connect scheme always persists keys provided by DAS and always replaces old keys with new keys after new keys have been provided.
Widevine scheme does not support persistence but allows importing several set of keys and using them all while the sessions are opened on the client.
Web scheme does not support persistence but allows importing several set of keys and using them all while the sessions are opened on the client.
TVKeyCloud scheme does not support the secure key exchange operation.
4. Using the DAS to Secure Access Tokens
Operators can use DAS in combination with their user management service to first authenticate a client application that is connecting and then strongly bind any kind of access tokens to these authorized application instances.
The following sequence diagrams detail a proposed flow :

The strong binding of the sessionToken to the application instance is realized by interfacing the sessionKey keyId (step 14) in each request using the sessionToken (step 16). Previously, the sessionKey keyValue was securely delivered to the authorized application instance using the DAS in step 9. In detail:
The application requests the Authentication SDK for authentication data.
The Authentication SDK returns the authentication data (dasMessage1) associated to a session object so that keys can be imported later (step 12) protected for this session. It is also important to provide the crypto scheme to the server side – it can either be hardcoded in the application or exported from the Authentication SDK depending on the type of SDK.
The application performs a sign-in request to the server API Gateway by providing user credentials, the authentication data, and the crypto scheme.
The API Gateway calls the DAS to authenticate the device by providing the scheme and the authentication data.
The DAS returns the deviceId and optionally the model. This deviceId may be a DRM deviceId or not depending on the scheme used.
The API Gateway requests the operator portal to authorize the user on that instance of the device of this model.
The portal validates the user credentials on this device and then returns a status and the accountId.
The API Gateway now creates a session token for this accountId on the deviceId running this application. The API Gateway will later enforce that each time the token is used in a request, the keyValue associated with the token is used to sign the request data. To enable this functionality, the API Gateway needs to maintain the link between the keyId and keyValue and the session token.
The API Gateway requests the DAS service to protect the keyId and keyValue for the device by providing the dasMessage1 coming from the Authentication SDK and both fields in the sessionKey input structure of the secureKeyExchange operation.
The DAS protects the keyId and keyValue for the device and returns a dasMessage2.
The API Gateway now returns the sessionToken, the dasMessage2, and the keyId to the application.
The application imports the dasMessage2 into the Authentication SDK.
Now, for each request that uses the sessionToken and that needs to be authenticated, the application first starts to create the request with all its arguments and payload.
Then the application requests the Authentication SDK to sign the request using the keyId that was delivered in step 11.
The Authentication SDK securely computes the signature of the requests by using the keyValue referred by the keyId.
The application now sends the request to the API Gateway with its signature.
The API Gateway first validates the sessionToken and retrieves the keyValue and all other parameters associated to the sessionToken.
The API Gateway then validates the request signature with the keyValue.
The API Gateway finally calls the portal to process the authenticated request by provided parameters retrieved from the sessionToken.
The portal returns the answer to the API Gateway.
The API Gateway returns the answer to the application.
In the previous diagram and description, the DAS APIs are simplified – the details are available here. Similarly, the AuthSDK API depends on the SDK flavors, but each AuthSDK is provided with reference source code to help to realize steps 1, 2, 12, 14 and 15.
5. Examples of device identifiers and models exposed by DAS server
Device | SDK type | model example | deviceId example | deviceId source and persistency |
Linux STB | Connect | Non_Nagra_STB | SKL example: prm.NAGRA/5801/EXA.12345678901234567890123456134307 NOCS example: prm.NAGRA/0E01/EYL.0000134248 TKL example: prm.NAGRAv2//EZG.0x3654d0104c11494c9d37ab74da97cfe9 | Based on Nagra deviceUniqueId Persistent for all the device’s lifecycle. |
iOS Mobiles & Tablets | Connect | IOS-DAS | prm.NAGRA/0211/EQB.0512320402FFFFFFFF101CFFFFFF6078FFFF6BFFFF3C14FF0409FFFF05FFFFFF | Randomly generated. Will change on factory reset. Remains persistent if App is reinstalled. |
Android Mobiles & Tablets | Android | Google Pixel 3a sargo | A262DB72BC8BF3CFD2D6974B965D0A151EFCEC656693E1F3F96D55492E8F654F | Based on Widevine ID. May change on factory reset. Remains persistent if App is reinstalled. May change if device is configured to use SL1 or SL3 |
Chrome browser
| Web | Chrome | ed795314-624e-476d-9e7b-dfceba30cfb9 | Randomly generated. Changes when browsing in incognito mode, reset cache or browser re-install. |
Edge browser | Web | Edge | e0f652d1-d01e-4614-b298-8a2f169b1779 | |
Firefox browser | Web | Firefox | d17b9c1d-e7e6-4f05-9545-e92c9cd6d877 | |
Safari browser | Web | Safari | 5888a9ae-5ba5-401f-a36a-a19536bf10c4 | |
Samsung SmartTV | Web running in Tizen application | Samsung UE43RU7020KXXU Tizen | D4023178BE2D467714BA3536278DAFD4 | Based on Widevine ID. May change if device is configured to use SL1 or SL3 |
Samsung SmartTV | TVKeyCloud | F102000000001C4A | 8753158869 | Based on the TVKeyCloud SoC UID Persistent for all the device's lifecycle |
LG SmartTV | Web | 50UM7600PLB | e834b92a-4d08-175a-7a13-7c6d381ff95e | Based on LG ID from WebOS. Persistent for all the device’s lifecycle. |
AndroidTV devices (SmartTVs, STBs, etc..) | Android | Sony BRAVIA 4K GB BRAVIA_ATV2 | 74384CC01CAAC60A75E7C12870180670 | Based on Widevine ID. May change if device is configured to use SL1 or SL3 Persistent to factory reset |
Chromecast | Web | Google Inc. caprica-b4 caprica | 1ABFFE050CCBB50B1B150B04BA8C9A81 | Based on Widevine ID. May change if device is configured to use SL1 or SL3 Persistent to factory reset |
tvOS | Connect | TvOS-DAS | prm.NAGRA/0211/FEL.FFFF17FFFF1DFF6AFF16FFFFFF57FF62FFFF40FF771869FFFF6EFF79FFFFFF07 | Randomly generated. Will change on factory reset. Remains persistent if App is reinstalled. |