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. Signing_Soft in dev branch - How to do?

Signing_Soft in dev branch - How to do?

Scheduled Pinned Locked Moved Development
24 Posts 3 Posters 4.7k Views 4 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.
  • AndurilA Offline
    AndurilA Offline
    Anduril
    wrote on last edited by
    #21

    @Anticimex I thought to be using only soft signing...

    #include <sha204_library.h>
    #include <sha204_lib_return_codes.h>
    #define MY_CORE_ONLY
    #include <MySensor.h>
    
    #if DOXYGEN
    #define LOCK_CONFIGURATION
    #define LOCK_DATA
    #define SKIP_KEY_STORAGE
    #define USER_KEY
    #define SKIP_UART_CONFIRMATION
    #define USE_SOFT_SIGNING
    #define STORE_SOFT_KEY
    #define USER_SOFT_KEY
    #define STORE_SOFT_SERIAL
    #define USER_SOFT_SERIAL
    #define STORE_AES_KEY
    #define USER_AES_KEY
    #endif
    
    //#define LOCK_CONFIGURATION
    
    //#define LOCK_DATA
    
    //#define SKIP_KEY_STORAGE
    
    //#define USER_KEY
    
    //#define SKIP_UART_CONFIRMATION
    
    #define USE_SOFT_SIGNING
    
    #define STORE_SOFT_KEY
    
    #define USER_SOFT_KEY
    
    #define STORE_SOFT_SERIAL
    
    #define USER_SOFT_SERIAL
    
    #define STORE_AES_KEY
    
    #define USER_AES_KEY
    
    #if defined(SKIP_UART_CONFIRMATION) && !defined(USER_KEY)
    #error You have to define USER_KEY for boards that does not have UART
    #endif
    
    #ifdef USER_KEY
    /** @brief The user-defined HMAC key to use for personalization */
    #define MY_HMAC_KEY 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
    /** @brief The data to store in key slot 0 */
    const uint8_t user_key_data[32] = {MY_HMAC_KEY};
    #endif
    
    #ifdef USER_SOFT_KEY
    

    I copied the header of the SecurityPersonalizer (just stripped the comments to make it shorter). Do I have activated atsh somewhere without noticing?

    AnticimexA 1 Reply Last reply
    0
    • AndurilA Anduril

      @Anticimex I thought to be using only soft signing...

      #include <sha204_library.h>
      #include <sha204_lib_return_codes.h>
      #define MY_CORE_ONLY
      #include <MySensor.h>
      
      #if DOXYGEN
      #define LOCK_CONFIGURATION
      #define LOCK_DATA
      #define SKIP_KEY_STORAGE
      #define USER_KEY
      #define SKIP_UART_CONFIRMATION
      #define USE_SOFT_SIGNING
      #define STORE_SOFT_KEY
      #define USER_SOFT_KEY
      #define STORE_SOFT_SERIAL
      #define USER_SOFT_SERIAL
      #define STORE_AES_KEY
      #define USER_AES_KEY
      #endif
      
      //#define LOCK_CONFIGURATION
      
      //#define LOCK_DATA
      
      //#define SKIP_KEY_STORAGE
      
      //#define USER_KEY
      
      //#define SKIP_UART_CONFIRMATION
      
      #define USE_SOFT_SIGNING
      
      #define STORE_SOFT_KEY
      
      #define USER_SOFT_KEY
      
      #define STORE_SOFT_SERIAL
      
      #define USER_SOFT_SERIAL
      
      #define STORE_AES_KEY
      
      #define USER_AES_KEY
      
      #if defined(SKIP_UART_CONFIRMATION) && !defined(USER_KEY)
      #error You have to define USER_KEY for boards that does not have UART
      #endif
      
      #ifdef USER_KEY
      /** @brief The user-defined HMAC key to use for personalization */
      #define MY_HMAC_KEY 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
      /** @brief The data to store in key slot 0 */
      const uint8_t user_key_data[32] = {MY_HMAC_KEY};
      #endif
      
      #ifdef USER_SOFT_KEY
      

      I copied the header of the SecurityPersonalizer (just stripped the comments to make it shorter). Do I have activated atsh somewhere without noticing?

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

      @Anduril try ditching the SHA204 library includes at the top. Not sure if they are required for soft signing. Can't remember if I put them there for a reason.... Long time ago I coded for MySensors :(

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

      AndurilA 1 Reply Last reply
      0
      • AnticimexA Anticimex

        @Anduril try ditching the SHA204 library includes at the top. Not sure if they are required for soft signing. Can't remember if I put them there for a reason.... Long time ago I coded for MySensors :(

        AndurilA Offline
        AndurilA Offline
        Anduril
        wrote on last edited by
        #23

        @Anticimex Thank you. Deactivating those sha libs made the code compile and work.

        AnticimexA 1 Reply Last reply
        0
        • AndurilA Anduril

          @Anticimex Thank you. Deactivating those sha libs made the code compile and work.

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

          @Anduril :thumbsup:

          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.1k

          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