10

I want to use the AES hardware accelerator in am335x. I was able to generate the cryptodev.ko and cryptosoft.ko drivers. From my application program I am making use of openssl apis in CBC mode, and I wanted to verify the hardware accelerator usage.

I could trace the control flow until driver/omap-aes.c. But for cat /proc/interrupts I got the entry for sham@53100000 but not for aes@53500000. What was the reason for this? How can I make sure that the hardware accelerator for AES is being used?

  • 3
    This might be the only question of this nature on this site, despite having a few amazing hardware focused answers from Thomas Pornin and others that discusses hardware-based security in such a detailed way. Therefore I'm upvoting and not voting to move to Electronics.SE or Stackoverflow. – technology_is_overrated May 7 '15 at 12:21
  • You're probably better off asking the manufacturer. TI's support is pretty good. – Polynomial May 8 '15 at 22:48
9

There is a TI wiki page for the Crypto hardware on the AM335x here. On that page there is a tutorial on how to compare the performance of the hardware accelerator versus the pure software implementation.

After the modules are installed, OpenSSL commands may be executed which take advantage of the hardware accelerators through the OCF-Linux driver. The following example demonstrates the OpenSSL built-in speed test to demonstrate performance. The addition of the parameter -engine cryptodev tells OpenSSL to use the OCF-Linux driver if it exists.

Running time -v openssl speed -evp aes-128-cbc -engine cryptodev and time -v openssl speed -evp aes-128-cbc should produce very different results if the hardware accelerator is enabled and working correctly. You may also need to remove the crypto driver as that page suggests to see the difference. If you run those tests and see no appreciable difference in performance, that probably means the hardware isn't working, and you should make sure you properly configured the kernel (that information is also in the provided link).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.