本帖最后由 lishuihua 于 2024-7-29 13:55 编辑
AES是一种对称加密算法,采用多轮的替换-置换网络结构,支持128位、192位和256位三种密钥长度。加密流程包括密钥扩展、初始轮密钥添加、多轮加密和输出密文;解密流程类似,但轮函数为逆操作。AES具有高安全性和适用性。
在英飞凌开发板上,通过调用相关的接口,可以快速应用相关算法进行加解密运算。
测试结果:
Enter the message:
today is sunday
Choose one of the following AES Mode :
(1) CTR (Counter) mode
(2) CFB (Cipher Feedback Block) mode
1
[Command] : AES CTR Mode
Result of Encryption:
0x7B 0xB2 0x8A 0xA7 0xAF 0x59 0x54 0xC6 0x41 0x18 0xFF 0x84 0x21 0x7F 0x3B 0xC4
Result of Decryption:
today is sunday
Enter the message again to accept:
how are you
Choose one of the following AES Mode :
(1) CTR (Counter) mode
(2) CFB (Cipher Feedback Block) mode
2
[Command] : AES CFB Mode
Result of Encryption:
0x67 0xB2 0x99 0xE6 0xB7 0x0B 0x58 0x95 0x18 0x04 0xFF 0xEA 0x45 0x1E 0x42 0xC4
Result of Decryption:
how are you
Enter the message again to accept:
|