STM32F415 Hardware Crypto


I’ve read that the STM32F415 has a built-in hardware crypto module for AES, and found a limited description of it here:

“To use the hardware crypto, call HW_AES128_Init() at the beginning of your program. You can update the key with HW_AES128_LoadKey(), encrypt plaintext with HW_AES128_Enc(), and decrypt data with HW_AES128_Dec().”

Is there a working example of this available somewhere that someone could point me to that works with the ChipWhisperer?

You can just use the typical AES calls with ChipWhisperer, but instead of CRYPTO_TARGET=TINYAES128C, use CRYPTO_TARGET=HWAES. We actually have a tutorial that does an attack on the STM32F4 HWAES:


Oh awesome. Thank you Alex!

Hello again. Do you know if this hardware implementation is masked or unmasked? I’d be curious to know if the provided hardware implementation for the CW305 FPGA is as well.

STM32F415 uses unmasked AES for its hardware accelerator.
If you want a hardware masked AES, you can try the K82F target for example.

Okay great, thank you.

The example CW305 AES implementation isn’t masked.