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. General Discussion
  3. Encryption, Signing and OTA is there any how-to?

Encryption, Signing and OTA is there any how-to?

Scheduled Pinned Locked Moved General Discussion
42 Posts 6 Posters 10.0k Views 10 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.
  • L Offline
    L Offline
    LastSamurai
    Hardware Contributor
    wrote on last edited by
    #32

    This is what I get:

    +------------------------------------------------------------------------------------+
    |                           MySensors security personalizer                          |
    +------------------------------------------------------------------------------------+
    
    +------------------------------------------------------------------------------------+
    |                               Configuration settings                               |
    +------------------------------------------------------------------------------------+
    | * Guided personalization/storage of keys in EEPROM                                 |
    | * Guided storage and generation of random serial in EEPROM                         |
    | * Software based personalization (no ATSHA204A usage whatsoever)                   |
    | * Will not require UART confirmation before locking ATSHA204A configuration        |
    | * Will store HMAC key to EEPROM                                                    |
    | * Will store AES key to EEPROM                                                     |
    | * Will generate soft serial using software                                         |
    | * Will store soft serial to EEPROM                                                 |
    +------------------------------------------------------------------------------------+
    
    +------------------------------------------------------------------------------------+
    |                           Hardware security peripherals                            |
    +--------------+--------------+--------------+------------------------------+--------+
    | Device       | Status       | Revision     | Serial number                | Locked |
    +--------------+--------------+--------------+------------------------------+--------+
    | AVR          | DETECTED     | N/A          | N/A (generation required)    | N/A    |
    +--------------+--------------+--------------+------------------------------+--------+
    
    +------------------------------------------------------------------------------------+
    |                                       EEPROM                                       |
    +--------+--------+------------------------------------------------------------------+
    | Key ID | Status | Key                                                              |
    +--------+--------+------------------------------------------------------------------+
    | HMAC   | OK     | ... |
    | AES    | OK     | 00000000000000000000000000000000                                 |
    | SERIAL | OK     | 0E0103FA44D749F163                                               |
    +--------+--------+------------------------------------------------------------------+
    
    +------------------------------------------------------------------------------------+
    |                                   Key generation                                   |
    +--------+--------+------------------------------------------------------------------+
    | Key ID | Status | Key                                                              |
    +--------+--------+------------------------------------------------------------------+
    | SERIAL | OK     | 0F5B932A87D43AD318                                               |
    +--------+--------+------------------------------------------------------------------+
    
    +------------------------------------------------------------------------------------+
    |                                    Key storage                                     |
    +--------+--------+------------------------------------------------------------------+
    | Key ID | Status | Key                                                              |
    +--------+--------+------------------------------------------------------------------+
    | HMAC   | OK     | ... |
    | AES    | OK     | 00000000000000000000000000000000                                 |
    | SERIAL | OK     | 0F5B932A87D43AD318                                               |
    +--------+--------+------------------------------------------------------------------+
    
    +------------------------------------------------------------------------------------+
    |                                  WHAT TO DO NEXT?                                  |
    +------------------------------------------------------------------------------------+
    | This device has now been personalized. Run this sketch with its current settings   |
    | on all the devices in your network that have security enabled.                     |
    +------------------------------------------------------------------------------------+
    
    +------------------------------------------------------------------------------------+
    |                                  Execution result                                  |
    +------------------------------------------------------------------------------------+
    | SUCCESS                                                                            |
    +------------------------------------------------------------------------------------+
    

    Ah ok. Still a little confusing in my opinion. Why show the key storage at all with Soft_serial? In this case the key always gets saved in the eeprom (right?). Just the "key generation" and one eeprom afterwards or one before and one after (with different names) would be clearer imo.
    Just some (hopefully constructive) critisism. I still like it way more than the old system!

    AnticimexA 1 Reply Last reply
    0
    • L LastSamurai

      This is what I get:

      +------------------------------------------------------------------------------------+
      |                           MySensors security personalizer                          |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                               Configuration settings                               |
      +------------------------------------------------------------------------------------+
      | * Guided personalization/storage of keys in EEPROM                                 |
      | * Guided storage and generation of random serial in EEPROM                         |
      | * Software based personalization (no ATSHA204A usage whatsoever)                   |
      | * Will not require UART confirmation before locking ATSHA204A configuration        |
      | * Will store HMAC key to EEPROM                                                    |
      | * Will store AES key to EEPROM                                                     |
      | * Will generate soft serial using software                                         |
      | * Will store soft serial to EEPROM                                                 |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                           Hardware security peripherals                            |
      +--------------+--------------+--------------+------------------------------+--------+
      | Device       | Status       | Revision     | Serial number                | Locked |
      +--------------+--------------+--------------+------------------------------+--------+
      | AVR          | DETECTED     | N/A          | N/A (generation required)    | N/A    |
      +--------------+--------------+--------------+------------------------------+--------+
      
      +------------------------------------------------------------------------------------+
      |                                       EEPROM                                       |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | OK     | ... |
      | AES    | OK     | 00000000000000000000000000000000                                 |
      | SERIAL | OK     | 0E0103FA44D749F163                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                   Key generation                                   |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | SERIAL | OK     | 0F5B932A87D43AD318                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                    Key storage                                     |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | OK     | ... |
      | AES    | OK     | 00000000000000000000000000000000                                 |
      | SERIAL | OK     | 0F5B932A87D43AD318                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  WHAT TO DO NEXT?                                  |
      +------------------------------------------------------------------------------------+
      | This device has now been personalized. Run this sketch with its current settings   |
      | on all the devices in your network that have security enabled.                     |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  Execution result                                  |
      +------------------------------------------------------------------------------------+
      | SUCCESS                                                                            |
      +------------------------------------------------------------------------------------+
      

      Ah ok. Still a little confusing in my opinion. Why show the key storage at all with Soft_serial? In this case the key always gets saved in the eeprom (right?). Just the "key generation" and one eeprom afterwards or one before and one after (with different names) would be clearer imo.
      Just some (hopefully constructive) critisism. I still like it way more than the old system!

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

      @LastSamurai Well, I designed it like this intentionally because I want the "experience" to be uniform.
      You have selected a mode which generates a key and stores a key. So it will shows the key(s) it generates and also the key(s) it store. Key generation and key storage is normally two separate things.
      You can if you so like completely customize what keys you generate and store using the "advanced" config flags.
      The log is designed to show exactly what is happening.
      You could if you wanted to tell it to generate a serial but not store it. Or tell it to not generate a serial but store one you have configured yourself. Hence the tables are separated.

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

      L 1 Reply Last reply
      0
      • AnticimexA Anticimex

        @LastSamurai Well, I designed it like this intentionally because I want the "experience" to be uniform.
        You have selected a mode which generates a key and stores a key. So it will shows the key(s) it generates and also the key(s) it store. Key generation and key storage is normally two separate things.
        You can if you so like completely customize what keys you generate and store using the "advanced" config flags.
        The log is designed to show exactly what is happening.
        You could if you wanted to tell it to generate a serial but not store it. Or tell it to not generate a serial but store one you have configured yourself. Hence the tables are separated.

        L Offline
        L Offline
        LastSamurai
        Hardware Contributor
        wrote on last edited by LastSamurai
        #34

        @Anticimex Well that makes sense too. I was just a little confused seeing 2 serial keys the first time. I figured it out though, so other will too ;)
        Nice work though, much easier to use than the old version!

        When I have the time I'll try it with some other nodes in the next days.

        AnticimexA 1 Reply Last reply
        0
        • L LastSamurai

          @Anticimex Well that makes sense too. I was just a little confused seeing 2 serial keys the first time. I figured it out though, so other will too ;)
          Nice work though, much easier to use than the old version!

          When I have the time I'll try it with some other nodes in the next days.

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

          @LastSamurai thanks. Appreciate the feedback. I am going to test it on a samd device as well and if it looks OK, I'll have the core team review and approve it. Then I'll start looking at the simplified security option.

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

          L 1 Reply Last reply
          1
          • AnticimexA Anticimex

            @LastSamurai thanks. Appreciate the feedback. I am going to test it on a samd device as well and if it looks OK, I'll have the core team review and approve it. Then I'll start looking at the simplified security option.

            L Offline
            L Offline
            LastSamurai
            Hardware Contributor
            wrote on last edited by
            #36

            @Anticimex I just tested the "#define PERSONALIZE_SOFT" option with my new gateway to set serial number and HMAC key and everything seems to work just fine. I have no devices with hardware encryption (yet) so I can't test that one.

            AnticimexA 1 Reply Last reply
            0
            • L LastSamurai

              @Anticimex I just tested the "#define PERSONALIZE_SOFT" option with my new gateway to set serial number and HMAC key and everything seems to work just fine. I have no devices with hardware encryption (yet) so I can't test that one.

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

              @LastSamurai hardware encryption? Well, from a personalization perspective, encryption is handled the same. AES key is always stored in eeprom so you can use encryption for nrf24 (as rfm69 is the only radio currently with a hw AES accelerator). Rfm69 still gets the key from eeprom though.

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

              L 1 Reply Last reply
              0
              • AnticimexA Anticimex

                @LastSamurai hardware encryption? Well, from a personalization perspective, encryption is handled the same. AES key is always stored in eeprom so you can use encryption for nrf24 (as rfm69 is the only radio currently with a hw AES accelerator). Rfm69 still gets the key from eeprom though.

                L Offline
                L Offline
                LastSamurai
                Hardware Contributor
                wrote on last edited by
                #38

                @Anticimex Badly formulated from me ;) What I meant is signing (+ perhaps encryption too) using the ATSHA204A instead of the software backend. All tests I have done are with the software one.

                AnticimexA 1 Reply Last reply
                0
                • L LastSamurai

                  @Anticimex Badly formulated from me ;) What I meant is signing (+ perhaps encryption too) using the ATSHA204A instead of the software backend. All tests I have done are with the software one.

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

                  @LastSamurai Ah, no, the ATSHA204A is only for signing. You can however go "advanced" and configure the personalizer to use the ATSHA204A to generate a random AES key for encryption use. But the ATSHA204A is not involved in encryption or decryption operations.

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

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

                    The updated personalizer has now been merged to the development branch (BETA channel).

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

                    1 Reply Last reply
                    1
                    • L Offline
                      L Offline
                      LastSamurai
                      Hardware Contributor
                      wrote on last edited by
                      #41

                      Great! Any idea when it will be in the normal branch? Haven been using that for most of the time.

                      AnticimexA 1 Reply Last reply
                      0
                      • L LastSamurai

                        Great! Any idea when it will be in the normal branch? Haven been using that for most of the time.

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

                        @LastSamurai no, there is no schedule set for the next release to my knowledge.

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

                        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