Quantcast
Channel: 蓝牙论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 7485

TI BLE 芯片 CC2541 实现应用层AES加密的源程序【CBC加密模式】 实现方法讨论

$
0
0

在CC2541协议栈1.3.2 ,  hal_aes.h 中:

extern void HalAesInit( void );
extern void AesLoadBlock( uint8 * );
extern void AesStartBlock( uint8 *, uint8 * );
extern void AesStartShortBlock( uint8 *, uint8 * );
extern void AesLoadIV(uint8 *);
extern void AesDmaSetup( uint8 *, uint16, uint8 *, uint16 );
extern void AesLoadKey( uint8 * );

extern void (*pSspAesEncrypt)( uint8 *, uint8 * );
extern void ssp_HW_KeyInit (uint8 *);
extern void sspKeyExpansion (uint8 *, uint8 *);

extern void sspAesEncryptHW (uint8 *, uint8 *);
extern void sspAesEncryptKeyExp (uint8 *, uint8 *);
extern void sspAesEncryptBasic (uint8 *, uint8 *);

extern void sspAesDecryptHW( uint8 *, uint8 * );
extern void sspAesDecrypt( uint8 *key, uint8 *buf );

我知道LL层加解密,是ECB加密模式,但是据我了解,CBC加密模式比ECB安全。

请问大家,利用这些函数中的哪几个,可以实现 应用层AES加密【CBC加密模式】 。明文和密钥随意。请大家帮忙写下关键源代码。谢谢!


Viewing all articles
Browse latest Browse all 7485

Trending Articles