This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc3200(sdk1.1.0)中AES问题真多



最近需要AES128(ECB)加密,正好3200有这个例程,就跑了一下。发现一个问题。

我的测试帧是ucInputBuffer[23]={0xFF, 0x56, 0xAE, 0x35, 0xA9, 0x55, 0x90, 0x02, 0x0E, 0x07, 0x2B, 0xF0, 0x0E, 0x02, 0x07, 0x00, 0x0A, 0x01, 0x0A, 0x40, 0x00, 0x01, 0x08};秘钥SetAES128Key[16]={0x5a,0x69,0x67,0x42,0x65,0x65,0x41,0x6c,0x6c,0x69,0x61,0x6e,0x63,0x65,0x30,0x39}。

加密前数据帧23个字节,解密以后输出变为了21个字节,对比一下看到少了中间两个0x00.

什么原因?

如果数据帧没有0x00,加密解密流程是对的。