Config for AES-128 ECB crypto only

Hello,

I am looking for some help or example code that describes minimum set of the files and #defines required to enable AES 128bit encryption and decryption using ECB mode only. The only example I have found in the sdk examples is in '\crypto\nrf_crypto\aes\aes_all_cli' but this pulls in a lot of unwanted code and takes more ram than is available together with my existing code and SoftDevice.

I have written the encrypt and decrypt functions I need based on the code in function nrf_cli_cmd_crypt_ecb() in the above example main.c but cannot find the right combination of #includes and #defines to build the solution.

An example emProject file would be great or even the required entries for include dirs, preprocessor directives, files/folders etc.

Parents
  • I was attracted to the AES ECB peripheral you mentioned in the last link but having fought with it for many hours yesterday I realised it would not work as I had understood, as there is no decrypt function (I had wrongly thought that the ECB cipher was symmetrical meaning that the crypt function could be used for both encryption and decryption). So it is back to wrestling nrf_crypto Slight frown

Reply
  • I was attracted to the AES ECB peripheral you mentioned in the last link but having fought with it for many hours yesterday I realised it would not work as I had understood, as there is no decrypt function (I had wrongly thought that the ECB cipher was symmetrical meaning that the crypt function could be used for both encryption and decryption). So it is back to wrestling nrf_crypto Slight frown

Children
No Data
Related