User guide

16 MPC184/MPC185 Security Co-Processor Software User’s Guide MOTOROLA
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
Global Definitions Global Definitions
4.6.2 DES Process Request Structures
The following sections provide structure definitions for DES process requests.
4.6.2.1 DES_LOADCTX_STATIC_REQ
unsigned long opId;
unsigned long channel;
PMPC18x_NOTIFY_ROUTINE notify;
PMPC18x_NOTIFY_CTX pNotifyCtx;
PMPC18x_NOTIFY_ON_ERROR_ROUTINE notify_on_error;
MPC18x_NOTIFY_ON_ERROR_CTX ctxNotifyOnErr;
int status;
void* nextReq;
unsigned long ivBytes; /* 0 or 8 bytes */
unsigned char* ivData;
unsigned long keyBytes; /* 8, 16, or 24 bytes */
unsigned char* keyData;
Dynamic channels are not valid for this request. A channel value of zero is invalid.
NUM_DES_LOADCTX_STATIC_DESC defines the number of descriptors within the
DPD_DES_SA_LDCTX_GROUP that use this request.
DPD_DES_SA_LDCTX_GROUP (0x2000) defines the group for all descriptors within this request.
Table 7. DES_LOADCTX_STATIC_REQ Valid Descriptors (opId)
Descriptors Value Function Description
DPD_SDES_CBC_ENCRYPT_SA_LDCTX 0x2000 Load context from a static channel to encrypt in
single DES using CBC mode
DPD_SDES_CBC_DECRYPT_SA_LDCTX 0x2001 Load context from a static channel to decrypt in
single DES using CBC mode
DPD_SDES_ECB_ENCRYPT_SA_LDCTX 0x2002 Load context from a static channel to encrypt in
single DES using ECB mode
DPD_SDES_ECB_DECRYPT_SA_LDCTX 0x2003 load context from a static channel to decrypt in
single DES using ECB mode
DPD_TDES_CBC_ENCRYPT_SA_LDCTX 0x2004 Load context from a static channel to encrypt in
triple DES using CBC mode
DPD_TDES_CBC_DECRYPT_SA_LDCTX 0x2005 Load context from a static channel to decrypt in
triple DES using CBC mode
DPD_TDES_ECB_ENCRYPT_SA_LDCTX 0x2006 Load context from a static channel to encrypt in
triple DES using ECB mode
DPD_TDES_ECB_DECRYPT_SA_LDCTX 0x2007 Load context from a static channel to decrypt in
triple DES using ECB mode