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] Migrating from library version 2.1 to 2.2

[security] Migrating from library version 2.1 to 2.2

Scheduled Pinned Locked Moved Development
48 Posts 7 Posters 9.2k Views 9 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.
  • B bilbolodz

    "Your code your rules" but I'm little surprised with your standpoint.

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

    @bilbolodz That is fine. But as I have currently no means of verifying, I will not make a update to the guide. If you find a way to do it, you are free to post a guide if other need to make a similar thing.

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

    1 Reply Last reply
    0
    • B bilbolodz

      So it means that (If I want use signing) I'm stuck with mysensors version 2.1?
      I'm not able compile new code (using 2.2) and upload it over OTA because I will loose signing right (without changeing EEPROM content)?
      I think there should be a way to migrate sketch (which is using soft signing) from 2.1 to 2.2 with OTA. Secure sending of keys actually is NOT a problem because (as I understood) new in 2.2 is "only checksum" of EEPROM.
      So if I have "2.1 mysensors library" personalized devices, it's possible to write a program which gets existing data from EEPROM calculate checksum and write it to EEPROM (maybe also migrating other structures if there were other changes). Such sketch can be in safe way transferred via OTA because it doesn't contain any secret information. Then I can upload new (using 2.2 library) version of my sketch and I will have working "2.2" devices without touching it (only OTA). What do you think about it?

      Actually now I've realised (luckily) that in these "hard to get devices" I'm using hardware signing so it should be not a problem (?) :-)

      gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #38

      @bilbolodz you can still enable signing on gateway and make it optional, so you will have time to update nodes later on.

      1 Reply Last reply
      0
      • AnticimexA Anticimex

        @alowhum right, but if you update your sketches OTA, he can potentially sniff your key OTA as well and then he does not need to enter your house ;)

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

        @anticimex I have a question - I have two GWs: one with ATSHA204A and one soft signing.
        I have noticed that when doing #define PERSONALIZE_ATSHA204A, AES key is saved to ATSHA204A and EEPROM. Is this correct? In what case I need a combination of HMAC + AES keys? I do not do whitelisting

        AnticimexA 1 Reply Last reply
        0
        • alexsh1A alexsh1

          @anticimex I have a question - I have two GWs: one with ATSHA204A and one soft signing.
          I have noticed that when doing #define PERSONALIZE_ATSHA204A, AES key is saved to ATSHA204A and EEPROM. Is this correct? In what case I need a combination of HMAC + AES keys? I do not do whitelisting

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

          @alexsh1 AES key is never saved to atsha204. It is for encryption and always stored in eeprom.

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

          alexsh1A 1 Reply Last reply
          0
          • AnticimexA Anticimex

            @alexsh1 AES key is never saved to atsha204. It is for encryption and always stored in eeprom.

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

            @anticimex Now I got more confused. What keys do I need for atsha204a signing?

            AnticimexA 1 Reply Last reply
            0
            • alexsh1A alexsh1

              @anticimex Now I got more confused. What keys do I need for atsha204a signing?

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

              @alexsh1 it is pretty clearly documented. HMAC key is used for signing.

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

              alexsh1A 1 Reply Last reply
              0
              • AnticimexA Anticimex

                @alexsh1 it is pretty clearly documented. HMAC key is used for signing.

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

                @anticimex Sorry, I think I need to re-read documentation. HMAC is for atsha204a signing and AES for encryption, right?

                I am in the process of re-personalising now :)

                AnticimexA 1 Reply Last reply
                0
                • alexsh1A alexsh1

                  @anticimex Sorry, I think I need to re-read documentation. HMAC is for atsha204a signing and AES for encryption, right?

                  I am in the process of re-personalising now :)

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

                  @alexsh1 correct

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

                  alexsh1A 1 Reply Last reply
                  1
                  • AnticimexA Anticimex

                    @alexsh1 correct

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

                    @anticimex thank you! I set-up singing some time ago and it was working fine, but now I need to revise all that again.

                    AnticimexA 1 Reply Last reply
                    0
                    • alexsh1A alexsh1

                      @anticimex thank you! I set-up singing some time ago and it was working fine, but now I need to revise all that again.

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

                      @alexsh1 it is worth mentioning that if you personalize using 2.2.0, you are free to go back to earlier versions without re doing personalization. It is only when going from 2.1 to 2.2 it has to be redone due to the checksum. Of course, be aware that overwriting the checksum will cause signing to fail again.

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

                      alexsh1A 1 Reply Last reply
                      0
                      • AnticimexA Anticimex

                        @alexsh1 it is worth mentioning that if you personalize using 2.2.0, you are free to go back to earlier versions without re doing personalization. It is only when going from 2.1 to 2.2 it has to be redone due to the checksum. Of course, be aware that overwriting the checksum will cause signing to fail again.

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

                        @anticimex said in [security] Migrating from library version 2.1 to 2.2:

                        @alexsh1 Of course, be aware that overwriting the checksum will cause signing to fail again.

                        And what has to be done in this case? Re-personalising both GW and a node?

                        AnticimexA 1 Reply Last reply
                        0
                        • alexsh1A alexsh1

                          @anticimex said in [security] Migrating from library version 2.1 to 2.2:

                          @alexsh1 Of course, be aware that overwriting the checksum will cause signing to fail again.

                          And what has to be done in this case? Re-personalising both GW and a node?

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

                          @alexsh1 re-personalize the node that lost the checksum. Each node (including gw) has a unique personalization and checksum (possibly). Just because one node looses the checksum or gets a mismatch does not mean any other node has the same problem. Everything is stored in eeprom locally.

                          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


                          15

                          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