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 334.0k 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.
  • alexsh1A alexsh1

    @Anticimex Right, this is why I am not able to sign 1.5.4 nodes with 2.0b GW.
    In fact when I inserted #define MY_SIGNING_REQUEST_SIGNATURES into the GW code, some nodes stopped working and I think it has to be with signing as GW is throwing a lot of messages that signing failed.

    Bottom line is that I need to upgrade pretty much all sensors :-(

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

    @alexsh1 yes, Unfortunately. But it is a huge release upcoming. And a major version step, hence the incompatibilities. Hopefully, the changes made will make it easier to do future maintenance.

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

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cingolanifede
      wrote on last edited by
      #265

      Hi. Is there any difference in using RFM69? Signing is supported using that radio? Thanks

      AnticimexA 1 Reply Last reply
      0
      • C cingolanifede

        Hi. Is there any difference in using RFM69? Signing is supported using that radio? Thanks

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

        @cingolanifede signing has nothing to to with which radio you choose so yes. It supports any transport, but to my knowledge it has only been actually tested with nrf24 and rfm69.

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

        1 Reply Last reply
        0
        • alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by
          #267

          @Anticimex I must admit that signing is working really-really nicely on my custom made nodes (Soft sign and ATSHA204A)

          Apart from a small issue with the sensebender, which I believe is not a signing issue, it is working like a charm. All credit to you! Thank you

          Starting sensor (RNNNAS, 2.0.0-beta)
          Radio init successful.
          HTU21D Sensor1.1 - Online!
          isMetric: 1
          TempDiff :1098.00
          HumDiff  :136.75
          T: 998.00
          H: 36.75
          send: 5-5-0-0 s=0,c=1,t=0,pt=7,l=5,sg=0,st=ok:998.0
          send: 5-5-0-0 s=1,c=1,t=1,pt=7,l=5,sg=0,st=ok:36.7
          send: 5-5-0-0 s=2,c=1,t=38,pt=7,l=5,sg=0,st=ok:3.29
          send: 5-5-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:106
          Signing required
          send: 5-5-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
          Waiting for GW to send signing preferences...
          Skipping security for command 3 type 15
          read: 0-0-5 s=255,c=3,t=15,pt=0,l=2,sg=0:
          Mark node 0 as one that do not require signed messages
          Mark node 0 as one that do not require whitelisting
          send: 5-5-0-0 s=255,c=0,t=17,pt=0,l=10,sg=0,st=ok:2.0.0-beta
          send: 5-5-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
          Skipping security for command 3 type 16
          read: 0-0-5 s=255,c=3,t=16,pt=0,l=0,sg=0:
          Signing backend: ATSHA204Soft
          SHA256: 2C4A871ACCAE26760F41E547DD39B7B816FE22EEBCD8DFA2FE00000000000000
          Transmittng nonce
          send: 5-5-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:2C4A871ACCAE26760F41E547DD39B7B816FE22EEBCD8DFA2FE
          Signature in message: 01C31110DAE29D5DCD3771F68B6F29B5CCCF43A3D5397CC8
          Message to process: 00050E0306FF4D
          Current nonce: 2C4A871ACCAE26760F41E547DD39B7B816FE22EEBCD8DFA2FEAAAAAAAAAAAAAA
          HMAC: 0CC31110DAE29D5DCD3771F68B6F29B5CCCF43A3D5397CC89A82A89D87E931B8
          Signature OK
          read: 0-0-5 s=255,c=3,t=6,pt=0,l=1,sg=0:M
          send: 5-5-0-0 s=255,c=3,t=11,pt=0,l=24,sg=0,st=ok:Temp/Hum Sensor - HTU21D
          send: 5-5-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.1
          send: 5-5-0-0 s=0,c=0,t=6,pt=0,l=0,sg=0,st=ok:
          send: 5-5-0-0 s=1,c=0,t=7,pt=0,l=0,sg=0,st=ok:
          send: 5-5-0-0 s=2,c=0,t=13,pt=0,l=0,sg=0,st=ok:
          Init complete, id=5, parent=0, distance=1
          TempDiff :971.94
          HumDiff  :0.02
          T: 26.06
          H: 36.72
          send: 5-5-0-0 s=0,c=1,t=0,pt=7,l=5,sg=0,st=ok:26.1
          send: 5-5-0-0 s=1,c=1,t=1,pt=7,l=5,sg=0,st=ok:36.7
          
          AnticimexA 1 Reply Last reply
          1
          • alexsh1A alexsh1

            @Anticimex I must admit that signing is working really-really nicely on my custom made nodes (Soft sign and ATSHA204A)

            Apart from a small issue with the sensebender, which I believe is not a signing issue, it is working like a charm. All credit to you! Thank you

            Starting sensor (RNNNAS, 2.0.0-beta)
            Radio init successful.
            HTU21D Sensor1.1 - Online!
            isMetric: 1
            TempDiff :1098.00
            HumDiff  :136.75
            T: 998.00
            H: 36.75
            send: 5-5-0-0 s=0,c=1,t=0,pt=7,l=5,sg=0,st=ok:998.0
            send: 5-5-0-0 s=1,c=1,t=1,pt=7,l=5,sg=0,st=ok:36.7
            send: 5-5-0-0 s=2,c=1,t=38,pt=7,l=5,sg=0,st=ok:3.29
            send: 5-5-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:106
            Signing required
            send: 5-5-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
            Waiting for GW to send signing preferences...
            Skipping security for command 3 type 15
            read: 0-0-5 s=255,c=3,t=15,pt=0,l=2,sg=0:
            Mark node 0 as one that do not require signed messages
            Mark node 0 as one that do not require whitelisting
            send: 5-5-0-0 s=255,c=0,t=17,pt=0,l=10,sg=0,st=ok:2.0.0-beta
            send: 5-5-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
            Skipping security for command 3 type 16
            read: 0-0-5 s=255,c=3,t=16,pt=0,l=0,sg=0:
            Signing backend: ATSHA204Soft
            SHA256: 2C4A871ACCAE26760F41E547DD39B7B816FE22EEBCD8DFA2FE00000000000000
            Transmittng nonce
            send: 5-5-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:2C4A871ACCAE26760F41E547DD39B7B816FE22EEBCD8DFA2FE
            Signature in message: 01C31110DAE29D5DCD3771F68B6F29B5CCCF43A3D5397CC8
            Message to process: 00050E0306FF4D
            Current nonce: 2C4A871ACCAE26760F41E547DD39B7B816FE22EEBCD8DFA2FEAAAAAAAAAAAAAA
            HMAC: 0CC31110DAE29D5DCD3771F68B6F29B5CCCF43A3D5397CC89A82A89D87E931B8
            Signature OK
            read: 0-0-5 s=255,c=3,t=6,pt=0,l=1,sg=0:M
            send: 5-5-0-0 s=255,c=3,t=11,pt=0,l=24,sg=0,st=ok:Temp/Hum Sensor - HTU21D
            send: 5-5-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.1
            send: 5-5-0-0 s=0,c=0,t=6,pt=0,l=0,sg=0,st=ok:
            send: 5-5-0-0 s=1,c=0,t=7,pt=0,l=0,sg=0,st=ok:
            send: 5-5-0-0 s=2,c=0,t=13,pt=0,l=0,sg=0,st=ok:
            Init complete, id=5, parent=0, distance=1
            TempDiff :971.94
            HumDiff  :0.02
            T: 26.06
            H: 36.72
            send: 5-5-0-0 s=0,c=1,t=0,pt=7,l=5,sg=0,st=ok:26.1
            send: 5-5-0-0 s=1,c=1,t=1,pt=7,l=5,sg=0,st=ok:36.7
            
            AnticimexA Offline
            AnticimexA Offline
            Anticimex
            Contest Winner
            wrote on last edited by
            #268

            @alexsh1 I'm really glad to hear that. Thank you! Glad that signing is being used and is perceived as something not to complicated to bother with. It sets us apart from many other projects dealing with the same thing :)

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

            alexsh1A 1 Reply Last reply
            0
            • AnticimexA Anticimex

              @alexsh1 I'm really glad to hear that. Thank you! Glad that signing is being used and is perceived as something not to complicated to bother with. It sets us apart from many other projects dealing with the same thing :)

              alexsh1A Offline
              alexsh1A Offline
              alexsh1
              wrote on last edited by
              #269

              @Anticimex I did not say it was not complicated :)
              Just kidding - speaking just for myself, it did require some time investment to understand the concept and then upgrading my gateway and my nodes (I am still in the process of rolling signing across the rest of my nodes) to MySensors 2.0b. I probably spent more time upgrading MySensors lib and breaking some hardware in the meantime (the SMA connector on the nrf24l01+ PA+LNA) than the actual signing.

              AnticimexA 1 Reply Last reply
              0
              • alexsh1A alexsh1

                @Anticimex I did not say it was not complicated :)
                Just kidding - speaking just for myself, it did require some time investment to understand the concept and then upgrading my gateway and my nodes (I am still in the process of rolling signing across the rest of my nodes) to MySensors 2.0b. I probably spent more time upgrading MySensors lib and breaking some hardware in the meantime (the SMA connector on the nrf24l01+ PA+LNA) than the actual signing.

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

                @alexsh1 yeah, well if there is room for improvement in the documentation then feel free to help put with suggestions if there is anything unclear about that :) I use doxygen to document signing features, and a link is available on the GitHub "front-page" (the readme.md)

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

                alexsh1A 1 Reply Last reply
                0
                • AnticimexA Anticimex

                  @alexsh1 yeah, well if there is room for improvement in the documentation then feel free to help put with suggestions if there is anything unclear about that :) I use doxygen to document signing features, and a link is available on the GitHub "front-page" (the readme.md)

                  alexsh1A Offline
                  alexsh1A Offline
                  alexsh1
                  wrote on last edited by
                  #271

                  @Anticimex I think a noob's section would be good. Having said that, the point is that signing is not something beginners should touch. What do you think?

                  How about a section on the web-site? Somewhere here - https://www.mysensors.org/build/

                  AnticimexA 1 Reply Last reply
                  0
                  • alexsh1A alexsh1

                    @Anticimex I think a noob's section would be good. Having said that, the point is that signing is not something beginners should touch. What do you think?

                    How about a section on the web-site? Somewhere here - https://www.mysensors.org/build/

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

                    @alexsh1 hm, yeah, perhaps something for @hek to consider. At least a link to the signing section of the doxygen docs could be placed there. I have tried to make the documentation as step-by-step friendly as I can. That said, as I also did the actual implementation, I may well be blind for certain aspects I take for granted that a "novice" does not.

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

                    1 Reply Last reply
                    0
                    • hekH Offline
                      hekH Offline
                      hek
                      Admin
                      wrote on last edited by
                      #273

                      The next release of the main site will be much more flexible and integrated with openhardware-added projects. The idea is to allow community members to maintain their projects and/or "articles" themselves. The how-to for signing is a good example of an article.

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        Fabien
                        wrote on last edited by
                        #274

                        This tutorial is up to date for 2.0 release ?

                        AnticimexA 1 Reply Last reply
                        0
                        • F Fabien

                          This tutorial is up to date for 2.0 release ?

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

                          @Fabien Yes, top post is now updated for 2.0.0. Documentation is in doxygen.

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

                          1 Reply Last reply
                          1
                          • F Offline
                            F Offline
                            Fabien
                            wrote on last edited by
                            #276

                            Thank you @Anticimex I will update my network soon and had RFM69 Encryption too.

                            1 Reply Last reply
                            0
                            • NiklasON Offline
                              NiklasON Offline
                              NiklasO
                              wrote on last edited by NiklasO
                              #277

                              Trying this:
                              https://www.mysensors.org/build/raspberry

                              How do I enable signing and give the gateway the serial, hmac and aes-key when running on Linux? (rPi).

                              Edit: Pin 7 as random number generator maybe need some change?

                              AnticimexA 1 Reply Last reply
                              0
                              • NiklasON NiklasO

                                Trying this:
                                https://www.mysensors.org/build/raspberry

                                How do I enable signing and give the gateway the serial, hmac and aes-key when running on Linux? (rPi).

                                Edit: Pin 7 as random number generator maybe need some change?

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

                                @NiklasO @marceloaqno is working on this.

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

                                1 Reply Last reply
                                1
                                • E Offline
                                  E Offline
                                  executivul
                                  wrote on last edited by
                                  #279

                                  Hi,
                                  I have about 100 ATSHA204 I2C variant to be used in a MySensors project.
                                  Do you think that by modifying the personalizer sketch to disable the I2C bit in the configuration (0x03 word address) the chips can be set to be used as single-wire, or are they hardcoded to use only one protocol, but then why having the config bit?

                                  AnticimexA 1 Reply Last reply
                                  0
                                  • E executivul

                                    Hi,
                                    I have about 100 ATSHA204 I2C variant to be used in a MySensors project.
                                    Do you think that by modifying the personalizer sketch to disable the I2C bit in the configuration (0x03 word address) the chips can be set to be used as single-wire, or are they hardcoded to use only one protocol, but then why having the config bit?

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

                                    @executivul The bit is readonly. You cannot change it. It is used to determine the variant of chip, not to select mode of operation.
                                    From the documentation:
                                    0_1478094689558_upload-93242040-4814-4ad6-8951-4ad4d1e99a23
                                    But you are welcome to submit a pull request for adding support for I2C variants of ATSHA204a. I have none myself so I have not bothered looking into that and currently I am out of time to spend on it I am afraid.

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

                                    E 1 Reply Last reply
                                    0
                                    • AnticimexA Anticimex

                                      @executivul The bit is readonly. You cannot change it. It is used to determine the variant of chip, not to select mode of operation.
                                      From the documentation:
                                      0_1478094689558_upload-93242040-4814-4ad6-8951-4ad4d1e99a23
                                      But you are welcome to submit a pull request for adding support for I2C variants of ATSHA204a. I have none myself so I have not bothered looking into that and currently I am out of time to spend on it I am afraid.

                                      E Offline
                                      E Offline
                                      executivul
                                      wrote on last edited by
                                      #281

                                      @Anticimex said:
                                      But you are welcome to submit a pull request for adding support for I2C variants of ATSHA204a. I have none myself so I have not bothered looking into that and currently I am out of time to spend on it I am afraid.

                                      Please excuse my noobish ignorance: How and where do I submit one?

                                      AnticimexA 1 Reply Last reply
                                      0
                                      • E executivul

                                        @Anticimex said:
                                        But you are welcome to submit a pull request for adding support for I2C variants of ATSHA204a. I have none myself so I have not bothered looking into that and currently I am out of time to spend on it I am afraid.

                                        Please excuse my noobish ignorance: How and where do I submit one?

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

                                        @executivul By forking the MySensors core repository and create a local git branch, do your code, push it back to your fork on GitHub and then create a pull request from that. There are good guides on GitHub for how do do it.

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

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          meddie
                                          wrote on last edited by
                                          #283

                                          ok, thank you, but do you know why the sketch didnt generate the keys, and instead of random i get only keys ffffffffffff ?
                                          thank you

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


                                          17

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2025 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