User guide

22 MPC184/MPC185 Security Co-Processor Software User’s Guide MOTOROLA
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
Global Definitions Global Definitions
4.6.2.7 DES_CRYPT_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 keyBytes; /* 8, 16, or 24 bytes */
unsigned char* keyData;
unsigned long inBytes; /* multiple of 8 bytes */
unsigned char* inData;
unsigned char* outData; /* output length = input length */
Dynamic channels are valid for this request. A channel value of zero is valid.
NUM_DES_DESC defines the number of descriptors within the DPD_DES_ECB_GROUP that use this request.
DPD_DES_ECB_GROUP (0x2600) defines the group for all descriptors within this request.
Table 13. DES_CRYPT_REQ Valid Descriptors (opId)
Descriptors Value Function Description
DPD_SDES_ECB_ENCRYPT 0x2600 Load encrypted context from a dynamic channel to
encrypt in single DES using ECB mode
DPD_SDES_ECB_DECRYPT 0x2601 Load encrypted context from a dynamic channel to
decrypt in single DES using ECB mode
DPD_TDES_ECB_ENCRYPT 0x2602 Load encrypted context from a dynamic channel to
decrypt in single DES using ECB mode
DPD_TDES_ECB_DECRYPT 0x2603 Load encrypted context from a dynamic channel to
encrypt in single DES using ECB mode