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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

775件の閲覧回数
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 件の賞賛
返信
1 返信

630件の閲覧回数
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 件の賞賛
返信