Secure and cool Remote Controls (Touchless, AES128 encryption, with a T-Beam watch and a cat)



Using remote controls to switch something on or open your garage is a piece of cake. Doing this automatically without touching anything is a little bit cooler. And doing it like James Bond, with an ESP32 Watch and completely encrypted? Let’s have a closer look at how this can be done and how we can build secure transmissions for other projects.
I am a proud Patreon of @GreatScott!, @ElectroBOOM , @Electronoobs , @EEVblog , and others. No Docker, No Microsoft Teams, Zoom

Links:
ESP32 Dev. Board: https://s.click.aliexpress.com/e/_ANHrBc
ESP-01: https://s.click.aliexpress.com/e/_9iQa15
T-Watch V3: https://s.click.aliexpress.com/e/_A4VDDh
Sketches: https://github.com/SensorsIot/Encrypted-Remote-Control
T-Watch playlist: https://www.youtube.com/playlist?list=PLVPBipeObwMNwRd-0-2K7vsfh5e_FOxnZ
T-Watch Smartwatch library: https://github.com/sharandac/My-TTGO-Watch
AES128 library: https://github.com/suculent/thinx-aes-lib

The links above usually are affiliate links that support the channel (no additional cost for you).
Supporting Material and Blog Page: http://www.sensorsiot.org
Github: https://www.github.com/sensorsiot
My Patreon Page: https://www.patreon.com/AndreasSpiess
Discord: https://discord.gg/JfgDSa8
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission of your purchases to buy new stuff for the channel
My Amazon.com shop: https://www.amazon.com/shop/andreasspiess
For Banggood https://bit.ly/2jAQEf4
For AliExpress: http://bit.ly/2B0yTLL
For Amazon.de: http://amzn.to/2r0ZCYI
For Amazon UK: http://amzn.to/2mxBaJf
For ebay.com: http://ebay.to/2DuYXBp

https://www.facebook.com/profile.php?id=100013947273409
https://twitter.com/spiessa
https://www.instructables.com/member/Andreas%20Spiess/
Please do not try to email me. This communication channel is reserved for my primary job
As an Amazon Associate, I earn from qualifying purchases
#no#midroll#ads

source

15 thoughts on “Secure and cool Remote Controls (Touchless, AES128 encryption, with a T-Beam watch and a cat)

  • May 9, 2021 at 7:33 am
    Permalink

    Maybe you could use the RTC to include the current time in the encrypted message so that if the code is milked and replayed later the time from the code will not match the RTC of the receiver. Would maybe need to update the transmitter's time occasionally to keep it accurate.

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    No way, 22 minute after put up? Andreas Watch my next YouTube show mate 😉 you may like this one. IOT fix. As I have a lot of IOT devices, I am now have problems with my router…. Come soon mate.

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    A big flaw I see here: the receiver is simply creating an unsigned long number from the decrypted string, and checking if the number is higher than before. In theory, I could send the receiver junk data and the receiver will decrypt them, and convert the junk counter string into a number. Since you only check if the counter is simply larger than before, it's very likely you'll get an unsigned long that indeed is larger, and open the gate.

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    A big flaw I see here: the receiver is simply creating an unsigned long number from the decrypted string, and checking if the number is higher than before. In theory, I could send the receiver junk data and the receiver will decrypt them, and convert the junk counter string into a number. Since you only check if the counter is simply larger than before, it's very likely you'll get an unsigned long that indeed is larger, and open the gate.

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    Am I wrong or something?
    If I just send something completely random and it happens to decrypt to any 64-bit number with your key, it would probably open the door as it is expected to be decrypted to some really high number, given you have set the initial counter to something low. this is why it is better to make AT MOST 1 per 1 million numbers a valid value for the counter.
    One good idea would be to make every number which is (something fixed and random) modulus (10 ^ 9 + 7) a valid counter value. This way the probability of success of the above attack decreases significantly.
    Another mitigation would be to send some sort of checksum alongside the counter value and use much bigger counter values (I'm talking at least 256 bits). This way one can make sure that whoever sent the code, knew what he was sending (and as a result your key)

    Please note though, that I may be completely wrong. The best way to implement some encryption is to implement none, and use widely used libraries instead. I highly recommend using modern and (battle) verified web encryption standards instead, though they typically require two-way communication.

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    Another approach would be a challenge-response one: S—„open“—>R, R—„please encrypt N=rand()–>S, S-AES(key, N)->R

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    Italian subtitles were good enough for an Dane living in Switzerland && Feedback from New Delhi was that Hindi subtitles were fine as well.

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    Nice content. The field of encryption is a tough one with many security traps and risks if not properly implemented. So guys, be careful how much you trust your own implementation or libraries.

    Reply
  • May 9, 2021 at 7:33 am
    Permalink

    Fun project with fair enough security. It's probably easier to pick a door lock to gain entry 😉

    Reply
  • September 18, 2021 at 2:35 pm
    Permalink

    Amazing blog! Do you have any suggestions for aspiring writers? I’m planning to start my own site soon but I’m a little lost on everything. Would you advise starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m completely overwhelmed .. Any ideas? Bless you!

    Reply
  • September 23, 2021 at 11:52 am
    Permalink

    Hi there! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche. Your blog provided us useful information to work on. You have done a marvellous job!

    Reply
  • September 26, 2021 at 10:43 pm
    Permalink

    Excellent blog you’ve got here.. It’s difficult to find high quality writing like yours these days. I truly appreciate individuals like you! Take care!!

    Reply

Leave a Reply

Your email address will not be published.