MPC8548E Sec 2.x Device driver to calc md5 digests.....

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC8548E Sec 2.x Device driver to calc md5 digests.....

745 Views
dracuka
Contributor I

Hi all, I'm trying to write code to use the MPC8315E's security engine to calc md5 digests.

Linux kernel 2.6.38
Sec 2.x Device driver

The problem:
I can calculate correctly md5 digests using single requests, but i can't using multiple interim requests.

If I use request as DPD_MD5_LDCTX_IDGS_HASH_ULCTX I expect to have a context in the outData member of th HASH_REQ struct. At next request I put the previous outData in ctxData. This is correct ?
And what about the field outBytes and ctxBytes? Are these fields written by the driver?How to solve the problem that using the driver to calc variety of data??

0 Kudos
Reply
1 Reply

600 Views
lunminliang
NXP Employee
NXP Employee

Use the following operation codes:

First data portion: DPD_MD5_LDCTX_IDGS_HASH_UCTX

Intermediate portion(s):  DPD_MD5_CONT_HASH_ULCTX

Last portion: DPD_MD5_LDCTX_HASH_PAD_ULCTX

The size of context for MPC8548E is fixed at  40 octets. This value should be written by the user in both outBytes and ctxBytes and the appropriate space for the driver output should be allocated. The format of this output is specified in MPC8548RM, Section 19.4.4.11.

Note, all data portions except the last must be an integer multiple of the algorithm block size.

0 Kudos
Reply