The Web Device Authentication Client a.k.a W-DAC provides device authentication service for the web client device and also enables trusted exchange of information with the server a.k.a API Gateway here in this document. It provides API interface to operator application to perform operations(encrypt, decrypt, sign, verify) using W-DAC. The keys required for these operations are delivered to operator Application by API Gateway. The delivered session keys are protected with device secrets to be used by the device entitled for reception of the keys. The API Gateway leverages the DAS (Device Authentication Service) functionality provided by Nagra Security Service Platform a.k.a SSP for generating the protected session keys to the device requested for it. The session keys can be used by operator application to encrypt/decrypt the data sent and received from API Gateway respectively. The session key can also be used by operator application to generate the authentication tag for message being sent to API Gateway and verify the authentication tag received from the API Gateway.
The algorithms currently supported are the following:
- AES-128/CBC/PKCS7Padding128 for the encryption/decryption
- HMAC-SHA256 for authentication/verification
Features
The provided features of the Device Authentication Client API are:
- Device Authentication: This feature will be used by operator application to request W-DAC to generate a message which will be sent to API Gateway, to authenticate the device with the content available in the message.
- Encryption/Decryption: This feature will be used by operator application to request W-DAC to perform encryption of data being sent and decryption of data received from API Gateway.
- Sign/Verify: This feature will be used by
operator application to request W-DAC to generate Authentication
tag of data data being sent and verification of authentication tag
received from API Gateway.
Device Authentication
For the device to be authenticated, the operator application requests Device Authentication Client to generate a message a.k.a challenge which contains trusted device identifier and platform parameters. This message will be delivered by the operator application to the API Gateway to receive the protected session keys, which will be used further for secure communication with API Gateway. For the successful generation of challenge and handling of received protected session keys, the Device Authentication Client must be initialized in order to allocate the required resources and terminated when no longer needed in order to release these resources.
Device Authentication Client Initialization
init() needs to be called at the application start up in order to validate the per operator opvault file.
Device Authentication and License Acquisition
- In order to request a license, the application needs to request authentication data from the W-DAC (ie the challenge) and to send it to API Gateway
- Once authenticated, the client application will be able to fetch a license (which contains protected session keys).
- Once fetched, the license can be imported into the Device Authentication Client SDK
- The client is now ready to do crypto operations.
AES-128/CBC/PKCS7Padding128-CBC Encryption
- The application indicates which key to use to perform the encryption. The Device Authentication Client encrypts with AES-CBC and adds the padding to the data (PKCS#7 padding).
AES128-CBC Decryption
- The application indicates which key to use to perform the
decryption. The Device Authentication Client decrypts with
AES-CBC and removes the padding from the data (PKCS#7 padding) so
that the application directly gets the correct length of the
decrypted data.
- The application indicates which key to use to perform the
decryption. The Device Authentication Client decrypts with
AES-CBC and removes the padding from the data (PKCS#7 padding) so
that the application directly gets the correct length of the
decrypted data.
HMAC-SHA256 Sign/Verify
Authentication tag computation
- The application indicates which key to use to perform the AES128 HMAC. All the data to be authenticated shall be contiguous in the input buffer, the computation is performed in one call.
Authentication tag verification
- The application indicates which key to use to perform the AES128 HMAC. All the data which authenticity shall be checked shall be contiguous in the input buffer, the computation is performed in one call.
Closing the session
The client application can open as many sessions as it requires, and each one will work independently with its own set of keys.
It's important to close sessions whenever they are no longer needed in order to free the related resources.
Notice that a given session is not visible across browser tabs, let alone between different windows.
Definitions
DAC session
This identifier is provided when an DAC session is created. It must be provided to all crypto operations. It is referred to as sessionId.
Dependencies
The clients integrating dasWebSDK need to include the following dependencies:
<script type="text/javascript" src="lib/promise-7.0.4.min.js"></script>
<script type="text/javascript" src="lib/webcrypto-shim.js"></script>
<script type="text/javascript" src="lib/jose-core.js"></script>
<script type="text/javascript" src="lib/jose-jwe-webcryptographer.js"></script>
<script type="text/javascript" src="lib/jose-jws-sign.js"></script>
<script type="text/javascript" src="lib/jose-jws-verify.js"></script>
<script type="text/javascript" src="lib/jose-utils.js"></script>
<script type="text/javascript" src="lib/jose-jwe-encrypt.js"></script>
<script type="text/javascript" src="lib/jose-jwe-decrypt.js"></script>
<script type="text/javascript" src="lib/jquery-3.3.1.js"></script>
<script type="text/javascript" src="lib/webOSTV.js"></script>





