LoRaWAN encryption in Hardware
AES Hardware Encryption

LoRaWAN encryption in Hardware

Isn't it sad that hardware engineers build all those powerful features into modern microcontrollers, and then the application software doesn't use it ?

LoraWAN encryption is a good example : almost all MCU's in the sensor devices have a 32-bit Hardware AES encryption built in. Still, almost all application software uses an old 8-bit software implementation.

A hardware implementation is several times faster (consuming less power) and is guaranteed to be standards compliant. While researching this topic, I put several AES-libraries under test with NIST test-vectors and some of them did contain errors.

So, after a bit of experimenting and reverse engineering ST's demo code, I got the hardware encryption working and so I decided to do some benchmarking on the STM32WLE5 MCU I am currently working with, and here are my results :

  • 128 byte payload encryption : HW is 32 times faster than SW
  • 128 byte payload MIC calculation : HW is 39 times faster than SW
  • ROM footprint (code) : HW implementation consumes ~420 bytes less
  • RAM footprint (data) : HW implementation consumes ~350 bytes less

I think it's a no-brainer that for serious LoRaWAN, your device should use hardware encryption if the MCU supports it.

For more information or help, feel free to contact me.

I'll keep this in mind ??

回复

要查看或添加评论,请登录

Pascal Roobrouck的更多文章

  • How to cover legacy code with unit tests

    How to cover legacy code with unit tests

    In one of my firmware projects, I needed to display QR Codes onto a display. I found reasonably good code which I could…

  • Applying Solder Paste for PCB Prototyping

    Applying Solder Paste for PCB Prototyping

    During prototyping, I have the habit of assembling a few PCBs myself. This has several benefits, such as: it's possible…

    1 条评论
  • A Pragmatic approach to Unittesting a class' Internals

    A Pragmatic approach to Unittesting a class' Internals

    When you drive your car, and you want to slow down, you hit the brake pedal. Under the pedal is a myriad of quite…

  • Make something with your children - lessons learned

    Make something with your children - lessons learned

    This summer, my youngest son asked me to build a piece of furniture together. Doing so, I learned a few surprising…

    7 条评论
  • Prik van AFAS

    Prik van AFAS

    Begin alvast maar te sparen voor een Audi e-tron, een Volvo Plugin-Hybrid of die droom van een Tesla. Ga je bij AFAS op…

    1 条评论

社区洞察

其他会员也浏览了