I am building kinda simple IoT project, but I would like to implement good security (just for educational purposes and fun). My plan is to build simple solution where one arduino board reads some data (lets say temperature), it sends data to mqtt broker on rapsberry pi and second arduino board subscribed to this broker can do something with temperature data recieved.
As I found out, best solution here is to communicate over TLS, but as you may know those devices are realy resource constrained, so I am not able to use that. I was able to implement AES payload encryption with HMAC to check message integrity, but now I am kinda stuck. My solution works only with same key for every device stored in its flash memory.There must be better way to do that, right?
I know about ECDH protocol, but I am able to use it only when two devices communicate directly, not via mqtt broker and not for more than two devices.
Thank you for every idea!