source: svn/trunk/newcon3bcm2_21bu/nexus/modules/security/7552/include/nexus_security.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 8.8 KB
Line 
1/***************************************************************************
2 *     (c)2007-2010 Broadcom Corporation
3 *
4 *  This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 *  and may only be used, duplicated, modified or distributed pursuant to the terms and
6 *  conditions of a separate, written license agreement executed between you and Broadcom
7 *  (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 *  no license (express or implied), right to use, or waiver of any kind with respect to the
9 *  Software, and Broadcom expressly reserves all rights in and to the Software and all
10 *  intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 *  HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 *  NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
13 *
14 *  Except as expressly set forth in the Authorized License,
15 *
16 *  1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 *  secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 *  and to use this information only in connection with your use of Broadcom integrated circuit products.
19 *
20 *  2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 *  AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 *  WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 *  THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 *  LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 *  OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 *  USE OR PERFORMANCE OF THE SOFTWARE.
28 *
29 *  3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 *  LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 *  EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 *  USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 *  THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 *  ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 *  LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 *  ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile: nexus_security.h $
39 * $brcm_Revision: 13 $
40 * $brcm_Date: 10/7/10 11:04a $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /nexus/modules/security/7400/include/nexus_security.h $
47 *
48 * 13   10/7/10 11:04a erickson
49 * SW7420-1148: add destructor hints
50 *
51 * 12   5/10/10 10:47a erickson
52 * SW7550-415: add NEXUS_Security_GetDefaultClearKey. remove redundant
53 *  comments.
54 *
55 * 11   3/16/10 9:46a erickson
56 * SW7400-2678: add NEXUS_Security_InvalidateKey
57 *
58 * 10   1/7/09 2:30p jgarrett
59 * PR 50093: Adding Multi2
60 *
61 * 9   9/3/08 3:29p erickson
62 * PR45612: update
63 *
64 * 8   6/23/08 6:15p mphillip
65 * PR40027: Tidy up naming conventions to match with Nexus
66 *
67 * 7   6/17/08 6:16p mphillip
68 * PR40027: Retrieve more information from KeySlotHandle
69 *
70 * 6   6/17/08 11:14a mphillip
71 * PR40027: M2M function headers
72 *
73 * 5   6/17/08 12:31a mphillip
74 * PR40027: Keyslot changes for shim layer
75 *
76 * 4   5/29/08 10:57a mphillip
77 * PR38369: Fix consts to allow kernel builds
78 *
79 * 3   5/28/08 2:32p mphillip
80 * PR38369: Refactor keyslot configuration to Security module from Crypto
81 *  module
82 *
83 * 2   2/29/08 11:04a erickson
84 * PR37137: create stub to remove sync thunk warning
85 *
86 * 1   1/18/08 2:21p jgarrett
87 * PR 38808: Merging to main branch
88 *
89 * Nexus_Devel/1   11/15/07 3:54p erickson
90 * PR37137: added Security module
91 *
92 **************************************************************************/
93#ifndef NEXUS_SECURITY_H__
94#define NEXUS_SECURITY_H__
95
96#include "nexus_security_datatypes.h"
97
98/*=***********************************
99*************************************/
100
101#ifdef __cplusplus
102extern "C"
103{
104#endif
105
106/**
107Summary:
108This function retrieves keyslot information from a keyslot handle.
109
110Description:
111This function shall retrieve keyslot information from a keyslot handle.
112
113See Also:
114NEXUS_KeySlotInfo
115**/
116void NEXUS_Security_GetKeySlotInfo(
117    NEXUS_KeySlotHandle keyHandle,
118    NEXUS_SecurityKeySlotInfo * pKeyslotInfo /* [out] */
119    );
120
121/**
122Summary:
123Get default NEXUS_SecurityClearKey
124**/
125void NEXUS_Security_GetDefaultClearKey(
126    NEXUS_SecurityClearKey *pClearKey /* [out] */
127    );
128
129/**
130Summary:
131This function loads a clear key to a keyslot.
132
133Description:
134This function shall load clear key into the keyslot.
135
136Performance and Timing:
137This is a synchronous function that will return when it is done.
138**/
139NEXUS_Error NEXUS_Security_LoadClearKey(
140    NEXUS_KeySlotHandle keyHandle,
141    const NEXUS_SecurityClearKey *pClearKey
142    );
143
144
145/**
146Summary:
147This function retrieves default keyslot settings.
148
149See Also:
150NEXUS_SecurityKeySlotSettings
151**/
152void NEXUS_Security_GetDefaultKeySlotSettings(
153    NEXUS_SecurityKeySlotSettings *pSettings /* [out] */
154    );
155
156/**
157Summary:
158This function creates a keyslot handle.
159
160Description:
161This function shall create a keyslot handle based on the provided information.
162
163Performance and Timing:
164This is a synchronous function that will return when it is done.
165
166Returns:
167NEXUS_KeySlotHandle on success, NULL on failure.
168
169See Also:
170NEXUS_Security_GetDefaultKeySlotSettings
171NEXUS_Security_FreeKeySlot
172
173**/
174NEXUS_KeySlotHandle NEXUS_Security_AllocateKeySlot( /* attr{destructor=NEXUS_Security_FreeKeySlot} */
175    const NEXUS_SecurityKeySlotSettings *pSettings
176    );
177
178/**
179Summary:
180**/
181NEXUS_KeySlotHandle NEXUS_Security_LocateCaKeySlotAssigned( /* attr{destructor=NEXUS_Security_FreeKeySlot} */
182    unsigned long pidchannel
183    );
184
185
186/*****************************************************************************
187Summary:
188This function frees a keyslot handle.
189
190Description:
191See Also:
192NEXUS_Security_AllocateKeySlot
193**/
194void NEXUS_Security_FreeKeySlot(
195    NEXUS_KeySlotHandle keyHandle
196    );
197
198
199/**
200Summary:
201This function adds a PID channel to the CA or CACP keyslot.
202
203Description:
204This function shall add a PID channel to the CA or CACP keyslot. The newly
205added PID channel will use the alogirthm and key value of the CA or CACP
206keyslot for descrambling or descrambling followed by CPS.
207
208See Also:
209NEXUS_Security_RemovePidChannelFromKeySlot
210**/
211NEXUS_Error NEXUS_Security_AddPidChannelToKeySlot(
212    NEXUS_KeySlotHandle keyHandle,
213    unsigned int pidChannel
214    );
215
216
217/**
218Summary:
219This function removes a PID channel from the CA or CACP keyslot.
220
221Description:
222This function shall remove a PID channel from the CA or CACP keyslot. The
223removed PID channel will NOT use the algorithm and key value of the CA or CACP
224keyslot anymore.
225
226See Also:
227NEXUS_Security_AddPidChannelToKeySlot
228
229**/
230NEXUS_Error NEXUS_Security_RemovePidChannelFromKeySlot(
231    NEXUS_KeySlotHandle keyHandle,
232    unsigned int pidChannel
233    );
234
235/**
236Summary:
237This function retrieves default settings for CACP key invalidation.
238
239Description:
240This function shall retrieve default settings for CACP key invalidation.
241
242See Also:
243NEXUS_Security_InvalidateKey
244**/
245void NEXUS_Security_GetDefaultInvalidateKeySettings(
246    NEXUS_SecurityInvalidateKeySettings *pSettings /* [out] */
247    );
248
249
250/**
251Summary:
252This function invalidates the current settings for the key slot specified by keyHandle
253
254Description:
255See Also:
256NEXUS_SecurityInvalidateKeySettings
257**/
258NEXUS_Error NEXUS_Security_InvalidateKey(
259    NEXUS_KeySlotHandle keyHandle,
260    const NEXUS_SecurityInvalidateKeySettings *pSettings
261    );
262
263
264/**
265Summary:
266This function retrieves default algorithm settings.
267**/
268void NEXUS_Security_GetDefaultAlgorithmSettings(
269    NEXUS_SecurityAlgorithmSettings *pSettings /* [out] */
270    );
271
272/**
273Summary:
274This function configures algorithm on a keyslot.
275
276Description:
277Performance and Timing:
278This is a synchronous function that will return when it is done.
279
280See Also:
281NEXUS_Security_AllocateKeySlot
282NEXUS_Security_GetDefaultAlgorithmSettings
283**/
284NEXUS_Error NEXUS_Security_ConfigAlgorithm(
285    NEXUS_KeySlotHandle keyHandle,
286    const NEXUS_SecurityAlgorithmSettings *pSettings
287    );
288
289/**
290Summary:
291This function retrieves default multi2 settings.
292**/
293void NEXUS_Security_GetDefaultMulti2Settings(
294    NEXUS_SecurityMulti2Settings *pSettings /* [out] */
295    );
296
297/**
298Summary:
299This function configures Multi2 on a keyslot.
300
301Description:
302This function shall configure multi2 on a keyslot.
303
304Performance and Timing:
305This is a synchronous function that will return when it is done.
306
307See Also:
308NEXUS_Security_AllocateKeySlot
309NEXUS_Security_GetDefaultAlgorithmSettings
310**/
311NEXUS_Error NEXUS_Security_ConfigMulti2(
312    NEXUS_KeySlotHandle keyHandle,
313    const NEXUS_SecurityMulti2Settings *pSettings
314    );
315
316#ifdef __cplusplus
317} /* extern "C" */
318#endif
319
320#endif
Note: See TracBrowser for help on using the repository browser.