I am currently trying to find the best methodology to integrate the cryptographic acceleration unit present on my MCU to take advantage of the performance gain not only in my custom apps but also in the external SSL/TLS library I will need to use.
My platform runs a Freescale Kinetis (ARM Cortex-M4) device with a uCLinux distribution. I have currently managed to run mbed-TLS (Polar SSL) in user space. I also have the possibility to run CyASSL from WolfSSL. I am now looking at the best strategy to run the "memory mapped Crytographic Acceleration Unit" (MMCAU) peripheral on the processor together with my application. The code itself shall not be too difficult to integrate since Freescale provides a library with C wrappings around assembly optimized code. The tricky point being the middleware enabling the use of the crypto unit in the user apps and the libraries.
One possibility is to rewrite the linux cryptographic kernel module (cryptodev) in order to make use of the MMCAU in my user apps (this would have the benefit to access the MMCAU from several user apps while my platform does not support shared libraries). However I am not sure this is the best strategy. In addition, mbed-TLS does not seem to provide support for the native linux cryptographic driver.
Other alternatives are proposed here (http://cryptodev-linux.org/) but, since I am not a true linux specialist, I am not really sure what would be the best solution in my case.
A piece of advice on the best strategy to adopt here to get the most flexible solution while still benefitting from the improved performance of the hardware crypto would be welcome.