2018-01-26 12:27 AM
Hi,
I'm using AES CCM algorithm from X-CUBE-CRYPTOLIB (STM32AccHwCryptoV3.1.0_L4_KEIL_otslsm1elfspf.lib) in sensitive real time system and unfortunelaty it does not fit our time requirement. We would like to investigate the possibility to optimize AES CCM encryption/decryption for our application. Is there possibility to:
- Get custom API for AES CCM (especially one API to change nonce only)
- Get library sources
Thanks,
Guillaume
#x-cube-cryptolib #aes-ccm2018-01-26 02:56 AM
X-CUBE-CRYPTOLIB's source code isn't available to the users so I doubt you could do anything (and I don't think reverse engineering it is worth the time).
You can try to use an open source library to be free to modify/optimize the code. For example,
has a nice and hackable AES-CCM implementation.If your microcontroller has hardware cryptography support then the version of mbedTLS shipped with STM32Cube libraries (i.e. /STM32Cube_FW_F4_V1.19.0/Middlewares/Third_Party/mbedTLS) claims (in st_readme.txt) to have STM32 crypto acceleration support (added by ST), though I wasn't able verify it.
2018-01-26 05:07 AM
So don't use the CRYPTOLIB and program the hardware directly, and understand the limit/flows with that.
STM32Cube_FW_L4_V1.8.0\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cryp.c
STM32Cube_FW_L4_V1.8.0\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cryp_ex.c
\STM32Cube_FW_L4_V1.8.0\Projects\STM32L496ZG-Nucleo\Examples\CRYP\CRYP_AESModes\readme.txt