Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. [security] Introducing signing support to MySensors

[security] Introducing signing support to MySensors

Scheduled Pinned Locked Moved Development
security
491 Posts 48 Posters 333.9k Views 30 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AnticimexA Offline
    AnticimexA Offline
    Anticimex
    Contest Winner
    wrote on last edited by
    #194

    Yes.

    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

    ahmedadelhosniA 1 Reply Last reply
    0
    • AnticimexA Anticimex

      Yes.

      ahmedadelhosniA Offline
      ahmedadelhosniA Offline
      ahmedadelhosni
      wrote on last edited by ahmedadelhosni
      #195

      @Anticimex mmmm
      Can't it be implemented in a way so that whitelist is to be defined by the controller ?
      For example, an internal message to be used to set the data.

      My concern is that auto assignation of nodes is flexible but at the same time you may need to choose which sensor node to be added to your whitelist. Thus if a Controller can show you all your nodes, like vera or domoticz, I guess this option can be added to the plugin to send an internal message to the GW to choose which sensor node to be added.

      Am I saying something logic ? :)

      1 Reply Last reply
      0
      • AnticimexA Offline
        AnticimexA Offline
        Anticimex
        Contest Winner
        wrote on last edited by
        #196

        Possibly. But that would mean that security features is dictaded by the controller plugins and I do not like that at all.

        For months I have been trying to convince the Domoticz people that their ACK timeout is way to short and needs to be configurable for signing to work with Domoticz, but they do not even reply to me.

        And I do not trust controllers at all and want to have full control over all configuration aspects of the signing solution. So I do not think it is good to move that logic off the nodes (whitelisting can also be used by a node, communicating with another node).

        It is not only a GW that can have a whitelist. So although it might have been flexible to have it configurable, I think it compromises security (who knows, your controller could be hacked to inject a whitelist that permits a rogue node in your network).

        Of course, security is at some level compromised anyway if the controller is hacked. But it is not the signing solution that is compromised in this case.

        And ultimately, that feature would mean that the level of signing security and signing features for MySensors, becomes controller specific. And that I do not think is a good idea. If I want to change or improve the feature, the controller plugins all also have to be updated. It just becomes a too big turnaround for something as important as this in my opinion.

        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

        1 Reply Last reply
        0
        • ahmedadelhosniA Offline
          ahmedadelhosniA Offline
          ahmedadelhosni
          wrote on last edited by
          #197

          Yeah I got your point of view and convinced me. The only solution to implement this is that other communities works together to improve flexibility and security. This is not that easy of course as you have said.

          Thanks a lot for your time.

          1 Reply Last reply
          0
          • AnticimexA Offline
            AnticimexA Offline
            Anticimex
            Contest Winner
            wrote on last edited by
            #198

            Thanks for understanding :)

            Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

            1 Reply Last reply
            0
            • ahmedadelhosniA Offline
              ahmedadelhosniA Offline
              ahmedadelhosni
              wrote on last edited by
              #199

              Also in all cases I see that if your controller is being hacked there will be no use to play with the whitelist :) The attacker has full control already to blow my house if he wants to :)

              Anyway maybe I need to reflash using signing to understand things more.

              Keep it up :)

              1 Reply Last reply
              0
              • ahmedadelhosniA Offline
                ahmedadelhosniA Offline
                ahmedadelhosni
                wrote on last edited by ahmedadelhosni
                #200

                Hi again.

                I managed to set run the softsign and everything seems fine till now. I just want to understand the system much more if you please.

                Now my Gateway sends this data when I turn on Light.
                ( I am using GatewayW5100 with Domoticz ) Development branch

                0;0;3;0;9;Eth: 0;0;3;0;18;PING
                0;0;3;0;9;Eth: 2;7;1;0;2;1
                0;0;3;0;9;send: 0-0-2-2 s=7,c=3,t=16,pt=0,l=0,sg=0,st=ok:
                0;0;3;0;9;read: 2-2-0 s=255,c=3,t=17,pt=6,l=25,sg=0:01F470C061A0B9FF3DE248835736E2B85E31C8D6D1844AACAC
                0;0;3;0;9;Signing backend: ATSHA204Soft
                0;0;3;0;9;Message to process: 00020E01020731
                0;0;3;0;9;Current nonce: 01F470C061A0B9FF3DE248835736E2B85E31C8D6D1844AACACAAAAAAAAAAAAAA
                0;0;3;0;9;HMAC: 135DBD85528E869ECC86C9C53679795D7FDA7B789DB7A0A74053C94FE8D668F0
                0;0;3;0;9;Signature in message: 015DBD85528E869ECC86C9C53679795D7FDA7B789DB7A0A7
                0;0;3;0;9;send: 0-0-2-2 s=7,c=1,t=2,pt=0,l=1,sg=1,st=ok:1
                

                I want to know how was the following data calculated please:

                • sg=0:01F470C061A0B9FF3DE248835736E2B85E31C8D6D1844AACAC
                • Message to process: 00020E01020731
                • Current nonce: 01F470C061A0B9FF3DE248835736E2B85E31C8D6D1844AACACAAAAAAAAAAAAAA
                • HMAC: 135DBD85528E869ECC86C9C53679795D7FDA7B789DB7A0A74053C94FE8D668F0
                • Signature in message: 015DBD85528E869ECC86C9C53679795D7FDA7B789DB7A0A7

                So how was sg= calculated ?
                What is message to process ?
                The nonce is depending on analogue signal + what ? to get this value ?
                I have already defined a random HMAC, but this one is different. It is a combination of what ?
                Finally what is signature in message ?

                On the other side I am trying to sniff the data by a serialgateway which is trying to hack the network. It only read the following data:

                0;0;3;0;9;read: 2-2-0 s=255,c=3,t=17,pt=6,l=25,sg=0:01F470C061A0B9FF3DE248835736E2B85E31C8D6D1844AACAC                      
                2;255;3;0;17;01F470C061A0B9FF3DE248835736E2B85E31C8D6D1844AACAC
                

                It is the sg only which it succeeded to read. Also I do understood form the topic that the attacker can read values sent between nodes unencrypted, but here I can't figure out where is the unencrypted data which can be sniffed by the attacker but we don't bother ourselves with cas we protect our network by using signing.

                Lots of questions but I am trying to understand the logic and architecture in details to understand what I am doing :)

                Thanks a lot.

                1 Reply Last reply
                0
                • AnticimexA Offline
                  AnticimexA Offline
                  Anticimex
                  Contest Winner
                  wrote on last edited by Anticimex
                  #201

                  Hi,
                  I suggest you read the doxygen documentation for signing carefully as it answers the questions you have. Signing does not in any way prevent anyone from reading your messages. As I have described in the documentation, it provides authenticity. That is, you can trust the sender of a signed message to be yours and not someone else's.

                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                  ahmedadelhosniA 1 Reply Last reply
                  0
                  • AnticimexA Anticimex

                    Hi,
                    I suggest you read the doxygen documentation for signing carefully as it answers the questions you have. Signing does not in any way prevent anyone from reading your messages. As I have described in the documentation, it provides authenticity. That is, you can trust the sender of a signed message to be yours and not someone else's.

                    ahmedadelhosniA Offline
                    ahmedadelhosniA Offline
                    ahmedadelhosni
                    wrote on last edited by
                    #202

                    @Anticimex Yeah I understand it doesn't prevent anyone from reading my messages, and that's what I am trying to do now. To hack the system depending on the data available. But when I read the post I understood that encryption is not a priority as signing is enough now to prevent an attacker from sending data, but it can read text. I thought I will find clear text describing that I am sending to node X value Y but I found this 2;255;3;0;17;01F470C061A0B9FF3DE248835736E2B85E31C8D6D1844AACAC
                    so I wanted to ask.

                    Anyway I'll re read the documents more carefully and return to you back please. Thanks.

                    1 Reply Last reply
                    0
                    • AnticimexA Offline
                      AnticimexA Offline
                      Anticimex
                      Contest Winner
                      wrote on last edited by
                      #203

                      Encryption is available for both rf24 and rf69 radios. But encryption and signing are two different things, and I work with signing. And signing is more efficient against hackers than encryption. Encryption is more if you care about privacy.

                      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                      noelgeorgiN 1 Reply Last reply
                      0
                      • AnticimexA Anticimex

                        Encryption is available for both rf24 and rf69 radios. But encryption and signing are two different things, and I work with signing. And signing is more efficient against hackers than encryption. Encryption is more if you care about privacy.

                        noelgeorgiN Offline
                        noelgeorgiN Offline
                        noelgeorgi
                        wrote on last edited by
                        #204

                        @Anticimex @hek is it possible to encrypt the data sent over nrf modules using this https://github.com/DavyLandman/AESLib ???

                        AnticimexA 1 Reply Last reply
                        0
                        • noelgeorgiN noelgeorgi

                          @Anticimex @hek is it possible to encrypt the data sent over nrf modules using this https://github.com/DavyLandman/AESLib ???

                          AnticimexA Offline
                          AnticimexA Offline
                          Anticimex
                          Contest Winner
                          wrote on last edited by
                          #205

                          @noelgeorgi AES encryption is already supported for both NRF24 and RFM69 radios. See MyConfig.h on the development branch for the flag to use. Doyxgen documentation I link to in this thread on the topic post also contain the personalization instructions for encryption on the development branch.

                          Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                          noelgeorgiN 1 Reply Last reply
                          2
                          • AnticimexA Anticimex

                            @noelgeorgi AES encryption is already supported for both NRF24 and RFM69 radios. See MyConfig.h on the development branch for the flag to use. Doyxgen documentation I link to in this thread on the topic post also contain the personalization instructions for encryption on the development branch.

                            noelgeorgiN Offline
                            noelgeorgiN Offline
                            noelgeorgi
                            wrote on last edited by
                            #206

                            @Anticimex said:

                            @noelgeorgi AES encryption is already supported for both NRF24 and RFM69 radios. See MyConfig.h on the development branch for the flag to use. Doyxgen documentation I link to in this thread on the topic post also contain the personalization instructions for encryption on the development branch.

                            Thanks for the info.
                            I'm getting the following errors when compiling securitypersonalizer:

                            Arduino: 1.6.7 (Linux), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
                            
                            /home/technoman/Arduino/libraries/MySensors/examples/SecurityPersonalizer/SecurityPersonalizer.ino:83:28: fatal error: sha204_library.h: No such file or directory
                             #include <sha204_library.h>
                                                        ^
                            compilation terminated.
                            exit status 1
                            Error compiling.
                            
                              This report would have more information with
                              "Show verbose output during compilation"
                              enabled in File > Preferences.
                            
                            

                            doesnt the ATSHA204 library has ATSHA204.h

                            AnticimexA 1 Reply Last reply
                            0
                            • noelgeorgiN noelgeorgi

                              @Anticimex said:

                              @noelgeorgi AES encryption is already supported for both NRF24 and RFM69 radios. See MyConfig.h on the development branch for the flag to use. Doyxgen documentation I link to in this thread on the topic post also contain the personalization instructions for encryption on the development branch.

                              Thanks for the info.
                              I'm getting the following errors when compiling securitypersonalizer:

                              Arduino: 1.6.7 (Linux), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
                              
                              /home/technoman/Arduino/libraries/MySensors/examples/SecurityPersonalizer/SecurityPersonalizer.ino:83:28: fatal error: sha204_library.h: No such file or directory
                               #include <sha204_library.h>
                                                          ^
                              compilation terminated.
                              exit status 1
                              Error compiling.
                              
                                This report would have more information with
                                "Show verbose output during compilation"
                                enabled in File > Preferences.
                              
                              

                              doesnt the ATSHA204 library has ATSHA204.h

                              AnticimexA Offline
                              AnticimexA Offline
                              Anticimex
                              Contest Winner
                              wrote on last edited by
                              #207

                              @noelgeorgi master or development branch?

                              Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                              noelgeorgiN 1 Reply Last reply
                              0
                              • AnticimexA Anticimex

                                @noelgeorgi master or development branch?

                                noelgeorgiN Offline
                                noelgeorgiN Offline
                                noelgeorgi
                                wrote on last edited by
                                #208

                                @Anticimex development branch

                                AnticimexA 1 Reply Last reply
                                0
                                • noelgeorgiN noelgeorgi

                                  @Anticimex development branch

                                  AnticimexA Offline
                                  AnticimexA Offline
                                  Anticimex
                                  Contest Winner
                                  wrote on last edited by
                                  #209

                                  @noelgeorgi have you made changes to the sketch? Jenkins builds it without problems.

                                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                  noelgeorgiN 1 Reply Last reply
                                  0
                                  • AnticimexA Anticimex

                                    @noelgeorgi have you made changes to the sketch? Jenkins builds it without problems.

                                    noelgeorgiN Offline
                                    noelgeorgiN Offline
                                    noelgeorgi
                                    wrote on last edited by
                                    #210

                                    @Anticimex no, I'm using the sketch from the examples.....:confused:
                                    am i missing some libraries????

                                    AnticimexA 1 Reply Last reply
                                    0
                                    • noelgeorgiN noelgeorgi

                                      @Anticimex no, I'm using the sketch from the examples.....:confused:
                                      am i missing some libraries????

                                      AnticimexA Offline
                                      AnticimexA Offline
                                      Anticimex
                                      Contest Winner
                                      wrote on last edited by
                                      #211

                                      @noelgeorgi if you have cloned the arduino git you have everything you need. I can build that sketch myself and have used it many times. I suspect you have a problem with your environment if you get compilation errors in it. We continously test the repository and build all examples nightly to make sure it all works as it is supposed to. You can see this at ci.mysensors.org

                                      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                      noelgeorgiN 1 Reply Last reply
                                      0
                                      • AnticimexA Anticimex

                                        @noelgeorgi if you have cloned the arduino git you have everything you need. I can build that sketch myself and have used it many times. I suspect you have a problem with your environment if you get compilation errors in it. We continously test the repository and build all examples nightly to make sure it all works as it is supposed to. You can see this at ci.mysensors.org

                                        noelgeorgiN Offline
                                        noelgeorgiN Offline
                                        noelgeorgi
                                        wrote on last edited by
                                        #212

                                        @Anticimex sorry for the interruption, i was using rsync to get eveything synced and i might have messed something uop, sha204 library was missing from my libraries folder, now everything works, thanks for the prompt and fast support.

                                        1 Reply Last reply
                                        0
                                        • AnticimexA Offline
                                          AnticimexA Offline
                                          Anticimex
                                          Contest Winner
                                          wrote on last edited by
                                          #213

                                          :thumbsup:

                                          Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          10

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular