Adding encryption library to application using nRF Connect for VS Code

I am current developing an application for the nRF52840 using nRF Connect for VS Code and nRF Connect SDK version 2.3.0.  I need to be able to decrypt messages that were encrypted using AES-EAX.  Looking around I notice that there is an nrf_oberon encryption library that supports AES-EAX.  I am fairly new to the development environment and would like to know how I would go about including that library in my application using Kconfig and Cmake.

Thank you,

Tim Chadwick

  • Yes, if I pass the function the smaller auth tag the decryption works correctly (the decrypted data is what I expected it to be), but the decryption function returns -1 indicating that the auth tag isn't valid.  I think that the oberon encrypt/decrypt functions expect a 16-byte buffer for the auth tag.  I went back to the "hello world" sample that you sent me and changed the tag buffer to be 2 bytes long instead 16.  If I step through the code in the debugger, when the encrypt function gets called (tag is an output parameter) I see the tag buffer being overrun.  If I change one of the values in the overrun part of memory before calling the decrypt function, it returns -1 indicating an invalid tag.  Based on this it looks like it's expecting 16 bytes.  So if I'm not using authentication it still encrypts/decrypts correctly.

    Thanks for your help.

    Tim

  • I am also very interested in this question. I am trying to implement AES-EAX with a 4 byte tag for authentication and running into these same limitations. Have you made any progress on this?

Related