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 6.1k 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?

    A 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?

      A Offline
      A 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
      • A 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.

        A 1 Reply Last reply
        0
        • AndurilA Anduril

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

          A Offline
          A 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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          14

          Online

          12.3k

          Users

          11.2k

          Topics

          113.4k

          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