📄 sec2_global.c
字号:
* Copyright (c) 2005 Freescale Semiconductor * All Rights Reserved. Proprietary and Confidential. * * NOTICE: The information contained in this file is proprietary * to Freescale Semiconductor. and is being made available to * Freescale's customers under strict license agreements. * Use or disclosure of this information is permissible only * under the terms of the existing license agreement. ***************************************************************************//* * Revision History: * 1.0 Aug 24,2003 dgs - adapted from the final version of mpc18x * May 24,2003 sec - update types for ECC operations * Aug 23,2003 sec - add TLS support * Nov 22,2004 sec - merge in Linux changes * Jan 17,2004 sec - change header for outbound CCMP requests * 1.2 Jan 27,2005 sec - delete and typedef some obsolete names, remove * nonpad IPSec types *//* * Header constants for AESA_CRYPT_REQ / DPD_AESA_CRYPT_GROUP * Note that CCM and SRT modes are not handled by this request type, * they are deployed in the SRTP and CCMP request types. * Basic AES ECB, CBC, and counter mode are handled here. */
const unsigned long AesaDesc[1*NUM_AESA_CRYPT_DESC] = { /* DPD_AESA_CBC_ENCRYPT_CRYPT OpId 0x6000 */ /* CM = 1 (cbc), encrypt on */ /* desc type = 2 (common, nosnoop) */ 0x60300010, /* DPD_AESA_CBC_DECRYPT_CRYPT OpId 0x6001 */ /* CM = 1 (cbc), encrypt off */ /* desc type = 2 (common, nosnoop) */ 0x60200010, /* DPD_AESA_CBC_DECRYPT_CRYPT_RDK OpId 0x6002 */ /* RDK = noexpand, CM = 1 (cbc), encrypt off */ /* desc type = 2 (common, nosnoop) */ 0x60a00010, /* DPD_AESA_ECB_ENCRYPT_CRYPT OpId 0x6003 */ /* CM = 0 (ecb), encrypt on */ /* desc type = 2 (common, nosnoop) */ 0x60100010, /* DPD_AESA_ECB_DECRYPT_CRYPT_RDK OpId 0x6004 */ /* CM = 0 (ecb), encrypt off */ /* desc type = 2 (common, nosnoop) */ 0x60000010, /* DPD_AESA_ECB_DECRYPT_CRYPT OpId 0x6005 */ /* RDK = noexpand, CM = 1 (ecb), encrypt off */ /* desc type = 2 (common, nosnoop) */ 0x60800010, /* DPD_AESA_CTR_CRYPT OpId 0x6006 */ /* CM = 2 (ctr), encrypt off */ /* desc type = 2 (common, nosnoop) */ 0x60600010, /* DPD_AESA_CTR_HMAC OpId 0x6007 */ /* CM = 2 (ctr), encrypt off */ /* desc type = 24 (HMAC-snoop) */ 0x606000c0, };/* * Header constants for RNG_REQ / DPD_RNG_GROUP */ const unsigned long sec2_RngDesc[1*NUM_RNGA_DESC] = { /* DPD_RNG_GETRN Req OpId 0x1000 */ 0x40000010 };/* * Header constants for DES_CBC_CRYPT_REQ / DPD_DES_CBC_GROUP */ const unsigned long DesCbcReq[1 * NUM_DES_CBC_DESC] = { /* DPD_SDES_CBC_CTX_ENCRYPT Req OpId 0x2500 */ 0x20500010, /* DPD_SDES_CBC_CTX_DECRYPT Req OpId 0x2501 */ 0x20400010, /* DPD_TDES_CBC_CTX_ENCRYPT Req OpId 0x2502 */ 0x20700010, /* DPD_TDES_CBC_CTX_DECRYPT Req OpId 0x2503 */ 0x20600010 };/* * Header constants for DES_CRYPT_REQ / DPD_DES_ECB_GROUP */const unsigned long DesReq[1*NUM_DES_DESC] = { /* DPD_SDES_ECB_ENCRYPT Req OpId 0x2600 */ 0x20100010, /* DPD_SDES_ECB_DECRYPT Req OpId 0x2601 */ 0x20000010, /* DPD_TDES_ECB_ENCRYPT Req OpId 0x2602 */ 0x20300010, /* DPD_TDES_ECB_DECRYPT Req OpId 0x2603 */ 0x20200010 };/* * Header constants for * ARC4_LOADCTX_CRYPT_REQ / DPD_RC4_LDCTX_CRYPT_ULCTX_GROUP */ const unsigned long sec2_Rc4LoadCtxUnloadCtxReq[1*NUM_RC4_LOADCTX_UNLOADCTX_DESC] = { /* DPD_RC4_LDCTX_CRYPT_ULCTX_GROUP OpId 0x3400 */ 0x10700050 };/* * Header constants for * ARC4_LOADKEY_CRYPT_UNLOADCTX_REQ / DPD_RC4_LDKEY_CRYPT_ULCTX_GROUP */const unsigned long sec2_Rc4LoadKeyUnloadCtxReq[1*NUM_RC4_LOADKEY_UNLOADCTX_DESC] = { /* DPD_RC4_LDKEY_CRYPT_ULCTX Req OpId 0x3500 */ 0x10200050 };/* * Header constants for HASH_REQ / DPD_HASH_LDCTX_HASH_ULCTX_GROUP */const unsigned long sec2_MdhaReq[1*NUM_MDHA_DESC] = { /* DPD_SHA256_LDCTX_HASH_ULCTX OpId 0x4400 */ 0x30100010, /* DPD_MD5_LDCTX_HASH_ULCTX OpId 0x4401 */ 0x30200010, /* DPD_SHA_LDCTX_HASH_ULCTX OpId 0x4402 */ 0x30000010, /* DPD_SHA256_LDCTX_IDGS_HASH_ULCTX OpId 0x4403 */ 0x31100010, /* DPD_MD5_LDCTX_IDGS_HASH_ULCTX OpId 0x4404 */ 0x31200010, /* DPD_SHA_LDCTX_IDGS_HASH_ULCTX OpId 0x4405 */ 0x31000010, /* DPD_SHA256_CONT_HASH_ULCTX OpId 0x4406 */ 0x38100010, /* DPD_MD5_CONT_HASH_ULCTX OpId 0x4407 */ 0x38200010, /* DPD_SHA_CONT_HASH_ULCTX OpId 0x4408 */ 0x38000010 };/* * Header constants for HASH_REQ / DPD_HASH_LDCTX_HASH_PAD_ULCTX_GROUP */const unsigned long sec2_MdhaPadReq[1*NUM_MDHA_PAD_DESC] = { /* DPD_SHA256_LDCTX_HASH_PAD_ULCTX OpId 0x4500 */ 0x30500010, /* DPD_MD5_LDCTX_HASH_PAD_ULCTX OpId 0x4501 */ 0x30600010, /* DPD_SHA_LDCTX_HASH_PAD_ULCTX OpId 0x4502 */ 0x30400010, /* DPD_SHA256_LDCTX_IDGS_HASH_PAD_ULCTX OpId 0x4503 */ 0x31500010, /* DPD_MD5_LDCTX_IDGS_HASH_PAD_ULCTX OpId 0x4504 */ 0x31600010, /* DPD_SHA_LDCTX_IDGS_HASH_PAD_ULCTX OpId 0x4505 */ 0x31400010, /* DPD_SHA256_CONT_HASH_PAD_ULCTX OpId 0x4506 */ 0x38500010, /* DPD_MD5_CONT_HASH_PAD_ULCTX OpId 0x4507 */ 0x38600010, /* DPD_SHA_CONT_HASH_PAD_ULCTX OpId 0x4508 */ 0x38400010 };/* * Header constants for HMAC_PAD_REQ / DPD_HASH_LDCTX_HMAC_ULCTX_GROUP *//* NOTE: The MD4 Descriptors are no longer supported */const unsigned long HmacPadReq[1*NUM_HMAC_PAD_DESC] = { /* DPD_SHA256_LDCTX_HMAC_ULCTX Req OpId 0x4a00 */ 0x31900010, /* DPD_MD5_LDCTX_HMAC_ULCTX Req OpId 0x4a01 */ 0x31A00010, /* DPD_SHA_LDCTX_HMAC_ULCTX Req OpId 0x4a02 */ 0x31800010, /* DPD_SHA256_LDCTX_HMAC_PAD_ULCTX Req OpId 0x4a03 */ 0x31D00010, /* DPD_MD5_LDCTX_HMAC_PAD_ULCTX Req OpId 0x4a04 */ 0x31E00010, /* DPD_SHA_LDCTX_HMAC_PAD_ULCTX Req OpId 0x4a05 */ 0x31C00010, };/* * Header constants for MOD_EXP_REQ DPD_MM_LDCTX_EXP_ULCTX_GROUP */const unsigned long sec2_PkhaMmExpReq[1*NUM_MM_EXP_DESC] = { /* DPD_MM_LDCTX_EXP_ULCTX Req OpId 0x5100 */ 0x50200080 };/* * Header constants for MOD_SS_EXP_REQ / DPD_MM_SS_RSA_EXP */const unsigned long sec2_PkhaMmSsExpReq[1*NUM_MM_SS_EXP_DESC] = { /* DPD_MM_SS_RSA_EXP Req OpId 0x5b00 */ 0x58000080 };/* * Header constants for MOD_R2MODN_REQ / DPD_MM_LDCTX_R2MODN_ULCTX_GROUP */const unsigned long PkhaModR2modnReq[1 * NUM_MOD_R2MODN_DESC] = { /* DPD_MM_LDCTX_R2MODN_ULCTX Req OpId 0x5200 */ 0x50300080 }; /* * Header constants for MOD_RRMODP_REQ / DPD_MM_LDCTX_RRMODP_ULCTX_GROUP */const unsigned long sec2_PkhaMmRrmodpReq[1*NUM_MM_RRMODP_DESC] = { /* DPD_MM_LDCTX_RRMODP_ULCTX Req OpId 0x5300 */ 0x50400080 };/* * Header constants for MOD_2OP_REQ / DPD_MM_LDCTX_2OP_ULCTX_GROUP */const unsigned long PkhaMod2OpReq[1 * NUM_MOD_2OP_DESC] = { /* DPD_MOD_LDCTX_MUL1_ULCTX Req OpId 0x5400 */ 0x53000080, /* DPD_MOD_LDCTX_MUL2_ULCTX Req OpId 0x5401 */ 0x54000080, /* DPD_MOD_LDCTX_ADD_ULCTX Req OpId 0x5402 */ 0x51000080, /* DPD_MOD_LDCTX_SUB_ULCTX Req OpId 0x5403 */ 0x52000080, /* DPD_POLY_LDCTX_A0_B0_MUL1_ULCTX Req OpId 0x5404 */ 0x56000080, /* DPD_POLY_LDCTX_A0_B0_MUL2_ULCTX Req OpId 0x5405 */ 0x57000080, /* DPD_POLY_LDCTX_A0_B0_ADD_ULCTX Req OpId 0x5406 */ 0x55000080, /* DPD_POLY_LDCTX_A1_B0_MUL1_ULCTX Req OpId 0x5407 */ 0x56400080, /* DPD_POLY_LDCTX_A1_B0_MUL2_ULCTX Req OpId 0x5408 */ 0x57400080, /* DPD_POLY_LDCTX_A1_B0_ADD_ULCTX Req OpId 0x5409 */ 0x55400080, /* DPD_POLY_LDCTX_A2_B0_MUL1_ULCTX Req OpId 0x540a */ 0x56800080, /* DPD_POLY_LDCTX_A2_B0_MUL2_ULCTX Req OpId 0x540b */ 0x57800080, /* DPD_POLY_LDCTX_A2_B0_ADD_ULCTX Req OpId 0x540c */ 0x55800080, /* DPD_POLY_LDCTX_A3_B0_MUL1_ULCTX Req OpId 0x540d */ 0x56c00080, /* DPD_POLY_LDCTX_A3_B0_MUL2_ULCTX Req OpId 0x540e */ 0x57c00080, /* DPD_POLY_LDCTX_A3_B0_ADD_ULCTX Req OpId 0x540f */ 0x55c00080, /* DPD_POLY_LDCTX_A0_B1_MUL1_ULCTX Req OpId 0x5410 */ 0x56100080, /* DPD_POLY_LDCTX_A0_B1_MUL2_ULCTX Req OpId 0x5411 */ 0x57100080, /* DPD_POLY_LDCTX_A0_B1_ADD_ULCTX Req OpId 0x5412 */ 0x55100080, /* DPD_POLY_LDCTX_A1_B1_MUL1_ULCTX Req OpId 0x5413 */ 0x56500080, /* DPD_POLY_LDCTX_A1_B1_MUL2_ULCTX Req OpId 0x5414 */ 0x57500080, /* DPD_POLY_LDCTX_A1_B1_ADD_ULCTX Req OpId 0x5415 */ 0x55500080, /* DPD_POLY_LDCTX_A2_B1_MUL1_ULCTX Req OpId 0x5416 */ 0x56900080, /* DPD_POLY_LDCTX_A2_B1_MUL2_ULCTX Req OpId 0x5417 */ 0x57900080, /* DPD_POLY_LDCTX_A2_B1_ADD_ULCTX Req OpId 0x5418 */ 0x55900080, /* DPD_POLY_LDCTX_A3_B1_MUL1_ULCTX Req OpId 0x5419 */ 0x56d00080, /* DPD_POLY_LDCTX_A3_B1_MUL2_ULCTX Req OpId 0x541a */ 0x57d00080, /* DPD_POLY_LDCTX_A3_B1_ADD_ULCTX Req OpId 0x541b */ 0x55d00080, /* DPD_POLY_LDCTX_A0_B2_MUL1_ULCTX Req OpId 0x541c */ 0x56200080, /* DPD_POLY_LDCTX_A0_B2_MUL2_ULCTX Req OpId 0x541d */ 0x57200080, /* DPD_POLY_LDCTX_A0_B2_ADD_ULCTX Req OpId 0x541e */ 0x55200080, /* DPD_POLY_LDCTX_A1_B2_MUL1_ULCTX Req OpId 0x541f */ 0x56600080, /* DPD_POLY_LDCTX_A1_B2_MUL2_ULCTX Req OpId 0x5420 */ 0x57600080, /* DPD_POLY_LDCTX_A1_B2_ADD_ULCTX Req OpId 0x5421 */ 0x55600080, /* DPD_POLY_LDCTX_A2_B2_MUL1_ULCTX Req OpId 0x5422 */ 0x56a00080, /* DPD_POLY_LDCTX_A2_B2_MUL2_ULCTX Req OpId 0x5423 */ 0x57a00080, /* DPD_POLY_LDCTX_A2_B2_ADD_ULCTX Req OpId 0x5424 */ 0x55a00080, /* DPD_POLY_LDCTX_A3_B2_MUL1_ULCTX Req OpId 0x5425 */ 0x56e00080, /* DPD_POLY_LDCTX_A3_B2_MUL2_ULCTX Req OpId 0x5426 */ 0x57e00080,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -