1 /** @file crypt_new.h 2 * 3 * @brief This file contains define for rc4 decrypt/encrypt 4 * 5 * Copyright (C) 2014-2017, Marvell International Ltd. 6 * 7 * This software file (the "File") is distributed by Marvell International 8 * Ltd. under the terms of the GNU General Public License Version 2, June 1991 9 * (the "License"). You may use, redistribute and/or modify this File in 10 * accordance with the terms and conditions of the License, a copy of which 11 * is available by writing to the Free Software Foundation, Inc., 12 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 13 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 14 * 15 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 17 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 18 * this warranty disclaimer. 19 */ 20 21 /****************************************************** 22 Change log: 23 03/07/2014: Initial version 24 ******************************************************/ 25 /* 26 * AES API header file 27 * 28 */ 29 30 #ifndef _CRYPT_NEW_H_ 31 #define _CRYPT_NEW_H_ 32 33 #include "crypt_new_rom.h" 34 35 /* forward decl */ 36 typedef void (*MRVL_ENDECRYPT_FUNC_p) (MRVL_ENDECRYPT_t *enDeCrypt, int *pErr); 37 #if 0 38 #if (HW_IP_AEU_VERSION < 100000) 39 40 #ifdef WAPI_HW_SUPPORT 41 extern void MRVL_WapiEncrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); 42 extern void MRVL_WapiDecrypt(MRVL_ENDECRYPT_t *crypt, int *pErr); 43 44 #define MRVL_WAPI_ENCRYPT MRVL_WapiEncrypt 45 #define MRVL_WAPI_DECRYPT MRVL_WapiDecrypt 46 #endif 47 48 #ifdef DIAG_AES_CCM 49 #define MRVL_AES_CCM_ENCRYPT MRVL_AesCCMEncrypt 50 #define MRVL_AES_CCM_DECRYPT MRVL_AesCCMDecrypt 51 #endif 52 53 #endif /*(HW_IP_AEU_VERSION < 100000) */ 54 #endif 55 #define MRVL_AES_PRIMITIVE_ENCRYPT MRVL_AesPrimitiveEncrypt 56 #define MRVL_AES_PRIMITIVE_DECRYPT MRVL_AesPrimitiveDecrypt 57 #define MRVL_AES_WRAP_ENCRYPT MRVL_AesWrapEncrypt 58 #define MRVL_AES_WRAP_DECRYPT MRVL_AesWrapDecrypt 59 60 #ifdef RC4 61 62 #define MRVL_RC4_ENCRYPT MRVL_Rc4Cryption 63 #define MRVL_RC4_DECRYPT MRVL_Rc4Cryption 64 65 #endif /* RC4 */ 66 67 typedef struct { 68 MRVL_ENDECRYPT_e action; 69 MRVL_ENDECRYPT_FUNC_p pActionFunc; 70 71 } MRVL_ENDECRYPT_SETUP_t; 72 73 extern MRVL_ENDECRYPT_SETUP_t mrvlEnDecryptSetup[2][6]; 74 75 extern void cryptNewRomInit(void); 76 77 #endif /* _CRYPT_NEW_H_ */ 78