How can the bin file be encrypted and signed?

Hi,

The SDK version I am using is 2.6.1 and the example is "matter lock".

I wrote the following configuration into \child_image\mcuboot\prj.conf.

Fullscreen
1
2
3
CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=n
CONFIG_BOOT_ENCRYPT_IMAGE=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 

And add the code to CMakeLists.txt. Are these steps correct?

Is app_update.bin a generated encrypted file?

Fullscreen
1
2
set(mcuboot_CONFIG_BOOT_SIGNATURE_KEY_FILE \"${CMAKE_CURRENT_SOURCE_DIR}/priv.pem\")
set(mcuboot_CONFIG_BOOT_ENCRYPTION_KEY_FILE \"${CMAKE_CURRENT_SOURCE_DIR}/encryption_key.pem\")
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parents Reply
  • You've just changed the mcuboot app partition size without changing anything else. This means that in the middle of your memory area there are now a gap with nothing between the app and the factory data. This is how the sizes are set up as default

    In your static partitioning there is a gap of 0x4200 between the app and factory data. 

    Kind regards,
    Andreas

Children
  • Hi,

    It seems that my configuration is also 0xF7000. What do you mean by  the gap of 0x4200?

    If version 2.6.1 does not support "CONFIG_BOOT_ENCRYPT_IMAGE", is bin file encrypted by default?

  • My bad, you are right since you had also modified the start.

    Could you upload the build errors you're getting when trying to build with this configuration.

    Kind regards,
    Andreas

  • Hi,

    The current problem is the previous reply.

  • That is not the log I'm referring to, but I'm sure the issue is where you're pointing. Could you please enable logging and 

    1) Upload the build log

    2) Upload the device logs from both bootloader and application

    Kind regards,
    Andreas

  • Hi,

    The attachment is BUILD LOG, the device will not send any messagebuild log.7z

    Can you confirm it for me first?

    If version 2.6.1 does not support "CONFIG_BOOT_ENCRYPT_IMAGE", is bin file encrypted by default?