AES HW enc/dec with Photon

Hello,

Has anyone worked successfully with AES CBC hardware encryption on Photon? I have tried to use the library that comes with stdperiphdriver, the “high-level” implementation of the encryption/decryption procedure. The decrypted buffer is always 0 (zeroed) and no error is returned during the decryption procedure.

I would not want to use the software implementation of the AES provided with the firmware, and I wonder why is there when hardware support is provided.

Any hints? Thank you for your time

Black

The Particle Photon and Electron have a STM32F205. This version of the processor does not have the hardware crypto and hash functions; those are in the STM32F215 and STM32F217 only.

Thank you! That sounds like a good reason :slight_smile:

Some documents are including f205 as “supported” for the HW crypt api but not explicitly (something like … all 2xx). I also found some mentions in the revision history about “Encryption features removed.” Didn’t find one specifying f205 is not supported, either.

It’s confusing, but the F205 definitely doesn’t have HW crypto. The block is there and it will complete operations, but the output is all zero (ie if you program it up, it takes the right amount of time to do the crypto but doesn’t give you any output).

Looks like they artificially fused it off for marketing reasons :frowning:

1 Like

The WiFI module (BCM43362) on the Photon supports hardware AES, but I’ve not yet found a way to use that from application code.