This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I encrypt and decrypt data in CBC mode with nRF51822 ?

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 !

Parents
  • 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);
    
Reply Children
No Data
Related