I would like to implement sending encrypted NUS data to iOS APP from nRF5340 board. Does Nordic provide Zephyr sample code for AES encryption using software and hardware implementations on nRf5340 platform?
I would like to implement sending encrypted NUS data to iOS APP from nRF5340 board. Does Nordic provide Zephyr sample code for AES encryption using software and hardware implementations on nRf5340 platform?
Hi snowuyl,
You can find AES encryption samples here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/samples/crypto.html.
Most of the samples in NCS are documented in two places,
Hieu
Thanks for your reply! Since there are a lot of AES encryption mode. Which AES encryption mode do you suggest for Nordic UART service (NUS) data?
Encryption is done automatically by the BLE stack when a connection is in paring or bonding, so you don't need to worry about code.
Thanks for your reply! Do you mean BLE packets are encrypted with nRF5340 hardware acceleration after pairing?
Yes. All BLE packets are encrypted after pairing; and on the nRF5340 (and nRF52 and nRF54 SoCs while we are at it), it will be with hardware acceleration.
Thanks for your great support! I use nRF Connect for Desktop Windows to test. It shows LESC authenticated encrypted link.
Looks like things are working as expected then. Excellent. Please feel free to close this ticket at your convenience, as always.