Hi,
I want to use the AES of 51822 and I have read the nRF51_Reference_manual,I cann't find any demo about AES in SDK.Do you have the demo code about 51822 AES encryption and decryption ?
BR Alice
Hi,
I want to use the AES of 51822 and I have read the nRF51_Reference_manual,I cann't find any demo about AES in SDK.Do you have the demo code about 51822 AES encryption and decryption ?
BR Alice
Hi Alice,
The AES codebook mode (ECB) library is provided in the SDK. You can have a look at Source\nrf_ecb.c file. Encryption and decryption use the same function: nrf_ecb_crypt().
Hi Alice,
The AES codebook mode (ECB) library is provided in the SDK. You can have a look at Source\nrf_ecb.c file. Encryption and decryption use the same function: nrf_ecb_crypt().
The appropriate function if you have enabled the softdevice is sd_ecb_block_encrypt().
Note that the AES block in the nRF51822 can do encryption only, so I'd recommend to use counter mode or something similar, since that uses encryption in hardware to do both encryption and decryption of user data. Take a look at Wikipedia's description of the mode here: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29