0

I am working on the code to use the security engine of my MPC83XX with Openssl. I can already encrypt/decrypt AES up to 64KByte of data. The problem comes with data greater than 64KByte since the maximum value of the length-bits is 65535.

I can assume the data is always in one piece on the Ram. So now I am collecting all the data in a Link Table and use the pointer to the table instead of the pointer to the data and set the J bit to 1. Now I am not sure what a value I should use for the length-bits since 0 would mean the Dword will be ignored. The real length of the data is too also big for 16 bit.

http://cache.freescale.com/files/32bit/doc/app_note/AN2755.pdf?fpsp=1 Possible Informations can be found in Chapter 8.

4

1 回答 1

0

您将 LENGTH 设置为数据的长度。见第 19 页:

对于链接表或链接表链访问的任何数据宗地序列,宗地的组合长度(它们的 LENGTH 和/或 EXTENT 字段的总和)必须等于链接表内存段的组合长度(SEGLEN 字段) . 否则,通道会在通道指针状态寄存器中设置相应的错误位...

我不确定您使用的是什么模式(并且文档似乎不必要地令人困惑!)但是对于通常的密码模式(CBC/CTR/CFB/OFB),通常的方法是简单地链接 AES 调用,重用相同的上下文. 您可以通过简单地将“Pointer Dword1”和“Pointer Dword5”设置为相同的东西来做到这一点。但是,文档很少;我不知道它从哪里得到静脉注射。

于 2012-06-11T18:53:21.240 回答