<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cannot enable SECURE_BOOTLOADER in matter project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103977/cannot-enable-secure_bootloader-in-matter-project</link><description>Hi, I am working on a custom project based on matter lock sample . 
 We went over several crypto issues and right now I think we are facing a new one. 
 I am trying to enable SECURE_BOOT in order to sign and verify image signatures during OTA. 
 When</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Oct 2023 08:38:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103977/cannot-enable-secure_bootloader-in-matter-project" /><item><title>RE: Cannot enable SECURE_BOOTLOADER in matter project</title><link>https://devzone.nordicsemi.com/thread/448459?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2023 08:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:364eca25-3443-44b3-9818-c112a3c28207</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Apologies for the long response time.&lt;/p&gt;
[quote user="Hugo.Dev"]Do you know what I am missing?[/quote]
&lt;p&gt;What SDK are you using? If these configurations are fetched from any of the signing samples, there could be changes in between the NCS version you&amp;#39;re using and the samples version&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This case is somewhat old but I think relevant for the undefined references:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/80094/undefined-reference-to-rsa_pub_key-when-config_boot_signature_key_file-is-defined"&gt;Undefined reference to rsa_pub_key when CONFIG_BOOT_SIGNATURE_KEY_FILE is defined&lt;/a&gt;&amp;nbsp;Were you able to get the samples to work before adding them to your Matter project?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot enable SECURE_BOOTLOADER in matter project</title><link>https://devzone.nordicsemi.com/thread/448376?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2023 14:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eddc8ca-57e7-48ba-a55a-c8f635b0bf81</guid><dc:creator>Hugo.Dev</dc:creator><description>&lt;p&gt;Hi, any update?&lt;br /&gt;I just went back to it.&lt;/p&gt;
&lt;p&gt;Trying a different approach, I have added these lines to mcuboot/prj.conf:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOOT_SIGNATURE_TYPE_RSA=n
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
CONFIG_BOOT_SIGNATURE_KEY_FILE=&amp;quot;levelboot.pem&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but in this case I am getting these compiling errors:&lt;/p&gt;
&lt;p&gt;undefined reference to `ecdsa_pub_key&amp;#39;&lt;/p&gt;
&lt;p&gt;undefined reference to `ecdsa_pub_key_len&amp;#39;&lt;/p&gt;
&lt;p&gt;Do you know what I am missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot enable SECURE_BOOTLOADER in matter project</title><link>https://devzone.nordicsemi.com/thread/447538?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 14:53:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d528e1e7-0933-466f-ad04-6bad8282874a</guid><dc:creator>Hugo.Dev</dc:creator><description>&lt;p&gt;Hi, I&amp;acute;ll take a look.&lt;br /&gt;Here are the configuration files i am using:&lt;/p&gt;
&lt;p&gt;overlay-common.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
# ===========================
# Interal Flash Configuration
# ===========================
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# =====================
# Settings Configuration
# =====================
CONFIG_NVS=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_NVS=y
CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=1
CONFIG_SETTINGS_NVS_SECTOR_COUNT=8

# ====================
# Crypto Configuration
# ====================
CONFIG_MBEDTLS_AES_C=y
CONFIG_MBEDTLS_CIPHER_MODE_CBC=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_OPENTHREAD_SOURCES=y
CONFIG_MBEDTLS_GCM_C=y
# required for ED25519 patches
CONFIG_MBEDTLS_SHA512_C=y

# ================
# Power Management
# ================
# Eric: I am disabling this for now since we have an issue with external flash power management
#CONFIG_PM=y
#CONFIG_PM_DEVICE=y
#CONFIG_PM_DEVICE_RUNTIME=y

# =============
# Miscellaneous
# =============
# CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_ASSERT=n
CONFIG_REBOOT=y
CONFIG_MAIN_THREAD_PRIORITY=7
CONFIG_OPENTHREAD_SHELL=n

# =====
# Stacks
# =====
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_LOW_PRIORITY_WORKQUEUE_STACK_SIZE=6144
CONFIG_SHELL_STACK_SIZE=2048
CONFIG_OPENTHREAD_THREAD_STACK_SIZE=4096

# ====================
# Memory Optimizations
# ====================
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_BOOT_BANNER=n

# ================
# WatchDog Support
# ================
# CONFIG_WATCHDOG=n
# CONFIG_WDT_LOG_LEVEL_DBG=n
# CONFIG_WDT_DISABLE_AT_BOOT=n

# =================
# Bluetooth Support
# =================
# CONFIG_BT=y
# CONFIG_BT_SMP=n
# CONFIG_BT_GATT_SERVICE_CHANGED=y
# CONFIG_BT_PHY_UPDATE=y
# CONFIG_BT_SETTINGS=n
# CONFIG_BT_DIS=n
# CONFIG_BT_ATT_PREPARE_COUNT=0

# CONFIG_BT_MAX_CONN=2
# CONFIG_BT_MAX_PAIRED=0
# CONFIG_BT_PERIPHERAL=y
# CONFIG_BT_CENTRAL=y

# CONFIG_BT_SHELL=n
# CONFIG_BT_DEBUG_LOG=y
# CONFIG_BT_HCI=y
# CONFIG_BT_L2CAP_TX_MTU=247
# CONFIG_BT_BUF_ACL_RX_SIZE=251
# CONFIG_BT_BUF_ACL_TX_COUNT=3
# CONFIG_BT_BUF_ACL_TX_SIZE=251
# CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
# CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
# CONFIG_BT_GATT_CLIENT=y
# CONFIG_BT_GATT_DYNAMIC_DB=y

# BLE device configs
# CONFIG_BT_COMPANY_ID=0xFDBF
# CONFIG_BT_DEVICE_APPEARANCE=1793
# CONFIG_BT_DEVICE_NAME_DYNAMIC=y
# CONFIG_BT_DEVICE_NAME_MAX=15

# Extended Advertising for multiple Adv Set support
# CONFIG_BT_EXT_ADV=y
# CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=31
# CONFIG_BT_EXT_ADV_MAX_ADV_SET=2

# BLE Threads Stacks Sizes
CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
CONFIG_BT_HCI_TX_STACK_SIZE=1024
CONFIG_BT_RX_STACK_SIZE=1024

# ============================
# Necessary Peripheral Support
# ============================
CONFIG_I2C=y
CONFIG_I2S=y
CONFIG_PWM=y
CONFIG_GPIO=y
CONFIG_NRFX_COMP=y
CONFIG_NRFX_PPI=y

# Enable ADC
CONFIG_ADC=y
CONFIG_ADC_SHELL=n
CONFIG_ADC_ASYNC=y

# Temperature Sensor
CONFIG_SENSOR=y
CONFIG_SENSOR_SHELL=n
CONFIG_TEMP_NRF5_MPSL=y

# Hardware Info Support
CONFIG_HWINFO=y
CONFIG_HWINFO_NRF=y

# Pinctrl Support
# CONFIG_PINCTRL=y

# For trig functions and other necessary for DSP
CONFIG_NEWLIB_LIBC=y
CONFIG_FPU=y
CONFIG_FPU_SHARING=y

# ==============
# Zigbee Support
# ==============
# CONFIG_ZIGBEE=n
# CONFIG_ZIGBEE_APP_UTILS=n
# CONFIG_ZIGBEE_SHELL=n
# CONFIG_ZIGBEE_ROLE_END_DEVICE=n
# CONFIG_ZIGBEE_CHANNEL_SELECTION_MODE_MULTI=n

# ZBOSS configuration (for Zigbee thread)
#CONFIG_ZBOSS_DEFAULT_THREAD_PRIORITY=20
#CONFIG_ZBOSS_TRACE_LOG_LEVEL_INF=y
#CONFIG_PM_PARTITION_SIZE_ZBOSS_NVRAM=0x4000

# Networking configs for Zigbee
# CONFIG_NET_IPV6_MLD=n
# CONFIG_NET_IPV6_NBR_CACHE=n
# CONFIG_NET_IPV6_RA_RDNSS=n
# CONFIG_NET_IP_ADDR_CHECK=n

# Cryptography support for Zigbee
# CONFIG_TINYCRYPT=y
# CONFIG_CTR_DRBG_CSPRNG_GENERATOR=y
# CONFIG_ZIGBEE_USE_SOFTWARE_AES=y

# ==============
# Matter Support
# ==============
CONFIG_CHIP=y
CONFIG_CHIP_QSPI_NOR=y
CONFIG_CHIP_PROJECT_CONFIG=&amp;quot;src/MatterLock/chip_project_config.h&amp;quot;
CONFIG_CHIP_NFC_COMMISSIONING=n
CONFIG_STD_CPP14=y

# Bluetooth Low Energy configuration
CONFIG_BT_DEVICE_NAME=&amp;quot;MatterLock&amp;quot;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
# =======================
# Enable bootloaded image
# =======================
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE=y

# Default to an internal (development) build
CONFIG_BUILD_TYPE_INTERNAL=y

# ================
# Enable Debugging
# ================
#CONFIG_DEBUG_OPTIMIZATIONS=y
#CONFIG_DEBUG_THREAD_INFO=y
#CONFIG_THREAD_NAME=y
CONFIG_DEBUG=n

CONFIG_SHELL=y
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CLI=y

# ==============
# Enable logging
# ==============
CONFIG_LOG=y
CONFIG_LOG_SPEED=y
CONFIG_LOG_PRINTK=y
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024
CONFIG_LOG_BUFFER_SIZE=2048

# turn off functions names in the logging messages
CONFIG_LOG_FUNC_NAME_PREFIX_ERR=n
CONFIG_LOG_FUNC_NAME_PREFIX_WRN=n
CONFIG_LOG_FUNC_NAME_PREFIX_INF=n

CONFIG_MATTER_LOG_LEVEL_INF=y
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot enable SECURE_BOOTLOADER in matter project</title><link>https://devzone.nordicsemi.com/thread/447395?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 09:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b441664f-d4fd-4e8c-a093-4ae0e7f72a9d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Noted, thank you for clarifying&lt;/p&gt;
[quote user="Hugo.Dev"]4. I was reading these resources:[/quote]
&lt;p&gt;Could you verify in which of the projects configuration files you&amp;#39;ve added the configurations?&lt;/p&gt;
&lt;p&gt;Could you upload all of your projects configuration and overlay files and name them?&lt;/p&gt;
&lt;p&gt;I would also recommend you to have a look at this repository created by a colleague of mine where he explains signatures to some extent in addition to the documentation referred to: &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/keys_and_signatures"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/keys_and_signatures&lt;/a&gt;&amp;nbsp;as well as&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/security/security.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/security/security.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot enable SECURE_BOOTLOADER in matter project</title><link>https://devzone.nordicsemi.com/thread/447065?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 12:08:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e218215-6960-435b-844a-5fd61a9f9a0d</guid><dc:creator>Hugo.Dev</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;1. I am performing OTA over matter. And it is already working ok.&lt;/p&gt;
&lt;p&gt;2. yes, only app update.&amp;nbsp;But I am interested in adding some image signature.&lt;/p&gt;
&lt;p&gt;3. yes i&amp;acute;ve seen that guide&lt;/p&gt;
&lt;p&gt;4. I was reading these resources:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/fw_update.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/fw_update.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I short, I only want to add a signature to the OTA image, and want the bootloader to check that signature.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot enable SECURE_BOOTLOADER in matter project</title><link>https://devzone.nordicsemi.com/thread/447054?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 11:57:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85bad604-c738-420b-9457-92b4c9bf50ec</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to need some more information before&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You state that you&amp;#39;re aiming to do OTA, but over what protocol?
&lt;ol&gt;
&lt;li&gt;Is it Matter OTA update protocol or SMP over BLE?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Are you only going to do application update? If so, you don&amp;#39;t need Nordic Secure Immutable Bootloader (NSIB) and you only need MCUboot&lt;/li&gt;
&lt;li&gt;Have you seen the guide for adding DFU support to the door lock sample?&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/matter/lock/README.html#device-firmware-upgrade-support"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/matter/lock/README.html#device-firmware-upgrade-support&lt;/a&gt;&amp;nbsp;
&lt;ol&gt;
&lt;li&gt;CONFIG_IS_SECURE_BOOTLOADER=y AFAIK this only sets that the device with this configuration IS the bootloader, not that you enable NSIB. In which part of the projects configuration has this been set? Is it in the applications prj.conf?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Could you post links to what resources you&amp;#39;ve been following? Do note that the links I&amp;#39;ve posted is for the latest release of NCS. Which version do you use?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>