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.
  • 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
                • TD22057T Offline
                  TD22057T Offline
                  TD22057
                  Hardware Contributor
                  wrote on last edited by
                  #214

                  @Anticimex - thanks for this. I finally got around to enabling signing on everything while I was testing out my new board design. I followed your schematic from your board design when I built mine and I just went through the instructions to configure the crypto chip and everything went smoothly. Thanks for the work and the good instructions!

                  AnticimexA 1 Reply Last reply
                  1
                  • TD22057T TD22057

                    @Anticimex - thanks for this. I finally got around to enabling signing on everything while I was testing out my new board design. I followed your schematic from your board design when I built mine and I just went through the instructions to configure the crypto chip and everything went smoothly. Thanks for the work and the good instructions!

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

                    @TD22057 that's really nice to hear! Are you using a stable release or the development/beta channel?

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

                    TD22057T 1 Reply Last reply
                    0
                    • AnticimexA Anticimex

                      @TD22057 that's really nice to hear! Are you using a stable release or the development/beta channel?

                      TD22057T Offline
                      TD22057T Offline
                      TD22057
                      Hardware Contributor
                      wrote on last edited by
                      #216

                      @Anticimex
                      I used the signing sketch on the dev branch - I'm in the process of shifting my stuff over to the dev branch from 1.5 now.

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

                        Ok, cool. As you might have noticed, personalization has changed a bit on development. Also, whitelisting works slightly differently/better.

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

                        1 Reply Last reply
                        0
                        • Pierre PP Offline
                          Pierre PP Offline
                          Pierre P
                          wrote on last edited by
                          #218

                          Isn't blacklisting cool too to use ?
                          Like, if we know the "name" of the sensor lost, we push it to the black list and voila ? This way, we don't have to put a long list a agreed sensors if we have only two nodes outside the house.
                          ... I think.

                          No quote, no forum notification (else, the mail box ring every minutes !). Thanks, and have a very good MySensors day !

                          AnticimexA 1 Reply Last reply
                          0
                          • Pierre PP Pierre P

                            Isn't blacklisting cool too to use ?
                            Like, if we know the "name" of the sensor lost, we push it to the black list and voila ? This way, we don't have to put a long list a agreed sensors if we have only two nodes outside the house.
                            ... I think.

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

                            @Pierre-P because if a node is lost, you no longer control that node. So anyone could reprogram it to have it identify itself in any way possible. We have to assume an attacker has full source code access, so they can rewrite the signing algorithm to use a fake serial as salt for the signature to trick the GW to believe it is a new node. A whitelist mean the attacker has to know the ID/serial of one of the nodes you trust. Which they won't know unless they can get access to that node.

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

                            1 Reply Last reply
                            3
                            • Pierre PP Offline
                              Pierre PP Offline
                              Pierre P
                              wrote on last edited by
                              #220

                              Thanks for the complet answer !

                              No quote, no forum notification (else, the mail box ring every minutes !). Thanks, and have a very good MySensors day !

                              AnticimexA 1 Reply Last reply
                              0
                              • Pierre PP Pierre P

                                Thanks for the complet answer !

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

                                @Pierre-P you are welcome. Security is best when it is totally open and the implementation is aware of this. That makes it quite difficult to circumvent, and it also allows to be challenged. That way, with many eyes examining it, it gets stronger and stronger :) I welcome all attempts to crack it. White or black hat style.

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

                                1 Reply Last reply
                                1
                                • SoloamS Offline
                                  SoloamS Offline
                                  Soloam
                                  Hardware Contributor
                                  wrote on last edited by
                                  #222

                                  Hello all! What would require less flash memory? Signing by ATSHA204A Chip or by software?

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

                                    Signing by ATSHA204A require less flash memory, but takes longer to execute (at least on 8MHz AtMega328).

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

                                    1 Reply Last reply
                                    0
                                    • SoloamS Offline
                                      SoloamS Offline
                                      Soloam
                                      Hardware Contributor
                                      wrote on last edited by Soloam
                                      #224

                                      @Anticimex assumed that, but this post on the forum got me confused: http://forum.mysensors.org/topic/2005/software-aes-encryption-for-nrf24/19

                                      According to that post, he uses software on the SenseBender with Encryption because, according to him "...encryption and ATSHA204A is to big for the SenseBender... ".

                                      I would like to add Signing and encryption to my nodes, but I don't know if it will fit on my Atmega328 flash!

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

                                        Well, how much space you have depend on your sketch and on the features you enable in the library, so it is impossible to predict how your code will fit. I suggest you just try to enable what you want and compile, and you'll know :)

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

                                        1 Reply Last reply
                                        0
                                        • mfalkviddM Offline
                                          mfalkviddM Offline
                                          mfalkvidd
                                          Mod
                                          wrote on last edited by
                                          #226

                                          The easiest way to find out is to look at the output in Arduino IDE when you click "Verify".

                                          There are some factors that affect size:

                                          • Size of bootloader
                                          • MySensors version (different versions of the library have different size requirements)
                                          • MySensors features used (software signing, encryption, debug on or off, etc)
                                          • Size of other libraries you use in your sketch
                                          • Size of your sketch
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          8

                                          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