0

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.

1
  • There's a layer of encryption already at the WiFi level. Is a hack of the WiFi key part of your attack scenario? Feb 24, 2019 at 19:31

1 Answer 1

1

When it comes to encryption, experience has shown that it is really hard to create genuinely secure encryption algorithms. Nearly all algorithms designed by non-experts contain one or more subtle (or even blatant) flaws that makes the algorithm completely useless for serious encryption work.

For that reason, you should stick to the algorithms that are well-regarded by the security experts and also to stick to the well-reviewed, commonly used implementations of those algorithms.

For network traffic, this means using SSL (or TLS if that is supported by the protocol). For the protocol, I would also look for an existing protocol that has been designed with authentication in mind.

3
  • would you recommend a protocol such as MQTT together with a ssl cert on the pi to make this happen ?
    – Shadow
    Feb 24, 2019 at 11:43
  • @Shadow, I would then go for AMQP, which has security built in by means of TLS. Feb 24, 2019 at 16:30
  • unfortunately, I have not been able to find an integration for AMQP for Esp 8266 Devices.
    – Shadow
    Feb 24, 2019 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.