Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
WsbMediaAesDecrypter.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Media AES Decrypter API
4 |
5 | $Id: WsbMediaAesDecrypter.h 14593 2018-07-24 02:02:16Z hwa $
6 | Original author: John Hwa
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2018 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_MEDIA_AES_DECRYPTER_H_
22 #define _WSB_MEDIA_AES_DECRYPTER_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "WsbTypes.h"
28 #include "Ts2Iec62455.h"
29 
30 /*----------------------------------------------------------------------
31 | macros
32 +---------------------------------------------------------------------*/
33 #define WSB_MAD_VERSION 0X00010000
34 
38 #define WSB_MADS_COMMON_ENC_CENC 1
39 #define WSB_MADS_COMMON_ENC_CBCS 2
40 #define WSB_MADS_BBTS_CBC 3 /* only support BBTS >= 2.0.0 */
41 
42 /*----------------------------------------------------------------------
43 | types
44 +---------------------------------------------------------------------*/
48 typedef struct {
53 
58 
63 
69 
73 typedef struct {
76 
80 typedef struct {
82 
89 
94 
100 
104 typedef struct {
109 
111  union {
114  } scheme;
116 
120 typedef struct {
125 
131 
135 typedef struct {
140 
145 
162 
166 typedef struct {
181 
185 typedef struct {
192 
196 typedef struct {
198  union {
202  } of;
204 
211 typedef struct {
220 
227 
231 typedef struct {
233 
235  union {
237  } of;
239 
240 /*----------------------------------------------------------------------
241 | functions
242 +---------------------------------------------------------------------*/
243 #if defined(__cplusplus)
244 extern "C" {
245 #endif
246 
254 
273 WSB_EXPORT WSB_Result
275  WSB_MediaAesDecrypter** decrypter);
276 
321 WSB_EXPORT WSB_Result
323  const WSB_MediaAesDecrypterParams* in_params,
324  const WSB_Byte* in_data,
325  WSB_UInt32 in_data_size,
326  WSB_Byte** sec_buf,
327  WSB_UInt32* sec_buf_size);
328 
348 WSB_EXPORT WSB_Result
350  const WSB_MediaAesDecrypterUpdate* update);
351 
361 WSB_EXPORT WSB_Result
363 
366 #if defined(__cplusplus)
367 }
368 #endif
369 
370 #endif /* _WSB_MEDIA_AES_DECRYPTER_H_ */
371 
Content access information.
Definition: WsbMediaAesDecrypter.h:48
WSB_UInt32 subsample_count
Encrypted video track in this scheme using NAL unit structured video conforming to ISO/IEC 14496-15 s...
Definition: WsbMediaAesDecrypter.h:178
Marlin Broadband Transport Stream update information.
Definition: WsbMediaAesDecrypter.h:211
WSB_CommonEncSubsample * subsamples
Definition: WsbMediaAesDecrypter.h:179
WSB_EXPORT WSB_Result WSB_MediaAesDecrypter_Update(WSB_MediaAesDecrypter *decrypter, const WSB_MediaAesDecrypterUpdate *update)
This function is only applicable for decrypter that is created with WSB_MADS_BBTS_CBC decryption_sche...
WSB_BbtsPacketParams bbts
Definition: WsbMediaAesDecrypter.h:201
WSB_CommonEncCbcsSampleParams cbcs
Definition: WsbMediaAesDecrypter.h:200
const WSB_Byte * per_sample_iv
Unique IV (per sample) byte array.
Definition: WsbMediaAesDecrypter.h:144
WSB_UInt32 subsample_count
Encrypted video track in this scheme using NAL unit structured video conforming to ISO/IEC 14496-15 s...
Definition: WsbMediaAesDecrypter.h:159
Media AES decrypter configuration.
Definition: WsbMediaAesDecrypter.h:104
Decryption scheme using Common Encryption cenc (AES-CTR mode).
Definition: WsbMediaAesDecrypter.h:73
WSB_Size proteced_data_size
Protected data in number of bytes.
Definition: WsbMediaAesDecrypter.h:129
WSB_EXPORT WSB_Result WSB_MediaAesDecrypter_Destroy(WSB_MediaAesDecrypter *decrypter)
Destroy the media AES decrypter object created earlier through WSB_MediaAesDecrypter_Create.
WSB_Byte decryption_scheme
Definition: WsbMediaAesDecrypter.h:234
WSB_UInt32 kdf_type
Key derivation function type.
Definition: WsbMediaAesDecrypter.h:219
WSB_DecContentAccess content_access
Definition: WsbMediaAesDecrypter.h:74
WSB_Size per_sample_iv_size
IV size (in bytes) and should be 8-bytes for this scheme.
Definition: WsbMediaAesDecrypter.h:139
WSB_CommonEncCencSampleParams cenc
Definition: WsbMediaAesDecrypter.h:199
WSB_DecContentAccess content_access
Definition: WsbMediaAesDecrypter.h:232
WSB_Byte decryption_scheme
Definition: WsbMediaAesDecrypter.h:197
const WSB_Byte * content_id
Content id.
Definition: WsbMediaAesDecrypter.h:57
WSB_Size crypt_byte_block
Pattern encryption with crypt_byte_block + skip_byte_block equal 10 for video and no pattern encrypti...
Definition: WsbMediaAesDecrypter.h:87
WSB_Size content_key_size
Content key size (in bytes).
Definition: WsbMediaAesDecrypter.h:62
Decryption scheme using Common Encryption cbcs (AES-CBC mode).
Definition: WsbMediaAesDecrypter.h:80
WSB_Size clear_data_size
Clear data in number of bytes.
Definition: WsbMediaAesDecrypter.h:124
WSB_EXPORT WSB_Result WSB_MediaAesDecrypter_Create(const WSB_MediaAesDecrypterConfig *config, WSB_MediaAesDecrypter **decrypter)
Create the media AES decrypter.
WSB_CommonEncSubsample * subsamples
Definition: WsbMediaAesDecrypter.h:160
WSB_Size content_id_size
Content id size (in bytes, not include terminating NULL).
Definition: WsbMediaAesDecrypter.h:52
WSB_EXPORT WSB_Result WSB_MediaAesDecrypter_Decrypt(WSB_MediaAesDecrypter *decrypter, const WSB_MediaAesDecrypterParams *in_params, const WSB_Byte *in_data, WSB_UInt32 in_data_size, WSB_Byte **sec_buf, WSB_UInt32 *sec_buf_size)
Decrypt input data into a secure buffer.
WSB_DecSchemeCencCenc cenc
Definition: WsbMediaAesDecrypter.h:112
WSB_DecSchemeCencCbcs cbcs
Definition: WsbMediaAesDecrypter.h:113
Media AES decrypter parameters.
Definition: WsbMediaAesDecrypter.h:196
WSB_Byte decryption_scheme
Definition: WsbMediaAesDecrypter.h:110
const WSB_Byte * content_key
Content key byte array (e.g., from WSB_KeyManager).
Definition: WsbMediaAesDecrypter.h:67
const WSB_Byte * ksmt_section
Definition: WsbMediaAesDecrypter.h:225
struct WSB_MediaAesDecrypter WSB_MediaAesDecrypter
Definition: WsbMediaAesDecrypter.h:253
const WSB_Byte * constant_iv
Constant IV byte array.
Definition: WsbMediaAesDecrypter.h:98
Marlin Broadband Transport Stream packet parameters.
Definition: WsbMediaAesDecrypter.h:185
int WSB_Result
Signed integer value representing a function or method result (return value).
Definition: WsbTypes.h:83
Media AES decrypter update information.
Definition: WsbMediaAesDecrypter.h:231
WSB_Size constant_iv_size
Constant IV size (in bytes).
Definition: WsbMediaAesDecrypter.h:93
Common Encryption cbcs sample parameters.
Definition: WsbMediaAesDecrypter.h:166
WSB_UInt8 WSB_Byte
An 8-bit byte.
Definition: WsbTypes.h:132
WSB_Size ksmt_section_size
Key Stream Message Table (KSMT) section size (in bytes) and data.
Definition: WsbMediaAesDecrypter.h:224
unsigned int WSB_UInt32
32-bit (or more) unsigned integer
Definition: WsbTypes.h:36
Common Encryption subsample.
Definition: WsbMediaAesDecrypter.h:120
WSB_BbtsUpdate bbts
Definition: WsbMediaAesDecrypter.h:236
Common Encryption cenc sample parameters.
Definition: WsbMediaAesDecrypter.h:135
WSB_UInt32 version
The structure version, set to WSB_MAD_VERSION.
Definition: WsbMediaAesDecrypter.h:108
WSB_UInt32 ts_packet_count
Transport Stream packet count must be one or more 188 bytes fixed size packets.
Definition: WsbMediaAesDecrypter.h:190
Wasabi Result.
WSB_DecContentAccess content_access
Definition: WsbMediaAesDecrypter.h:81
WSB_Size skip_byte_block
Definition: WsbMediaAesDecrypter.h:88
WSB_UInt32 WSB_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of a file).
Definition: WsbTypes.h:104