| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2007-2011 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_iplicensing.h $ |
|---|
| 39 | * $brcm_Revision: 1 $ |
|---|
| 40 | * $brcm_Date: 1/28/11 7:04p $ |
|---|
| 41 | * |
|---|
| 42 | * Module Description: |
|---|
| 43 | * |
|---|
| 44 | * Revision History: |
|---|
| 45 | * |
|---|
| 46 | * $brcm_Log: /nexus/extensions/security/iplicensing/7422/include/nexus_iplicensing.h $ |
|---|
| 47 | * |
|---|
| 48 | * 1 1/28/11 7:04p atruong |
|---|
| 49 | * SW7422-235: Enable Nexus Security extension modules for 97422 |
|---|
| 50 | * |
|---|
| 51 | ******************************************************************************/ |
|---|
| 52 | #ifndef NEXUS_SECURITYIPLICENSING_H__ |
|---|
| 53 | #define NEXUS_SECURITYIPLICENSING_H__ |
|---|
| 54 | |
|---|
| 55 | #include "nexus_security_datatypes.h" |
|---|
| 56 | #include "nexus_security.h" |
|---|
| 57 | |
|---|
| 58 | #ifdef __cplusplus |
|---|
| 59 | extern "C" { |
|---|
| 60 | #endif |
|---|
| 61 | |
|---|
| 62 | #define NEXUS_SECURITY_IPLICENSING_BUF_LEN 304 |
|---|
| 63 | /** |
|---|
| 64 | Summary: |
|---|
| 65 | This enum defines the DS2 data type for the IP Licensing op |
|---|
| 66 | |
|---|
| 67 | Description: |
|---|
| 68 | See Also: |
|---|
| 69 | NEXUS_SecurityIpLicensing |
|---|
| 70 | **/ |
|---|
| 71 | typedef enum NEXUS_SecurityIpLicensingDS2KeyType |
|---|
| 72 | { |
|---|
| 73 | NEXUS_SecurityIpLicensingDS2KeyType_eLSB, |
|---|
| 74 | NEXUS_SecurityIpLicensingDS2KeyType_eMSB, |
|---|
| 75 | NEXUS_SecurityIpLicensingDS2KeyType_eMax |
|---|
| 76 | } NEXUS_SecurityIpLicensingDS2KeyType; |
|---|
| 77 | |
|---|
| 78 | /** |
|---|
| 79 | Summary: |
|---|
| 80 | This structure provides the IP Licensing data operation settings |
|---|
| 81 | |
|---|
| 82 | Description: |
|---|
| 83 | See Also: |
|---|
| 84 | NEXUS_Security_PerformIpLicensing |
|---|
| 85 | **/ |
|---|
| 86 | typedef struct NEXUS_SecurityIpLicensingSettings |
|---|
| 87 | { |
|---|
| 88 | NEXUS_SecurityIpLicensingDS2KeyType ds2KeyType; |
|---|
| 89 | uint32_t dataSize; |
|---|
| 90 | uint8_t inputBuf[NEXUS_SECURITY_IPLICENSING_BUF_LEN]; |
|---|
| 91 | } NEXUS_SecurityIpLicensingSettings; |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | /** |
|---|
| 96 | Summary: |
|---|
| 97 | Get default NEXUS_SecurityIpLicensingSettings |
|---|
| 98 | **/ |
|---|
| 99 | void NEXUS_Security_GetDefaultIpLicensingSettings( |
|---|
| 100 | NEXUS_SecurityIpLicensingSettings *pSettings /* [out] */ |
|---|
| 101 | ); |
|---|
| 102 | |
|---|
| 103 | /** |
|---|
| 104 | Summary: |
|---|
| 105 | This function performs IP Licensing operation |
|---|
| 106 | |
|---|
| 107 | Description: |
|---|
| 108 | This function encrypts/decrypts data based on the AES key |
|---|
| 109 | **/ |
|---|
| 110 | NEXUS_Error NEXUS_Security_PerformIpLicensing( |
|---|
| 111 | const NEXUS_SecurityIpLicensingSettings *pSettings |
|---|
| 112 | ); |
|---|
| 113 | |
|---|
| 114 | #ifdef __cplusplus |
|---|
| 115 | } |
|---|
| 116 | #endif |
|---|
| 117 | |
|---|
| 118 | #endif |
|---|