As the title,I want to encrypted and decrypt data in CBC mode with nRF51822,S110,the version of SoftDevice is v8.0。can anyone provide an example or demo code? thanks !
Hi,
In SDK 12.3 under location: nRF5_SDK_12.3.0_d7731ad\external\tiny-AES128 there are available software implementation for AES ECB and AES CBC.
If you are using older SDK you can simply download SDK12.3 and integrate tiny-AES128 library from it.
What I see usage is pretty easy, you are only interested in these 2 functions:
void AES128_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
void AES128_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);