Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
WsbEcmDecrypter.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - ECM Decrypter Module
4 |
5 | $Id$
6 | Original author: Edin Hodzic ([email protected])
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) 2010-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_ECM_DECRYPTER_H_
22 #define _WSB_ECM_DECRYPTER_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "WsbTypes.h"
28 #include "WsbMediaFile.h"
29 #include "WsbKeyManager.h"
30 
31 /*----------------------------------------------------------------------
32 | prototypes
33 +---------------------------------------------------------------------*/
89 /*----------------------------------------------------------------------
90 | types
91 +---------------------------------------------------------------------*/
92 
100 
104 typedef enum {
105  WSB_MP2TS_KEY_EVEN, /* <- even MPEG-2 TS key */
106  WSB_MP2TS_KEY_ODD /* <- odd MPEG-2 TS key */
108 
112 typedef enum {
119 
120 
124 typedef enum {
129 
135 
139 typedef enum {
143  WSB_KIF_NEXT_IV = (1<<3),
149 
153 typedef struct {
160 
162  const void* format_params;
163 
165 
170 
175 
182 } WSB_KsmInfo;
183 
187 typedef struct {
188 
190  void* instance;
191 
214  WSB_Result (*OnNewMediaFile)(void* instance,
215  WSB_MediaFile* media_file,
216  WSB_KeyManager* key_manager);
217 
234  void (*OnKsmInfoChange)(void* instance,
235  const WSB_KsmInfo* key_info,
236  WSB_UInt32 change_mask);
237 
239 
240 /*----------------------------------------------------------------------
241 | functions
242 +---------------------------------------------------------------------*/
243 #if defined(__cplusplus)
244 extern "C" {
245 #endif
246 
262 WSB_EXPORT WSB_Result
264  WSB_Mpeg2TsTrafficKey_Format key_format,
265  const void* key_format_params,
266  /* returns */ WSB_EcmDecrypter** ecm_decrypter);
267 
276 WSB_EXPORT WSB_Result
278 
290 WSB_EXPORT WSB_Result
292  const WSB_Byte* pmt_table,
293  WSB_Size pmt_len,
294  /* returns */
295  WSB_UInt16* ecm_pid);
296 
308 WSB_EXPORT WSB_Result
310  const WSB_Byte* cat_table,
311  WSB_Size cat_len,
312  /* returns */
313  WSB_UInt16* mrt_pid);
314 
326 WSB_EXPORT WSB_Result
328  const WSB_Byte* ecm_table,
329  WSB_Size ecm_len);
330 
342 WSB_EXPORT WSB_Result
344  const WSB_Byte* mr_table,
345  WSB_Size mrt_len);
346 
349 #ifdef __cplusplus
350 }
351 #endif
352 
353 #endif /* _WSB_ECM_DECRYPTER_H_ */
Definition: WsbEcmDecrypter.h:142
Definition: WsbEcmDecrypter.h:145
WSB_Mpeg2TsTrafficKey_ProtectionSystem
Traffic keys protection system.
Definition: WsbEcmDecrypter.h:112
Definition: WsbEcmDecrypter.h:143
WSB_EXPORT WSB_Result WSB_EcmDecrypter_Destroy(WSB_EcmDecrypter *ecm_decrypter)
Destroys a WSB_EcmDecrypter object.
const WSB_Byte * current_iv
Definition: WsbEcmDecrypter.h:168
Definition: WsbEcmDecrypter.h:146
WSB_Size current_iv_size
Definition: WsbEcmDecrypter.h:169
Definition: WsbEcmDecrypter.h:140
WSB_KsmInfoFlag
KSM info field flags.
Definition: WsbEcmDecrypter.h:139
unsigned char WSB_UInt8
8-bit unsigned integer
Definition: WsbTypes.h:40
Definition: WsbEcmDecrypter.h:114
WSB_Mpeg2TsTrafficKey_Parity current_key_parity
Definition: WsbEcmDecrypter.h:164
Definition: WsbEcmDecrypter.h:113
WSB_EXPORT WSB_Result WSB_EcmDecrypter_UpdateMrt(WSB_EcmDecrypter *ecm_decrypter, const WSB_Byte *mr_table, WSB_Size mrt_len)
Provides the ECM decrypter object with a new MRT (Marlin Rights Table) table.
const void * format_params
Definition: WsbEcmDecrypter.h:162
WSB_UInt64 timestamp
Definition: WsbEcmDecrypter.h:178
WSB_UInt8 permissions_category
Definition: WsbEcmDecrypter.h:180
const WSB_Byte * next_iv
Definition: WsbEcmDecrypter.h:173
WSB_Size access_criteria_count
Definition: WsbEcmDecrypter.h:177
WSB_EXPORT WSB_Result WSB_EcmDecrypter_UpdatePmt(WSB_EcmDecrypter *ecm_decrypter, const WSB_Byte *pmt_table, WSB_Size pmt_len, WSB_UInt16 *ecm_pid)
Provides the ECM decrypter object with a new PMT table.
WSB_Mpeg2TsTrafficKey_Parity
Two kinds of BBTS traffic keys.
Definition: WsbEcmDecrypter.h:104
struct WSB_MediaFile WSB_MediaFile
A WSB_MediaFile object represents information about a media file.
Definition: WsbMediaFile.h:37
WSB_Mpeg2TsTrafficKey_ProtectionSystem protection
Definition: WsbEcmDecrypter.h:181
WSB_EXPORT WSB_Result WSB_EcmDecrypter_UpdateEcm(WSB_EcmDecrypter *ecm_decrypter, const WSB_Byte *ecm_table, WSB_Size ecm_len)
Provides the ECM decrypter object with a new ECM table (KSMT in IEC 62455 terms). ...
Definition: WsbEcmDecrypter.h:141
unsigned WSB_CONFIG_INT64_TYPE WSB_UInt64
Definition: WsbTypes.h:49
Clear AES 16-byte key, and 16-byte IV.
Definition: WsbEcmDecrypter.h:128
WSB_UInt8 key_lifetime
Definition: WsbEcmDecrypter.h:179
WSB_EXPORT WSB_Result WSB_EcmDecrypter_Create(const WSB_EcmDecrypter_Listener listener, WSB_Mpeg2TsTrafficKey_Format key_format, const void *key_format_params, WSB_EcmDecrypter **ecm_decrypter)
Instantiates a new WSB_EcmDecrypter object.
Definition: WsbEcmDecrypter.h:117
Definition: WsbEcmDecrypter.h:144
WSB_Byte * access_criteria
Definition: WsbEcmDecrypter.h:176
ECM decrypter listener callback object type.
Definition: WsbEcmDecrypter.h:187
MPEG-2 TS ECM/KSM info.
Definition: WsbEcmDecrypter.h:153
WSB_Mpeg2TsTrafficKey_Format format
Definition: WsbEcmDecrypter.h:161
WSB_Mpeg2TsTrafficKey_Format
MPEG-2 TS traffic key format.
Definition: WsbEcmDecrypter.h:124
void * instance
Listener instance pointer; gets passed into callback methods.
Definition: WsbEcmDecrypter.h:190
Definition: WsbEcmDecrypter.h:105
int WSB_Result
Signed integer value representing a function or method result (return value).
Definition: WsbTypes.h:83
const WSB_Byte * current_key
Definition: WsbEcmDecrypter.h:166
struct WSB_EcmDecrypter WSB_EcmDecrypter
WsbEcmDecrypter.h Interface to MPEG2 TS traffic key recovery.
Definition: WsbEcmDecrypter.h:99
Definition: WsbEcmDecrypter.h:115
unsigned short WSB_UInt16
16-bit unsigned integer
Definition: WsbTypes.h:38
WSB_UInt8 WSB_Byte
An 8-bit byte.
Definition: WsbTypes.h:132
Definition: WsbEcmDecrypter.h:106
unsigned int WSB_UInt32
32-bit (or more) unsigned integer
Definition: WsbTypes.h:36
Wasabi Media File API.
WSB_EXPORT WSB_Result WSB_EcmDecrypter_UpdateCat(WSB_EcmDecrypter *ecm_decrypter, const WSB_Byte *cat_table, WSB_Size cat_len, WSB_UInt16 *mrt_pid)
Provides the ECM decrypter object with a new CAT table.
struct WSB_KeyManager WSB_KeyManager
A WSB_KeyManager object can be used to register (set) and get content keys for a playback session...
Definition: EmbProcessor.h:237
WSB_UInt32 present_mask
A set of WSB_KsmInfoFlag values, bitwise OR&#39;ed together, indicating which fields of the structure wer...
Definition: WsbEcmDecrypter.h:159
const WSB_Byte * next_key
Definition: WsbEcmDecrypter.h:171
SecureKeyBox-exported traffic key.
Definition: WsbEcmDecrypter.h:133
Definition: WsbEcmDecrypter.h:147
WSB_Size next_key_size
Definition: WsbEcmDecrypter.h:172
Wasabi Key Manager API.
WSB_Size next_iv_size
Definition: WsbEcmDecrypter.h:174
WSB_Size current_key_size
Definition: WsbEcmDecrypter.h:167
Wasabi Result.
Definition: WsbEcmDecrypter.h:116
WSB_UInt32 WSB_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of a file).
Definition: WsbTypes.h:104