I didn't find any helpful questions to this topic, so I am just asking a new question, correct me if I am wrong.
I am looking to build my own little smarthome stuff, e.g. a doorlock with an rfid reader, lamps that can be turned on and off over a website etc pp.
My Idea would be to use a linux Server, a pi for the start, maybe upgrading later, that is connected to my network via lan, and is hosting its own "IoT Network".
Microcontrollers like the esp8266 would then connect to this network and send info to the pi, or receive info from it.
As you could already guess, when scanning an RFID Tag, it would be sent to the server to check, if that tag belongs to a person that has access to that door, if so, the server in turn sends a request to another esp that will open the door.
This is crucial information, that must never be intercepted. If someone would just intercept the request of the first esp to the Server with a correct Tag, he could just read out the id, or worse he could just send the opening command to the esp at the door.
This scares me as a noob in network technic, and thus I am asking here, what could be done to secure this traffic.
I read about making your own SSL Cert for the Pi, and using the ClientSecure for the Esps, but wouldnt that leave the commands from the server to the esps vulnerable ? (I know how async encryption works, but have little knowledge on SSL, mostly that it exists).
quick side note, I may want to use dynamic dns in the future to get access to the website from outside my home, but I don't want the traffic to go over this ddns, but rather internal.
Bit of bonus Info, the Network would not be used by anything besides the IoT Devices, but since the pw is needed on devices that would sit on the outside as well, the pw wouldn't be exactly hard to find out.
Should I just use SSL or build my own async encryption ?
Thanks in advance for any help.