⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sec2_global.c

📁 freescale ppc sec2加解密单元驱动
💻 C
📖 第 1 页 / 共 5 页
字号:
            {"b2Data",    STD_OFFSETS(ECC_PTADD_DBL_REQ,b2DataBytes,b2DataBytes,b2Data,b2Data),             Write, NULL},            {"b3Data",    STD_OFFSETS(ECC_PTADD_DBL_REQ,b3DataBytes,b3DataBytes,b3Data,b3Data),             Write, NULL},        },    },    /* DPD_IPSEC_CBC_GROUP */    {        DPD_IPSEC_CBC_GROUP, "DPD_IPSEC_CBC_GROUP",        sizeof(IPSEC_CBC_REQ), IpsecCbcReq,        offsetof(IPSEC_CBC_REQ,inDataBytes),        {            {"hashKeyData",STD_OFFSETS(IPSEC_CBC_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"hashInData",  STD_OFFSETS(IPSEC_CBC_REQ,hashInDataBytes,hashInDataBytes,hashInData,hashInData), Read, NULL},            {"cryptKeyData",STD_OFFSETS(IPSEC_CBC_REQ,cryptKeyBytes,cryptKeyBytes,cryptKeyData,cryptKeyData), Read, ChkDesKeyLen},            {"cryptCtxInData", STD_OFFSETS(IPSEC_CBC_REQ,cryptCtxInBytes,cryptCtxInBytes,cryptCtxInData,cryptCtxInData), Read, ChkDesCtxLen},            {"inData",      STD_OFFSETS(IPSEC_CBC_REQ,inDataBytes,inDataBytes,inData,inData), Read, ChkDesDataLen},            {"cryptDataOut", STD_OFFSETS(IPSEC_CBC_REQ,inDataBytes,inDataBytes,cryptDataOut,cryptDataOut), Write, NULL},            {"hashDataOut", STD_OFFSETS(IPSEC_CBC_REQ,hashDataOutBytes,hashDataOutBytes,hashDataOut,hashDataOut), Write, NULL}        },    },    /* DPD_IPSEC_ECB_GROUP */    {        DPD_IPSEC_ECB_GROUP, "DPD_IPSEC_ECB_GROUP",        sizeof(IPSEC_ECB_REQ), IpsecEcbReq,        offsetof(IPSEC_ECB_REQ,inDataBytes),        {            {"hashKeyData",STD_OFFSETS(IPSEC_ECB_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"hashInData",  STD_OFFSETS(IPSEC_ECB_REQ,hashInDataBytes,hashInDataBytes,hashInData,hashInData), Read, NULL},            {"cryptKeyData",STD_OFFSETS(IPSEC_ECB_REQ,cryptKeyBytes,cryptKeyBytes,cryptKeyData,cryptKeyData), Read, ChkDesKeyLen},            {NIL,           ALL_ZERO_OFFSETS, Read, NULL},            {"inData",      STD_OFFSETS(IPSEC_ECB_REQ,inDataBytes,inDataBytes,inData,inData), Read, ChkDesDataLen},            {"cryptDataOut", STD_OFFSETS(IPSEC_ECB_REQ,inDataBytes,inDataBytes,cryptDataOut,cryptDataOut), Write, NULL},            {"hashDataOut", STD_OFFSETS(IPSEC_ECB_REQ,hashDataOutBytes,hashDataOutBytes,hashDataOut,hashDataOut), Write, NULL}        },    },                    /* DPD_IPSEC_ESP_GROUP */    {        DPD_IPSEC_ESP_GROUP, "DPD_IPSEC_ESP_GROUP",        sizeof(IPSEC_ESP_REQ), IpsecEspReq,        offsetof(IPSEC_ESP_REQ,inDataBytes),        {            {"hashKeyData", STD_OFFSETS(IPSEC_ESP_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"hashInData",  STD_OFFSETS(IPSEC_ESP_REQ,hashInDataBytes,hashInDataBytes,hashKeyData,hashKeyData), Read, NULL},            {"cryptCtxInData", STD_OFFSETS(IPSEC_ESP_REQ,cryptCtxInBytes,cryptCtxInBytes,cryptCtxInData,cryptCtxInData), Read, ChkDesCtxLen},            {"cryptKeyData",STD_OFFSETS(IPSEC_ESP_REQ,cryptKeyBytes,cryptKeyBytes,cryptKeyData,cryptKeyData), Read, ChkDesKeyLen},            {"inData",      STD_OFFSETS(IPSEC_ESP_REQ,inDataBytes,inDataBytes,inData,inData), Read, ChkDesDataLen},            {"cryptDataOut", EXT_OFFSETS(IPSEC_ESP_REQ,inDataBytes,inDataBytes,cryptDataOut,hashDataOutBytes), Write, NULL},            {"cryptCtxOutData", STD_OFFSETS(IPSEC_ESP_REQ,cryptCtxOutBytes,cryptCtxOutBytes,cryptCtxOutData,cryptCtxOutData), Write, ChkDesCtxLen}        },    },            /* DPD_IPSEC_AES_CBC_GROUP */    {        DPD_IPSEC_AES_CBC_GROUP, "DPD_IPSEC_AES_CBC_GROUP",        sizeof(IPSEC_AES_CBC_REQ), IpsecAesCbcReq,        offsetof(IPSEC_AES_CBC_REQ,inDataBytes),        {            {"hashKeyData",STD_OFFSETS(IPSEC_CBC_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"hashInData",  STD_OFFSETS(IPSEC_CBC_REQ,hashInDataBytes,hashInDataBytes,hashInData,hashInData), Read, NULL},            {"cryptKeyData",STD_OFFSETS(IPSEC_CBC_REQ,cryptKeyBytes,cryptKeyBytes,cryptKeyData,cryptKeyData), Read, ChkAesKeyLen},            {"cryptCtxInData", STD_OFFSETS(IPSEC_CBC_REQ,cryptCtxInBytes,cryptCtxInBytes,cryptCtxInData,cryptCtxInData), Read, ChkAesIvLen},            {"inData",      STD_OFFSETS(IPSEC_CBC_REQ,inDataBytes,inDataBytes,inData,inData), Read, ChkDesDataLen},            {"cryptDataOut", STD_OFFSETS(IPSEC_CBC_REQ,inDataBytes,inDataBytes,cryptDataOut,cryptDataOut), Write, NULL},            {"hashDataOut", STD_OFFSETS(IPSEC_CBC_REQ,hashDataOutBytes,hashDataOutBytes,hashDataOut,hashDataOut), Write, NULL}        },    },                    /* DPD_IPSEC_AES_ECB_GROUP */    {        DPD_IPSEC_AES_ECB_GROUP, "DPD_IPSEC_AES_ECB_GROUP",        sizeof(IPSEC_AES_ECB_REQ), IpsecAesEcbReq,        offsetof(IPSEC_AES_ECB_REQ,inDataBytes),        {            {"hashKeyData",STD_OFFSETS(IPSEC_AES_ECB_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"hashInData",  STD_OFFSETS(IPSEC_AES_ECB_REQ,hashInDataBytes,hashInDataBytes,hashInData,hashInData), Read, NULL},            {"cryptKeyData",STD_OFFSETS(IPSEC_AES_ECB_REQ,cryptKeyBytes,cryptKeyBytes,cryptKeyData,cryptKeyData), Read, ChkAesKeyLen},            {NIL,           ALL_ZERO_OFFSETS, Read, NULL},            {"inData",      STD_OFFSETS(IPSEC_AES_ECB_REQ,inDataBytes,inDataBytes,inData,inData), Read, ChkDesDataLen},            {"cryptDataOut",STD_OFFSETS(IPSEC_AES_ECB_REQ,inDataBytes,inDataBytes,cryptDataOut,cryptDataOut), Write, NULL},            {"hashDataOut", STD_OFFSETS(IPSEC_AES_ECB_REQ,hashDataOutBytes,hashDataOutBytes,hashDataOut,hashDataOut), Write, NULL}        },    },    /* DPD_AESA_CRYPT_GROUP */    {        DPD_AESA_CRYPT_GROUP, "DPD_AESA_CRYPT_GROUP",        sizeof(AESA_CRYPT_REQ), AesaDesc,        offsetof(AESA_CRYPT_REQ,inBytes),        {            {NIL,           ALL_ZERO_OFFSETS, Read, NULL},            {"inIvData",    STD_OFFSETS(AESA_CRYPT_REQ,inIvBytes,inIvBytes,inIvData,inIvData), Read, ChkAesIvLen},            {"keyData",     STD_OFFSETS(AESA_CRYPT_REQ,keyBytes,keyBytes,keyData,keyData), Read, ChkAesKeyLen},            {"inData",      STD_OFFSETS(AESA_CRYPT_REQ,inBytes,inBytes,inData,inData), Read, 0},            {"outData",     STD_OFFSETS(AESA_CRYPT_REQ,inBytes,inBytes,outData,outData), Write, NULL},            {"outCtxData",  STD_OFFSETS(AESA_CRYPT_REQ,outCtxBytes,outCtxBytes,outCtxData,outCtxData), Write, NULL},            {NULL, ALL_ZERO_OFFSETS, Read, NULL}        },    },                /* DPD_CCMP_GROUP */    {        DPD_CCMP_GROUP, "DPD_CCMP_GROUP",        sizeof(CCMP_REQ), CcmpReq,        offsetof(CCMP_REQ,MICData),        {            {NIL,           ALL_ZERO_OFFSETS, Read, NULL},            {"context",     STD_OFFSETS(CCMP_REQ,ctxBytes,ctxBytes,context,context), Read, NULL},            {"keyData",     STD_OFFSETS(CCMP_REQ,keyBytes,keyBytes,keyData,keyData), Read, ChkCcmpKeyLen},            {"AADData",     STD_OFFSETS(CCMP_REQ,AADBytes,AADBytes,AADData,AADData), Read, 0},            {"FrameData",   STD_OFFSETS(CCMP_REQ,FrameDataBytes,FrameDataBytes,FrameData,FrameData), Read, 0},            {"cryptDataOut",STD_OFFSETS(CCMP_REQ,cryptDataBytes,cryptDataBytes,cryptDataOut,cryptDataOut), Write, NULL},            {"MICData",     STD_OFFSETS(CCMP_REQ,MICBytes,MICBytes,MICData,MICData), Write, NULL}        },    },                    /* DPD_SRTP_GROUP */    {        DPD_SRTP_GROUP, "DPD_SRTP_GROUP",        sizeof(SRTP_REQ), SrtpReq,        offsetof(SRTP_REQ,outIvData),        {            {"hashKeyData", STD_OFFSETS(SRTP_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"ivData",      STD_OFFSETS(SRTP_REQ,ivBytes,ivBytes,ivData,ivData), Read, NULL},            {"keyData",     STD_OFFSETS(SRTP_REQ,keyBytes,keyBytes,keyData,keyData), Read, ChkAesKeyLen},            {"inData",      EXT_OFFSETS(SRTP_REQ,inBytes,inBytes,inData,HeaderBytes), Read, 0},            {"cryptDataOut",EXT_OFFSETS(SRTP_REQ,cryptDataBytes,cryptDataBytes,cryptDataOut,ROCBytes), Write, NULL},            {"digestData",  STD_OFFSETS(SRTP_REQ,digestBytes,digestBytes,digestData,digestData), Read, 0},            {"outIvData",   STD_OFFSETS(SRTP_REQ,outIvBytes,outIvBytes,outIvData,outIvData), Write, NULL}        },    },                /* DPD_KEA_CRYPT_GROUP */    /* Descriptor layout     * Pointer 1 = (none)     * Pointer 2 = IV input     * Pointer 3 = Cipher Key     * Pointer 4 = Data Input     * Pointer 5 = Data Output     * Pointer 6 = IV output     * Pointer 7 = (none)     */    {         DPD_KEA_CRYPT_GROUP, "DPD_KEA_CRYPT_GROUP",        sizeof(KEA_CRYPT_REQ), KeaReq,        offsetof(KEA_CRYPT_REQ, outData),        {            {NIL,           ALL_ZERO_OFFSETS, Read, NULL},            {"ivData",      STD_OFFSETS(KEA_CRYPT_REQ,ivBytes,ivBytes,ivData,ivData), Read, NULL},            {"keyData",     STD_OFFSETS(KEA_CRYPT_REQ,keyBytes,keyBytes,keyData,keyData), Read, NULL},            {"inData",      STD_OFFSETS(KEA_CRYPT_REQ,inBytes,inBytes,inData,inData), Read, NULL},            {"outData",     STD_OFFSETS(KEA_CRYPT_REQ,inBytes,inBytes,outData,outData), Write, NULL},            {"ivData",      STD_OFFSETS(KEA_CRYPT_REQ,ivBytes,ivBytes,ivData,ivData), Write, NULL},            {NIL,           ALL_ZERO_OFFSETS, Read, NULL}        },    },    /*     * DPD_TLS_BLOCK_INBOUND_GROUP     *     pointer               length             extent     * ----------------------------------------------------------------     * p0  hashKeyData           hashKeyBytes            * p1  hashOnlyData                             hashOnlyBytes     * p2  ivData                ivBytes     * p3  cipherKeyData         cipherKeyBytes     * p4  inData                inBytes            MACcmpBytes     * p5  outData               outBytes           MACoutBytes     * p6  ivOutData             ivOutBytes     * ----------------------------------------------------------------     */    {         DPD_TLS_BLOCK_INBOUND_GROUP, "DPD_TLS_BLOCK_INBOUND_GROUP",        sizeof(TLS_BLOCK_INBOUND_REQ), TlsBlockInboundReq,        offsetof(TLS_BLOCK_INBOUND_REQ, ivOutData),        {            {"hashKeyData",   STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"hashOnlyData",  EXT_OFFSETS(TLS_BLOCK_INBOUND_REQ,hashOnlyBytes,hashOnlyBytes,hashOnlyData,hashOnlyBytes), Read, NULL},            {"ivData",        STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,ivBytes,ivBytes,ivData,ivData), Read, NULL},            {"cipherKeyData", STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,cipherKeyBytes,cipherKeyBytes,cipherKeyData,cipherKeyData), Read, NULL},            {"inData",        EXT_OFFSETS(TLS_BLOCK_INBOUND_REQ,inBytes,inBytes,inData,MACcmpBytes), Read, NULL},            {"outData",       EXT_OFFSETS(TLS_BLOCK_INBOUND_REQ,outBytes,outBytes,outData,MACoutBytes), Write, NULL},            {"ivOutData",     STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,ivOutBytes,ivOutBytes,ivOutData,ivOutData), Write, NULL}        },    },                   /*     * DPD_TLS_BLOCK_OUTBOUND_GROUP     *     pointer               length             extent     * ----------------------------------------------------------------     * p0  hashKeyData           hashKeyBytes            * p1  ivData                ivBytes     * p2  cipherKeyData         cipherKeyBytes     * p3  hashOnlyData          mainDataBytes      hashOnlyBytes     * p4  outData               outBytes           MACbytes     * p5  cipherOnlyData        cipherOnlyBytes     * p6  ivOutData             ivOutBytes     * ----------------------------------------------------------------     */    {         DPD_TLS_BLOCK_OUTBOUND_GROUP, "DPD_TLS_BLOCK_OUTBOUND_GROUP",        sizeof(TLS_BLOCK_OUTBOUND_REQ), TlsBlockOutboundReq,        offsetof(TLS_BLOCK_OUTBOUND_REQ, ivOutData),        {            {"hashKeyData",    STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"ivData",         STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,ivBytes,ivBytes,ivData,ivData), Read, NULL},            {"cipherKeyData",  STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,cipherKeyBytes,cipherKeyBytes,cipherKeyData,cipherKeyData), Read, NULL},            {"hashOnlyData",   EXT_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,mainDataBytes,mainDataBytes,hashOnlyData,hashOnlyBytes), Read, NULL},            {"outData",        EXT_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,outBytes,outBytes,outData,MACbytes), Write, NULL},            {"cipherOnlyData", STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,cipherOnlyBytes,cipherOnlyBytes,cipherOnlyData,cipherOnlyData), Read, NULL},            {"ivOutData",      STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,ivOutBytes,ivOutBytes,ivOutData,ivOutData), Write, NULL}        },    },                             /*     * DPD_TLS_STREAM_INBOUND_GROUP     *     pointer               length             extent     * ----------------------------------------------------------------     * p0  hashKeyData           hashKeyBytes            * p1  hashOnlyData                             hashOnlyBytes     * p2  ivData                ivBytes     * p3  cipherKeyData         cipherKeyBytes     * p4  inData                inBytes            MACcmpBytes     * p5  outData               outBytes           MACoutBytes     * p6  ivOutData             ivOutBytes     * ----------------------------------------------------------------     */    {         DPD_TLS_STREAM_INBOUND_GROUP, "DPD_TLS_STREAM_INBOUND_GROUP",        sizeof(TLS_STREAM_INBOUND_REQ), TlsStreamInboundReq,        offsetof(TLS_STREAM_INBOUND_REQ, ivOutBytes),        {            {"hashKeyData",   STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"hashOnlyData",  EXT_OFFSETS(TLS_BLOCK_INBOUND_REQ,hashOnlyBytes,hashOnlyBytes,hashOnlyData,hashOnlyBytes), Read, NULL},            {"ivData",        STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,ivBytes,ivBytes,ivData,ivData), Read, NULL},            {"cipherKeyData", STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,cipherKeyBytes,cipherKeyBytes,cipherKeyData,cipherKeyData), Read, NULL},            {"inData",        EXT_OFFSETS(TLS_BLOCK_INBOUND_REQ,inBytes,inBytes,inData,MACcmpBytes), Read, NULL},            {"outData",       EXT_OFFSETS(TLS_BLOCK_INBOUND_REQ,outBytes,outBytes,outData,MACoutBytes), Write, NULL},            {"ivOutData",     STD_OFFSETS(TLS_BLOCK_INBOUND_REQ,ivOutBytes,ivOutBytes,ivOutData,ivOutData), Write, NULL}        },    },              /*     * DPD_TLS_STREAM_OUTBOUND_GROUP     *     pointer               length             extent     * ----------------------------------------------------------------     * p0  hashKeyData           hashKeyBytes            * p1  ivData                ivBytes     * p2  cipherKeyData         cipherKeyBytes     * p3  hashOnlyData          mainDataBytes      hashOnlyBytes     * p4  outData               outBytes           MACbytes     * p5       * p6  ivOutData             ivOutBytes     * ----------------------------------------------------------------     */    {        DPD_TLS_STREAM_OUTBOUND_GROUP, "DPD_TLS_STREAM_OUTBOUND_GROUP",        sizeof(TLS_STREAM_OUTBOUND_REQ), TlsStreamOutboundReq,        offsetof(TLS_STREAM_OUTBOUND_REQ, ivOutBytes),        {            {"hashKeyData",    STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,hashKeyBytes,hashKeyBytes,hashKeyData,hashKeyData), Read, NULL},            {"ivData",         STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,ivBytes,ivBytes,ivData,ivData), Read, NULL},            {"cipherKeyData",  STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,cipherKeyBytes,cipherKeyBytes,cipherKeyData,cipherKeyData), Read, NULL},            {"hashOnlyData",   EXT_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,mainDataBytes,mainDataBytes,hashOnlyData,hashOnlyBytes), Read, NULL},            {"outData",        EXT_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,outBytes,outBytes,outData,MACbytes), Write, NULL},            {NIL,              ALL_ZERO_OFFSETS, Read, NULL},            {"ivOutData",      STD_OFFSETS(TLS_BLOCK_OUTBOUND_REQ,ivOutBytes,ivOutBytes,ivOutData,ivOutData), Write, NULL}        },    },         /* Always terminates list, keep this line at the end when adding functions */    {        0, NULL,        0, NULL,        0,        {            {NULL, ALL_ZERO_OFFSETS, Read, NULL},        },    },};


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -