<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[The ESP Journal - Medium]]></title>
        <description><![CDATA[Best Practices, Articles, and Notes from Espressif folks - Medium]]></description>
        <link>https://medium.com/the-esp-journal?source=rss----d5414d5dee73---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>The ESP Journal - Medium</title>
            <link>https://medium.com/the-esp-journal?source=rss----d5414d5dee73---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 22:12:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/the-esp-journal" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Matter: Improvements to Espressif DAC Provisioning Service]]></title>
            <link>https://medium.com/the-esp-journal/matter-improvements-to-espressif-dac-provisioning-service-14dc91c06bdb?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/14dc91c06bdb</guid>
            <category><![CDATA[matter]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[Kedar Sovani]]></dc:creator>
            <pubDate>Tue, 01 Oct 2024 05:53:10 GMT</pubDate>
            <atom:updated>2024-10-01T05:53:10.652Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://blog.espressif.com/accelerating-matter-device-manufacturing-2fcce0a0592a">Espressif’s Secure Manufacturing Service</a>, which was launched last year, has assisted many customers in simplifying their manufacturing. Since a year from launch, we worked with hundreds of customers and served millions of modules that were manufactured with this service.</p><p>This service lets customers order modules from Espressif such that they are pre-programmed with all the Matter-specific security configurations, firmware, and other <strong>device-unique</strong> credentials and certificates that should be flashed on the modules. This saves organizations hassle and time from building their own manufacturing scripts and back-and-forth with factory lines.</p><p>Initially, we had been running a VID-scoped PAA (Product Attestation Authority). Now, Espressif is an approved signing authority for a <a href="https://csa-iot.org/certification/paa/#:~:text=trust%40dreamsecurity.com-,Espressif%20Systems">Non-VID scoped PAA</a> (Product Attestation Authority) also called as Open PAA.</p><h3>What does being a non-VID scoped PAA mean?</h3><p>Effectively, we can now support workflows that we previously were not able to support, viz:</p><ul><li>Secure Matter Manufacturing in your Factory (Matter DACs and device-unique data)</li><li>Upgrading in-field devices to support Matter by generating and delivering DACs securely</li></ul><h3>Matter Manufacturing in your Factory</h3><p>We announced support for <a href="https://blog.espressif.com/accelerating-matter-device-manufacturing-2fcce0a0592a">Accelerated Matter Manufacturing</a> last year. This allowed organizations to accelerate the manufacturing of their Matter devices, by allowing Espressif to pre-program the Device Attestation certificates (DACs), the firmware, and security configurations on modules before being shipped out.</p><p>One request we kept getting was a provision to perform this manufacturing in the customer’s factory of choice. This is now possible with our latest update. We are currently working with select customers to enable their factories to perform Matter manufacturing by themselves. If you are interested in this, please <a href="/service/mailto:matter-pki@espressif.com">reach out to us</a> for the next steps.</p><p>The most important part of this is having the ability to securely deliver cryptographically signed Device Attestation Certificates (DACs) to the modules without their private key ever leaving the module.</p><p>The typical workflow is shown in the following diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwTC6RXwvoaAQjXQpcLc6w.gif" /><figcaption>In your Factory DAC Delivery</figcaption></figure><h3>Upgrading In-field Devices to Matter</h3><p>We also support delivering of DACs to in-field devices, that wish to now incorporate Matter support. For this scenario, it is essential that the in-field devices have a <strong>mutually authenticated secure </strong>connection to some device cloud platform. The cloud platform is expected to act as the trust broker for the in-field devices. The secure DAC delivery in this case happens as shown in the following diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2IB0a8ahwOffqD1BlVcIOA.gif" /><figcaption>In-field DAC Delivery</figcaption></figure><p>If you are working on building Matter products, please <a href="/service/mailto:matter-pki@espressif.com">reach out to us</a> to check how this aligns with your product deployment workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14dc91c06bdb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/matter-improvements-to-espressif-dac-provisioning-service-14dc91c06bdb">Matter: Improvements to Espressif DAC Provisioning Service</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wireless Connectivity Solutions for ESP32-P4]]></title>
            <link>https://medium.com/the-esp-journal/wireless-connectivity-solutions-for-esp32-p4-8c64ca156a81?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/8c64ca156a81</guid>
            <category><![CDATA[microcontrollers]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[wireless]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[connectivity]]></category>
            <dc:creator><![CDATA[Anant Raj Gupta]]></dc:creator>
            <pubDate>Tue, 20 Aug 2024 03:14:38 GMT</pubDate>
            <atom:updated>2024-08-20T03:16:16.823Z</atom:updated>
            <content:encoded><![CDATA[<p>The ESP32-P4 is a powerful system-on-chip (SoC) from Espressif, designed for high-performance applications that demand robust features. While the ESP32-P4 offers a range of advanced capabilities, it does not have integrated wireless connectivity and may require additional connectivity solutions to meet the diverse needs of modern embedded systems. Espressif provides three main connectivity solutions for the ESP32-P4: <strong>ESP-AT</strong>, <strong>ESP-Hosted</strong>, and <strong>ESP-Extconn</strong>. Let’s explore each solution&#39;s advantages, limitations, and use cases.</p><h4><strong>ESP-AT</strong></h4><p><a href="https://github.com/espressif/esp-at">ESP-AT</a> allows the ESP32-P4 to connect with external wireless modules using AT commands. It’s a simple and effective way to integrate wireless connectivity without extensive software development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*3ZwSnO8nZL2KHI9cVVBMmQ.png" /><figcaption>ESP-AT</figcaption></figure><p><strong>Advantages</strong>:<br>- Simple and easy to use, with a well-established AT command interface<br>- Supports a wide range of WiFi and Bluetooth features<br>- Readily available and widely used in the Espressif ecosystem<br>- Some minor customization is possible on the AT interface to add new commands.</p><p><strong>Limitations</strong>:<br>- Limited to basic connectivity functions, with less flexibility for advanced applications<br>- Low performance in terms of throughput, QoS as well as latency</p><p><strong>Applications and Scenarios</strong>:<br>- Suitable for simple IoT devices or applications with basic connectivity requirements<br>- Ideal for quick prototyping or projects where a straightforward, out-of-the-box solution is preferred</p><h4>ESP-Hosted-FG</h4><p><a href="https://github.com/espressif/esp-hosted">ESP-Hosted-FG</a> provides a standard 802.3 (Ethernet) network interface to the host. This setup ensures the microcontroller can handle more complex or demanding processes without compromising wireless performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*mi45lI8wq4ss1wDLguQtKg.png" /><figcaption>ESP-Hosted</figcaption></figure><p><strong>Advantages:<br></strong>- Provides flexibility in choosing different interfaces based on the performance requirement of the application<br>- Supports advanced wireless features compared to ESP-AT like VLAN, Multiple Network interfaces, Network and performance tuning configurations, etc. <br>- Source code in open-source and the slave can be customized to utilize other features of the SoC like peripherals, GPIOs, etc.</p><p><strong>Limitations:<br></strong>- Requires additional development effort to integrate the ESP-Hosted solution with the main application<br>- May have higher resource requirements compared to ESP-AT</p><p><strong>Applications and Scenarios:</strong><br>- Suitable for complex IoT devices or applications that demand advanced wireless features<br>- Useful for applications that require high-performance or resource-intensive wireless feature</p><h4>ESP-Extconn</h4><p><a href="https://github.com/espressif/esp-extconn">ESP-Extconn</a> provides external wireless connectivity(Wi-Fi &amp; Bluetooth) for ESP chips that do not have built-in wireless capabilities. This component&#39;s APIs are compatible with the Wi-Fi and Bluetooth component APIs in the ESP-IDF.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*kCQIOHzZIbilQqsD84tZ8A.png" /><figcaption>ESP-Extconn</figcaption></figure><p><strong>Advantages</strong>:<br>- Provides the most flexible and extensible connectivity solution<br>- Allows for ease of integration with the main application logic due to familiarity with the ESP-IDF wireless components APIs.</p><p><strong>Limitations:<br></strong>- Requires more development effort compared to the other solutions.<br>- There may be higher resource requirements for the host<br>- It has zero flexibility in terms of customization of co-processor functionality.</p><p><strong>Applications and Scenarios:<br></strong>- Ideal for applications where the main application logic needs to be tightly integrated with the connectivity features<br>- Useful for projects that require a high degree of flexibility and configurability in the connectivity solution</p><h4>Comparison of the different solutions:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_jyNhPOMYi8JWQl49-_YA.png" /><figcaption>Comaprison of the various solutions</figcaption></figure><h4>Choosing the Right Solution</h4><p>When selecting a connectivity solution for the ESP32-P4, consider the following factors:</p><p><strong>1. Connectivity Requirements: </strong>Assess the specific wireless and connectivity needs of your application. If basic Wi-Fi and Bluetooth features are sufficient, ESP-AT may be the most suitable choice. For more advanced wireless requirements, ESP-Hosted or ESP-Extconn may be better options.</p><p><strong>2. Application Complexity:</strong> If your main application logic is straightforward and can be easily combined with the connectivity tasks, ESP-AT may be the simplest solution. For complex applications that require a clear separation between the main logic and connectivity, ESP-Hosted or ESP-Extconn may be more appropriate.</p><p><strong>3. Development Resources:</strong> If you have a smaller team or limited development resources, ESP-AT may be the easiest solution to integrate. ESP-Hosted and ESP-Extconn require more development effort but offer greater flexibility and configurability.</p><p><strong>4. Performance Constraints:</strong> For high-performance applications, the trade-offs between the solutions should be carefully evaluated. ESP-AT may be more resource-efficient, while ESP-Hosted and ESP-Extconn will provide better performance and throughput.</p><p><strong>5. Interface Considerations:</strong> ESP-Hosted provides flexibility to choose from SDIO, SPI, and UART interfaces for your connectivity solution based on the performance requirement of the application.</p><p>6. <strong>Co-processor resource usage:</strong> If there is a requirement to use other features of the co-processor like GPIOs, peripherals, etc., ESP-Hosted provides the most flexibility in terms of customization of the slave as to the requirement. If using the ESP-AT, users can create custom AT commands for some basic operations.</p><p>By considering these factors, you can determine the most suitable connectivity solution for your ESP32-P4-based application, ensuring the optimal balance between ease of use, flexibility, and performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c64ca156a81" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/wireless-connectivity-solutions-for-esp32-p4-8c64ca156a81">Wireless Connectivity Solutions for ESP32-P4</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Command — Response Framework in ESP RainMaker]]></title>
            <link>https://medium.com/the-esp-journal/command-response-framework-in-esp-rainmaker-5e8273db7d22?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/5e8273db7d22</guid>
            <category><![CDATA[espressif]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[rainmaker]]></category>
            <category><![CDATA[esp-rainmaker]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[Piyush Shah]]></dc:creator>
            <pubDate>Thu, 01 Aug 2024 10:19:04 GMT</pubDate>
            <atom:updated>2024-08-01T10:19:04.731Z</atom:updated>
            <content:encoded><![CDATA[<h3>Command — Response Framework in ESP RainMaker</h3><p>[<em>If you have been following the Espressif blogs and announcements, you must already be aware of ESP RainMaker and its various features. If not, please check out the info </em><a href="https://rainmaker.espressif.com/"><em>here</em></a><em> so that you get an idea about what ESP RainMaker is before you proceed further</em>.]</p><p>Admin users in ESP RainMaker can look at some basic node data like type, model, firmware version, etc. and push OTA firmware upgrades. They can view additional diagnostics data if linked with ESP Insights. However, there was no way for them to send some data to the nodes. The <a href="https://swaggerapis.rainmaker.espressif.com/#/Node%20Parameter%20Operations/updatenodestate">set params</a> operations were available to only end users.</p><p>The command — response framework introduced in ESP RainMaker now provides a new way to communicate with the nodes. It is available to admin as well as end users (both, primary and secondary). It also provides better access control on node side and allows more reliable communication with explicit error reporting from the firmware.</p><h3>Workflow</h3><p>A high level workflow is shown here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*IqHcJxL5OZUspSi_xaXRCA.png" /></figure><p>To explain in short,</p><ul><li>Client generates request payload and sends to cloud.</li><li>Cloud assigns it a request id and returns it back to the client, which can then be used to track the status.</li><li>The request is forwarded to the node right away if it is online or is sent later if the node is offline at that time.</li><li>The response of the node is tracked against the request id so that the status can be queried by the client.</li></ul><p>You can read more about the specifications <a href="https://rainmaker.espressif.com/docs/cmd-resp">here</a>.</p><h3>Advantages</h3><p>This new framework enables many new use cases and workflows</p><p>One of the key advantages is that it allows admins to send some data or commands to the nodes, which was earlier not possible. Moreover, on the firmware side, you can specify which type of users (admin, primary, secondary user) should have access to the commands, giving better access control. Eg. You may allow admins and secondary users to reboot a device, but only primary users will be able to reset the Wi-Fi. You can let only primary users to create schedules, but not admins or secondary users.</p><p>Another major advantage is that you can trigger a command even when a node is offline. This allows to push certain configurations and other information at any time and let the nodes get them whenever they come back online.</p><p>The framework not only provides reliable information about delivery of commands to a node, but also lets users check the status (Eg. request timed out, value out of bounds, operation not permitted, etc.)</p><p>We hope that this new framework will unlock new use cases and workflows. Do give this a try by looking into the <a href="https://rainmaker.espressif.com/docs/cmd-resp">docs</a> and let us know if you find this useful. Command-response sample usage is also available in the <a href="https://github.com/espressif/esp-rainmaker/blob/master/examples/led_light/main/app_main.c">led_light example</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e8273db7d22" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/command-response-framework-in-esp-rainmaker-5e8273db7d22">Command — Response Framework in ESP RainMaker</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure boot with auto-signing in ESP RainMaker OTA]]></title>
            <link>https://medium.com/the-esp-journal/secure-boot-with-auto-signing-in-esp-rainmaker-ota-d1a2e1161059?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/d1a2e1161059</guid>
            <category><![CDATA[espressif]]></category>
            <category><![CDATA[secure-boot]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[rainmaker]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Piyush Shah]]></dc:creator>
            <pubDate>Tue, 30 Jul 2024 10:58:38 GMT</pubDate>
            <atom:updated>2024-08-02T11:39:59.666Z</atom:updated>
            <content:encoded><![CDATA[<p>Security is one of the most important aspects of any IoT system and at Espressif, we take it very seriously. The ESP RainMaker platform offers a secure way to onboard a device onto Wi-Fi network and then control and monitor it through cloud. However, the security of the hardware itself is also critical for the overall system to be secure. Espressif MCUs come with various security features like <a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/security/secure-boot-v2.html">secure boot</a>, <a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/security/flash-encryption.html">flash encryption</a>, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/0*cyMJrE0lPBmGvUj7.png" /></figure><p>The secure boot feature is especially important as it allows only authorised firmware to run on the MCUs. ESP IDF has made enabling secure boot very easy. However, managing the secure boot keys is still the developer’s responsibility. Some questions that commonly come up for our customers include:</p><ul><li>How to generate the secure boot key?</li><li>Where to store the key securely, is it stored on the developer’s machine or a server?</li><li>How to protect the key from leakage? What if our engineers leave the organisation?</li><li>How do I know which key is programmed on a device, so I don’t accidentally upgrade with the incorrect keys?</li><li>How to manage a fleet of devices with similar firmware but different secure boot keys?</li></ul><p>The recent addition of “<a href="https://rainmaker.espressif.com/docs/secure-signing">Secure Signing</a>” feature in ESP RainMaker addresses all its concerns. It offers a way to</p><ul><li>generate and manage keys</li><li>simplify signing bootloader and firmware images before device manufacturing</li><li>supports transparently “Auto Signing” before deploying OTA firmware upgrades</li></ul><h3>Auto Sign for OTA</h3><p>The auto-signing feature in ESP RainMaker allows developers to just upload their unsigned firmware to ESP RainMaker, and deploy an OTA firmware upgrade. The ESP RainMaker backend transparently handles the signing with the correct keys during OTA firmware upgrades.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*QYxYcjoWmnl0LGX7iTy21g.png" /><figcaption>Using Secure Boot Auto Key Selection in an OTA Job</figcaption></figure><p>If your fleet includes devices that use distinct keys for key verification, ESP RainMaker will ensure that the correctly signed firmware goes to the right device.</p><p>The developer no more needs to keep track of the keys (or should even have the visibility of the keys), making the fleet management simpler.</p><p>Additionally, since the key management is handled in the cloud, this decouples the development activity from the device-management activity, providing better role based separation.</p><h3>Key Management</h3><p>The secure boot signing keys are created and maintained in the cloud with ESP RainMaker. The private key itself is not accessible to the user but can be used only for signing requests. On private deployments, RainMaker uses a FIPS compliant HSM for added security. Access control, for who can trigger signing requests, ensures that only authorised persons in your organisation can utilise this for signing firmware images. This adds another layer of security to the system.</p><h3>First-Time Signing</h3><p>Once the signing key is created in ESP RainMaker, you need to sign the firmware images (bootloader and firmware) that gets flashed on your production devices. This is achieved by uploading unsigned images of secure-boot enabled bootloader and firmware and getting them signed for the first time.</p><p>ESP RainMaker provides detailed instruction for flashing and setting up your SoC with the appropriate security configurations for secure boot.</p><p>The secure signing feature is available in public as well as private RainMaker deployments. Use <a href="https://customer.rainmaker.espressif.com/docs/rainmaker-releases/#210-22-apr-2024">backend release 2.1.0</a> or later and <a href="https://customer.rainmaker.espressif.com/docs/frontend-releases/#201-12-jun-2024">frontend release 2.0.1</a> or later for this.</p><p>Check out more usage details in the <a href="https://rainmaker.espressif.com/docs/secure-signing">ESP RainMaker docs</a>. Go ahead and use this to secure your RainMaker powered IoT devices. Let us know (at <a href="/service/mailto:esp-rainmaker-support@espressif.com">esp-rainmaker-support@espressif.com</a>) if you have any queries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1a2e1161059" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/secure-boot-with-auto-signing-in-esp-rainmaker-ota-d1a2e1161059">Secure boot with auto-signing in ESP RainMaker OTA</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New with ESP ZeroCode]]></title>
            <link>https://medium.com/the-esp-journal/whats-new-with-esp-zerocode-1199e0c577fc?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/1199e0c577fc</guid>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[zero-code]]></category>
            <category><![CDATA[espressif]]></category>
            <dc:creator><![CDATA[Kedar Sovani]]></dc:creator>
            <pubDate>Mon, 29 Apr 2024 09:12:56 GMT</pubDate>
            <atom:updated>2024-04-29T09:20:04.641Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The Fastest Way to Launch Matter-enabled Products</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jih0ZTef8x5U-B5NmU9gMw.png" /></figure><p>It’s been about 8 months since we launched <a href="https://zerocode.espressif.com/">ESP ZeroCode</a>. For all these months, continuous interest and customer activity has kept us busy. Let’s look at some of the highlights of what’s new with ESP ZeroCode.</p><h3>Customer Interest</h3><p>Over 11,000 users across 125 countries have visited ESP ZeroCode, building various kinds of Matter-enabled products. Every week we get numerous queries and requests for samples or product-related queries. Many of these have now become products that have completed certification and selling in their respective market places.</p><p>Along the way we have Matter-certified over 100 ESP ZeroCode powered devices.</p><h3>Quality</h3><p>We have been rigorously conducting automated QA tests and making continuous fixes in the ZeroCode firmware. These include a variety of tests including,</p><ul><li>long-duration tests over 30 days</li><li>tests under network stress and RF interference</li><li>tests with multiple simultaneous ecosystem operations</li><li>OTA and rollback tests</li></ul><p>Overall the test framework runs over 1000 tests, and most of these are run for over 50 different products.</p><p>Numerous issues for memory footprint, corner cases, commissioning/uncommissioning have been identified and fixed.</p><h3>Product Enhancements</h3><p>We now support 2 different solution types through ESP ZeroCode.</p><ul><li><strong>single-chip solution:</strong> This is the typical solution that we launched with, which today, runs on Wi-Fi (ESP32-C3, ESP32-C2, ESP32) and Thread (ESP32-H2). This solution is the most cost optimised solution and is recommended for all lighting categories.</li><li><strong>two-chip (hosted) solution:</strong> Our ESP ZeroCode ExL is a hosted solution that is ideal for <strong>Appliances</strong>. Appliances often consider connectivity through a “connectivity co-processor”, and work with it over a UART interface. Our two-chip solution addresses the typical Appliance scenarios, particularly MQTT connectivity to cloud platforms (AWS IoT). Read more about it here: <a href="https://blog.espressif.com/esp-zerocode-exl-module-powered-by-aws-iot-expresslink-simplifying-matter-compatible-6f90fa89abe6">Announcing ESP ZeroCode ExL</a>.</li></ul><p>We also extended our portfolio of partnerships. All ESP ZeroCode products can now be easily certified with all of the following ecosystem programs:</p><ul><li>Works with Alexa</li><li>Works with Apple Home</li><li>Works with Google Home</li><li>Works with Home Assistant</li><li>Works with SmartThings</li></ul><p>We also collaborated with Amazon with Alexa Connect Kit (ACK) for Matter and created ZeroCode devices using the ACK for Matter. Through the ESP ZeroCode portal, you can now choose ACK for Matter as a solution for the firmware of your devices.</p><h3><strong>Device Catalogue</strong></h3><p>As Matter standard evolved from v1.0 to v1.1 and v1.2, it kept introducing support for new device types. We have kept pace with the standard’s evolution and have been incorporating newer device types and a variety of device drivers in our product catalogue.</p><p>Today, with ESP ZeroCode, you can quickly build the following Matter-enabled products:</p><ul><li>Window Blinds (automatic and manual calibration)</li><li>Sockets: 1, 2, 3, 4 channel</li><li>Power outlets: 1, 2, 3, 4 channel</li><li>LED Lights with options for RGB, RGBW, RGBWW, RGBCW and RGBCCT with the following drivers are supported: WS2812, PWM, BP5758D, BP5758D, BP1658CJ, BP1658CJ, SM2135E, SM2135E, SM2135EH, SM2135EH, SM2135EGH, SM2135EGH, SM2335EGH</li><li>Filament bulbs, Candle bulb, Reflector bulb, Downlights, Flat Panels (Full Colour, Tunable White)</li><li>Dimmers</li><li>Appliances (hosted mode solutions) like Thermostat, Air Conditioner, Laundry Washer, and Refrigerator</li></ul><p>All the above device types are available on both Wi-Fi as well as Thread/802.15.4 transport.</p><h3>Richer Customisations</h3><p>With the introduction of text mode configurability, ESP ZeroCode now allows richer set of customisations.</p><p>You can now create multi-channel outlets or sockets. You can also create multi-endpoint device types, like a socket and a light in the same accessory and such.</p><p>A variety of driver specific customisations have been included. A few of these include,</p><ul><li>Various configurations for lightbulbs, viz: current, gamma, low power</li><li>Configuring indicator colours and patterns for all the device states, viz: setup mode, device ready, network disconnected</li><li>The state of the device after turning the power on, viz: power, brightness, colour</li><li>Factory reset trigger mechanism</li></ul><h3>Shorter Time To Market</h3><p>A number of optimisations in our manufacturing and certification processes have been made to provide the shortest production time.</p><p>In the fastest case, some of our customers have gone from concept to production-start (including certification) within 3 weeks.</p><p>All in all, we are taking great strides to make ESP ZeroCode the fastest, most secure and robust tool to launch Matter products. If you are looking to develop and maintain your own Matter-enabled products, with your specific customisation, please head over to <a href="https://zerocode.espressif.com/">ESP ZeroCode</a> to get started.</p><p>For additional information about ESP ZeroCode, check out this podcast:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXMh81q81EMA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXMh81q81EMA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXMh81q81EMA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cf605cfc9ca628f99af7c5f3c6010d7/href">https://medium.com/media/3cf605cfc9ca628f99af7c5f3c6010d7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1199e0c577fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/whats-new-with-esp-zerocode-1199e0c577fc">What’s New with ESP ZeroCode</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trying out ESP32-C3’s security features using QEMU]]></title>
            <link>https://medium.com/the-esp-journal/trying-out-esp32-c3s-security-features-using-qemu-6f90a0e44efe?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/6f90a0e44efe</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[esp-idf]]></category>
            <category><![CDATA[emulator]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Harshal Patil]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 12:03:50 GMT</pubDate>
            <atom:updated>2024-04-05T12:03:50.574Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>ESP32 series of SoCs supports multiple <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/security.html">security features </a>like trusted boot, flash encryption, secure storage etc. There are also dedicated peripherals to support use-cases like HMAC and digital signature. For most of these features the eFuse storage in the ESP32-C3 is responsible for storing the private keys and also the configuration bits.</p><p>eFuse memory is one time programmable and hence care must be taken whilst enabling the security features. eFuse programming being an irreversible operation, it is desired to have some playground available to first try out security features (e.g., under emulator) and then move to the real hardware.</p><p>This article talks about exercising different security features in ESP32-C3 under QEMU (emulator).</p><h3>QEMU</h3><blockquote>QEMU, which stands for Quick EMUlator, is an open-source virtualization tool that allows users to create and run virtual machines (VMs) on a host system. It can emulate various architectures, including x86, ARM, RISCV, and others, enabling users to run operating systems and software designed for different hardware platforms.</blockquote><p>Espressif has been developing a system-level emulation of RISC-V based ESP32-C3 using <a href="https://github.com/qemu/qemu/">QEMU</a> and its <a href="https://github.com/espressif/qemu/releases/tag/esp-develop-8.2.0-20240122">latest release</a> supports all the security features for ESP32-C3. Binary compatibility has been maintained to directly run the firmware built for ESP32-C3 target under QEMU.</p><p>Emulator approach provides an advantage to iterate various security configurations without risk of bricking the hardware. Once the workflow is established under QEMU, it can be easily adapted for the real hardware.</p><h3>How does QEMU help in trying out the security features?</h3><p>QEMU is a system-level emulator composed of instruction set emulation, memory and MMU emulation, and peripheral emulation. It also supports various virtual disk formats and networking configurations as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0nswVxf0Nl6Y06S1-l9RfQ.png" /><figcaption>Replacing the hardware using its software emulation</figcaption></figure><p>This helps us to emulate the complete hardware SoC that includes peripherals emulation as well. Peripherals like eFuses, XTS-AES, RSA play a key role in supporting security features.</p><p>We will deep-dive into how to use these emulated host files while using QEMU in the upcoming sections.</p><h3>Trying out the security features</h3><p>Espressif’s <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/index.html">security guide</a> mentions two workflows for enabling the security features:</p><ul><li>Internal first boot-up workflow</li><li><a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/host-based-security-workflows.html">Host-based workflow</a></li></ul><p>We will use a <a href="https://github.com/Harshal5/esp-idf-security-example">demo example</a> which enabled and allows us to try out all the supported security features:</p><ul><li><a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/secure-boot-v2.html">Secure Boot V2</a></li><li><a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/flash-encryption.html">Flash Encryption</a></li><li><a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/storage/nvs_encryption.html">NVS Encryption</a> (<a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/storage/nvs_encryption.html#nvs-encryption-hmac-peripheral-based-scheme">using the HMAC based workflow</a>)</li></ul><p>Let us check out the boot internal first boot-up workflow:</p><h4><strong>Installing QEMU release versions</strong></h4><ol><li>You can get compiled QEMU binaries in its <a href="https://github.com/espressif/qemu/releases/tag/esp-develop-8.2.0-20240122">releases section</a>. Download your platform-specific release binary for ESP32-C3 (<em>qemu-riscv32-softmmu-esp_develop-</em>) or you could use the below commands directly to download and extract the package in the <em>Downloads</em> directory:</li></ol><pre># Linux<br>wget https://github.com/espressif/qemu/releases/download/esp-develop-8.2.0-20240122/qemu-riscv32-softmmu-esp_develop_8.2.0_20240122-x86_64-linux-gnu.tar.xz -P ~/Downloads<br>tar xvf ~/Downloads/qemu-riscv32-softmmu-esp_develop_8.2.0_20240122-x86_64-linux-gnu.tar.xz -C ~/Downloads<br><br># MacOS (M1 silicon)<br>wget https://github.com/espressif/qemu/releases/download/esp-develop-8.2.0-20240122/qemu-riscv32-softmmu-esp_develop_8.2.0_20240122-aarch64-apple-darwin.tar.xz -P ~/Downloads<br>tar xvf ~/Downloads/qemu-riscv32-softmmu-esp_develop_8.2.0_20240122-aarch64-apple-darwin.tar.xz -C ~/Downloads</pre><p>You could also consider adding it to your environment’s $PATH variable for ease of use. For example, in case of Linux/MacOS, if after extracting the downloaded release file is in the Downloads directory, you may run following command:</p><pre>export PATH=$PATH:~/Downloads/qemu/bin</pre><p>2. In case you are interested in trying out the development versions you could also opt for cloning and building Espressif’s GitHub QEMU <a href="https://github.com/espressif/qemu">fork</a> using the configuration instructions mentioned in the <a href="https://github.com/espressif/esp-toolchain-docs/tree/main/qemu/esp32c3">documentation</a>.</p><p>3. In case you are using ESP-IDF’s master branch for developing your firmware, the easiest way to install the QEMU is getting the release binaries that are packaged with ESP-IDF (master) using the following command:</p><pre>python $IDF_PATH/tools/idf_tools.py install qemu-riscv32</pre><p>The above command exports the path to the ESP-IDF packaged QEMU release binaries into your $PATH variable as well.</p><h4>Internal first boot-up workflow</h4><p>In this workflow, the security features are incrementally enabled during the first boot up by the bootloader.</p><p>1. <strong>Clone the demo project</strong></p><p>In a new terminal window, activate the ESP-IDF environment, using the . ./export.sh as mentioned in the ESP-IDF installation <a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html#step-4-set-up-the-environment-variables">section</a>.</p><p>Use the following commands to clone the <a href="https://github.com/Harshal5/esp-idf-security-example">demo</a> project:</p><pre>git clone https://github.com/Harshal5/esp-idf-security-example.git<br>cd esp-idf-security-example</pre><p>2. <strong>Enable the security related configs</strong></p><p>Starting off with the first step, set project target to esp32c3 by entering the command:</p><pre>idf.py set-target esp32c3</pre><p>The project we are using already has all the security configs listed below enabled by default (sdkconfig.defaults), so you do not need to enable them by yourselves.</p><p>Security-related configs that have been enabled:</p><pre># Secure Boot related configs<br>CONFIG_SECURE_SIGNED_ON_BOOT=y<br>CONFIG_SECURE_SIGNED_ON_UPDATE=y<br>CONFIG_SECURE_SIGNED_APPS=y<br><br>CONFIG_SECURE_BOOT_V2_RSA_ENABLED=y<br>CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME=y<br>CONFIG_SECURE_BOOT=y<br>CONFIG_SECURE_BOOT_V2_ENABLED=y<br>CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES=y<br>CONFIG_SECURE_BOOT_SIGNING_KEY=&quot;secure_boot_signing_key.pem&quot;<br>CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT=y<br><br># Flash Encryption related configs<br>CONFIG_SECURE_FLASH_ENC_ENABLED=y<br>CONFIG_FLASH_ENCRYPTION_ENABLED=y<br>CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE=y<br>CONFIG_SECURE_FLASH_HAS_WRITE_PROTECTION_CACHE=y<br>CONFIG_SECURE_FLASH_ENCRYPT_ONLY_IMAGE_LEN_IN_APP_PART=y<br>CONFIG_SECURE_FLASH_CHECK_ENC_EN_IN_APP=y<br>CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y<br><br># NVS Encryption related configs<br>CONFIG_NVS_ENCRYPTION=y<br>CONFIG_NVS_SEC_KEY_PROTECT_USING_HMAC=y<br>CONFIG_NVS_SEC_HMAC_EFUSE_KEY_ID=3</pre><p>Setting these configs assume that we have a pre-generated secure boot key named <em>secure_boot_signing_key.pem</em>, flash encryption key would be generated by the device (esp32c3), and an HMAC key (say <em>hmac_key.bin</em>) that would be used to derive the NVS encryption key needs to be pre-burnt in the eFuse KEY_BLOCK3.</p><p>The secure boot signing key being an RSA key, can be generated using the command:</p><pre>espsecure.py generate_signing_key --version 2 secure_boot_signing_key.pem</pre><p>whereas the NVS encryption key being an AES key can be created using the command:</p><pre>dd if=/dev/random of=hmac_key.bin bs=1 count=32</pre><p>3. <strong>Generate the flash image</strong></p><p>Once we are done with the configurations, we need to build the firmware using the command:</p><pre>idf.py build</pre><p>that would create the bootloader, partition-table, and the application images individually in the build directory.</p><p>The QEMU flash image should be generated by merging the boot loader, partition-table and the application binary images present in the project&#39;sbuild directory of the project. A straightforward way to generate such a flash image is by using the esptool.py merge_bin command with the parameter flash_args file, which contains the entries of all the binary images that are needed to be flash using the command idf.py flash.</p><p>Use the below command to generate a complete flash image (flash_image) for the firmware:</p><pre>(cd build; esptool.py --chip esp32c3 merge_bin --fill-flash-size 4MB -o flash_image.bin @flash_args)</pre><p>As we have already enabled the config CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT, the bootloader entry gets added into the flash_args file, which is needed because as mentioned in secure boot <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/secure-boot-v2.html">guide</a>, bootloader does not get flashed by default with the idf.py flash command when secure boot is enabled.</p><p>4. <strong>Get the eFuses file ready</strong></p><p>A simple eFuses file could be created using:</p><pre>dd if=/dev/zero bs=1K count=1 of=build/qemu_efuse.bin</pre><p>This command creates a 1KB (1024 bytes) file, which is the total size of ESP32-C3 eFuse blocks, filled with zeros.</p><p>Now you have your eFuse file ready and you can view the eFuses summary by running QEMU ESP32-C3 in download mode and attaching the above generated eFuses file. Run QEMU in the download mode using the following command in the terminal in which we have updated the <em>PATH </em>variable:</p><pre>qemu-system-riscv32 -nographic \<br>                    -machine esp32c3 \<br>                    -global driver=esp32c3.gpio,property=strap_mode,value=0x02 \<br>                    -drive file=build/qemu_efuse.bin,if=none,format=raw,id=efuse \<br>                    -global driver=nvram.esp32c3.efuse,property=drive,value=efuse \<br>                    -serial tcp::5555,server,nowait</pre><p>(Once you run the above command you will be able to see the version of the QEMU binary in such format QEMU 8.2.0 monitor. Make sure the version is ≥ 8.2.0)</p><p>Once QEMU is up running in the download mode, you should be able to check the eFuses summary using espefuse.py in the ESP-IDF environment terminal window:</p><pre>export ESPPORT=socket://localhost:5555<br><br>espefuse.py -p $ESPPORT --before=no_reset summary</pre><blockquote>Note: While running QEMU in the download mode the serial output can be redirected to a TCP port. As done in the above QEMU command we have used port 5555, thus you need to set the variable ESPPORT to socket://localhost:5555 or use the port directly for all the related operations.</blockquote><p>You should now be able to view an empty or clean eFuses summary similar to a physical hardware chip.</p><p><strong>You would also need to set the ECO version as required</strong>. For example, if an ESP32-C3 v0.3 is to be used, you need to set the eFuse WAFER_VERSION_MINOR_LO to value 3.</p><pre>espefuse.py -p $ESPPORT --before=no_reset burn_efuse WAFER_VERSION_MINOR_LO 3</pre><p>Finally burn the HMAC key in KEY_BLOCK3 with the key purpose HMAC_UP that would be used for NVS encryption:</p><pre>espefuse.py -p $ESPPORT --before=no_reset burn_key BLOCK_KEY3 hmac_key.bin HMAC_UP</pre><p>Once you are done with burning all the required eFuses, you need to close QEMU by entering the “quit” command.</p><p>5. <strong>Run the firmware using QEMU</strong></p><p>We are now ready to run the firmware by running QEMU in the boot mode using the command:</p><pre>qemu-system-riscv32 -nographic \<br>                    -M esp32c3 \<br>                    -drive file=build/flash_image.bin,if=mtd,format=raw \<br>                    -drive file=build/qemu_efuse.bin,if=none,format=raw,id=efuse \<br>                    -global driver=nvram.esp32c3.efuse,property=drive,value=efuse \<br>                    -serial mon:stdio</pre><p>Note: Supply the same merged flash image and the updated eFuses file generated in the previous steps.</p><p>As we have used stdio as output destination to the serial port, we should now be able to see the following success logs of enabling secure boot, flash encryption and NVS encryption respectively along with their corresponding eFuses burned in the eFuse file, and the merged flash_image being encrypted:</p><pre>&gt; qemu-system-riscv32 -nographic \<br>                    -M esp32c3 \      <br>                    -drive file=build/flash_image.bin,if=mtd,format=raw \       <br>                    -drive file=build/qemu_efuse.bin,if=none,format=raw,id=efuse \<br>                    -global driver=nvram.esp32c3.efuse,property=drive,value=efuse \<br>                    -serial mon:stdio<br>       <br>Adding SPI flash device<br>ESP-ROM:esp32c3-api1-20210207<br>Build:Feb  7 2021<br>rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)<br>SPIWP:0xee<br>mode:DIO, clock div:1<br>load:0x3fcd5990,len:0x3b48<br>load:0x403cc710,len:0xb9c<br>load:0x403ce710,len:0x5b78<br>entry 0x403cc71a<br>I (1) boot: ESP-IDF v5.3-dev-2547-g8b3821ca67 2nd stage bootloader<br>I (2) boot: compile time Mar 14 2024 15:09:57<br>I (5) boot: chip revision: v0.3<br>I (7) boot.esp32c3: SPI Speed      : 80MHz<br>I (7) boot.esp32c3: SPI Mode       : SLOW READ<br>I (8) boot.esp32c3: SPI Flash Size : 2MB<br>I (11) boot: Enabling RNG early entropy source...<br>I (17) boot: Partition Table:<br>I (17) boot: ## Label            Usage          Type ST Offset   Length<br>I (18) boot:  0 nvs              WiFi data        01 02 0000e000 00006000<br>I (18) boot:  1 storage          Unknown data     01 ff 00014000 00001000<br>I (19) boot:  2 factory          factory app      00 00 00020000 00100000<br>I (19) boot:  3 nvs_key          NVS keys         01 04 00120000 00001000<br>I (20) boot:  4 custom_nvs       WiFi data        01 02 00121000 00006000<br>I (20) boot: End of partition table<br>I (22) esp_image: segment 0: paddr=00020020 vaddr=3c030020 size=0c1d8h ( 49624) map<br>I (36) esp_image: segment 1: paddr=0002c200 vaddr=3fc8b600 size=01548h (  5448) load<br>I (38) esp_image: segment 2: paddr=0002d750 vaddr=40380000 size=028c8h ( 10440) load<br>I (42) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=21034h (135220) map<br>I (76) esp_image: segment 4: paddr=0005105c vaddr=403828c8 size=08c84h ( 35972) load<br>I (86) esp_image: segment 5: paddr=00059ce8 vaddr=00000000 size=062e8h ( 25320) <br>I (93) esp_image: Verifying image signature...<br>I (95) secure_boot_v2: Secure boot V2 is not enabled yet and eFuse digest keys are not set<br>I (97) secure_boot_v2: Verifying with RSA-PSS...<br>I (103) secure_boot_v2: Signature verified successfully!<br>I (104) boot: Loaded app from partition at offset 0x20000<br>I (105) secure_boot_v2: enabling secure boot v2...<br>I (109) efuse: Batch mode of writing fields is enabled<br>I (110) esp_image: segment 0: paddr=00000020 vaddr=3fcd5990 size=03b48h ( 15176) <br>I (114) esp_image: segment 1: paddr=00003b70 vaddr=403cc710 size=00b9ch (  2972) <br>I (116) esp_image: segment 2: paddr=00004714 vaddr=403ce710 size=05b78h ( 23416) <br>I (122) esp_image: Verifying image signature...<br>I (124) secure_boot_v2: Secure boot V2 is not enabled yet and eFuse digest keys are not set<br>I (125) secure_boot_v2: Verifying with RSA-PSS...<br>I (127) secure_boot_v2: Signature verified successfully!<br>I (127) secure_boot_v2: Secure boot digests absent, generating..<br>I (141) secure_boot_v2: Digests successfully calculated, 1 valid signatures (image offset 0x0)<br>I (141) secure_boot_v2: 1 signature block(s) found appended to the bootloader.<br>I (142) secure_boot_v2: Burning public key hash to eFuse<br>I (143) efuse: Writing EFUSE_BLK_KEY0 with purpose 9<br>I (208) secure_boot_v2: Digests successfully calculated, 1 valid signatures (image offset 0x20000)<br>I (209) secure_boot_v2: 1 signature block(s) found appended to the app.<br>I (210) secure_boot_v2: Application key(0) matches with bootloader key(0).<br>I (210) secure_boot_v2: Revoking empty key digest slot (1)...<br>I (211) secure_boot_v2: Revoking empty key digest slot (2)...<br>I (211) secure_boot_v2: blowing secure boot efuse...<br>I (212) secure_boot: Enabling Security download mode...<br>I (212) secure_boot: Disable hardware &amp; software JTAG...<br>I (215) efuse: BURN BLOCK4<br>I (236) efuse: BURN BLOCK4 - OK (write block == read block)<br>I (236) efuse: BURN BLOCK0<br>I (256) efuse: BURN BLOCK0 - OK (all write block bits are set)<br>I (259) efuse: Batch mode. Prepared fields are committed<br>I (259) secure_boot_v2: Secure boot permanently enabled<br>I (260) boot: Checking flash encryption...<br>I (263) efuse: Batch mode of writing fields is enabled<br>I (264) flash_encrypt: Generating new flash encryption key...<br>I (265) efuse: Writing EFUSE_BLK_KEY1 with purpose 4<br>I (266) flash_encrypt: Disable UART bootloader encryption...<br>I (266) flash_encrypt: Disable UART bootloader cache...<br>I (266) flash_encrypt: Disable JTAG...<br>I (267) efuse: BURN BLOCK5<br>I (293) efuse: BURN BLOCK5 - OK (write block == read block)<br>I (293) efuse: BURN BLOCK0<br>I (313) efuse: BURN BLOCK0 - OK (all write block bits are set)<br>I (316) efuse: Batch mode. Prepared fields are committed<br>I (316) esp_image: segment 0: paddr=00000020 vaddr=3fcd5990 size=03b48h ( 15176) <br>I (321) esp_image: segment 1: paddr=00003b70 vaddr=403cc710 size=00b9ch (  2972) <br>I (322) esp_image: segment 2: paddr=00004714 vaddr=403ce710 size=05b78h ( 23416) <br>I (329) esp_image: Verifying image signature...<br>I (331) secure_boot_v2: Verifying with RSA-PSS...<br>I (333) secure_boot_v2: Signature verified successfully!<br>I (479) flash_encrypt: bootloader encrypted successfully<br>I (492) flash_encrypt: partition table encrypted and loaded successfully<br>I (493) flash_encrypt: Encrypting partition 1 at offset 0x14000 (length 0x1000)...<br>I (505) flash_encrypt: Done encrypting<br>I (505) esp_image: segment 0: paddr=00020020 vaddr=3c030020 size=0c1d8h ( 49624) map<br>I (518) esp_image: segment 1: paddr=0002c200 vaddr=3fc8b600 size=01548h (  5448) <br>I (520) esp_image: segment 2: paddr=0002d750 vaddr=40380000 size=028c8h ( 10440) <br>I (524) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=21034h (135220) map<br>I (558) esp_image: segment 4: paddr=0005105c vaddr=403828c8 size=08c84h ( 35972) <br>I (567) esp_image: segment 5: paddr=00059ce8 vaddr=00000000 size=062e8h ( 25320) <br>I (574) esp_image: Verifying image signature...<br>I (575) secure_boot_v2: Verifying with RSA-PSS...<br>I (577) secure_boot_v2: Signature verified successfully!<br>I (577) flash_encrypt: Encrypting partition 2 at offset 0x20000 (length 0x100000)...<br>I (3532) flash_encrypt: Done encrypting<br>I (3532) flash_encrypt: Encrypting partition 3 at offset 0x120000 (length 0x1000)...<br>I (3544) flash_encrypt: Done encrypting<br>I (3545) flash_encrypt: Setting CRYPT_CNT for permanent encryption<br>I (3548) efuse: BURN BLOCK0<br>I (3568) efuse: BURN BLOCK0 - OK (all write block bits are set)<br>I (3573) flash_encrypt: Flash encryption completed<br>I (3574) boot: Resetting with flash encryption enabled...<br>ESP-ROM:esp32c3-api1-20210207<br>Build:Feb  7 2021<br>rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)<br>SPIWP:0xee<br>mode:DIO, clock div:1<br>Valid secure boot key blocks: 0<br>secure boot verification succeeded<br>load:0x3fcd5990,len:0x3b48<br>load:0x403cc710,len:0xb9c<br>load:0x403ce710,len:0x5b78<br>entry 0x403cc71a<br>I (3657) boot: ESP-IDF v5.3-dev-2547-g8b3821ca67 2nd stage bootloader<br>I (3658) boot: compile time Mar 14 2024 15:09:57<br>I (3662) boot: chip revision: v0.3<br>I (3664) boot.esp32c3: SPI Speed      : 80MHz<br>I (3664) boot.esp32c3: SPI Mode       : SLOW READ<br>I (3665) boot.esp32c3: SPI Flash Size : 2MB<br>I (3668) boot: Enabling RNG early entropy source...<br>I (3673) boot: Partition Table:<br>I (3673) boot: ## Label            Usage          Type ST Offset   Length<br>I (3674) boot:  0 nvs              WiFi data        01 02 0000e000 00006000<br>I (3674) boot:  1 storage          Unknown data     01 ff 00014000 00001000<br>I (3675) boot:  2 factory          factory app      00 00 00020000 00100000<br>I (3675) boot:  3 nvs_key          NVS keys         01 04 00120000 00001000<br>I (3676) boot:  4 custom_nvs       WiFi data        01 02 00121000 00006000<br>I (3676) boot: End of partition table<br>I (3678) esp_image: segment 0: paddr=00020020 vaddr=3c030020 size=0c1d8h ( 49624) map<br>I (3694) esp_image: segment 1: paddr=0002c200 vaddr=3fc8b600 size=01548h (  5448) load<br>I (3698) esp_image: segment 2: paddr=0002d750 vaddr=40380000 size=028c8h ( 10440) load<br>I (3704) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=21034h (135220) map<br>I (3741) esp_image: segment 4: paddr=0005105c vaddr=403828c8 size=08c84h ( 35972) load<br>I (3752) esp_image: segment 5: paddr=00059ce8 vaddr=00000000 size=062e8h ( 25320) <br>I (3761) esp_image: Verifying image signature...<br>I (3765) secure_boot_v2: Verifying with RSA-PSS...<br>I (3767) secure_boot_v2: Signature verified successfully!<br>I (3768) boot: Loaded app from partition at offset 0x20000<br>I (3769) secure_boot_v2: enabling secure boot v2...<br>I (3769) secure_boot_v2: secure boot v2 is already enabled, continuing..<br>I (3770) boot: Checking flash encryption...<br>I (3770) flash_encrypt: flash encryption is enabled (0 plaintext flashes left)<br>I (3771) boot: Disabling RNG early entropy source...<br>I (3776) cpu_start: Unicore app<br>I (3802) cpu_start: Pro cpu start user code<br>I (3802) cpu_start: cpu freq: 160000000 Hz<br>I (3803) app_init: Application information:<br>I (3803) app_init: Project name:     security<br>I (3803) app_init: App version:      26b03ca<br>I (3803) app_init: Compile time:     Mar 14 2024 15:09:53<br>I (3803) app_init: ELF file SHA256:  5ed173a2f...<br>I (3804) app_init: ESP-IDF:          v5.3-dev-2547-g8b3821ca67<br>I (3804) efuse_init: Min chip rev:     v0.3<br>I (3804) efuse_init: Max chip rev:     v1.99 <br>I (3804) efuse_init: Chip rev:         v0.3<br>I (3805) heap_init: Initializing. RAM available for dynamic allocation:<br>I (3806) heap_init: At 3FC8DCD0 len 00032330 (200 KiB): RAM<br>I (3806) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM<br>I (3806) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM<br>I (3806) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM<br>I (3815) spi_flash: detected chip: gd<br>I (3815) spi_flash: flash io: dio<br>W (3816) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.<br>I (3817) flash_encrypt: Flash encryption mode is RELEASE<br>I (3820) nvs_sec_provider: NVS Encryption - Registering HMAC-based scheme...<br>I (3821) sleep: Configure to isolate all GPIO pins in sleep state<br>I (3822) sleep: Enable automatic switching of GPIO sleep configuration<br>I (3827) main_task: Started on CPU0<br>I (3827) main_task: Calling app_main()<br><br>Example to check Flash Encryption status<br>This is esp32c3 chip with 1 CPU core(s), WiFi/BLE, silicon revision v0.3, 2MB external flash<br>FLASH_CRYPT_CNT eFuse value is 7<br>Flash encryption feature is enabled in RELEASE mode<br>Erasing partition &quot;storage&quot; (0x1000 bytes)<br>Writing data with esp_partition_write:<br>I (3827) example: 0x3fc8fa00   00 01 02 03 04 05 06 07  08 09 0a 0b 0c 0d 0e 0f  |................|<br>I (3827) example: 0x3fc8fa10   10 11 12 13 14 15 16 17  18 19 1a 1b 1c 1d 1e 1f  |................|<br>Reading with esp_partition_read:<br>I (3837) example: 0x3fc8fa20   00 01 02 03 04 05 06 07  08 09 0a 0b 0c 0d 0e 0f  |................|<br>I (3837) example: 0x3fc8fa30   10 11 12 13 14 15 16 17  18 19 1a 1b 1c 1d 1e 1f  |................|<br>Reading with esp_flash_read:<br>I (3837) example: 0x3fc8fa20   75 75 ca b0 e6 09 a7 c1  bd c0 8a 08 e3 24 25 47  |uu...........$%G|<br>I (3837) example: 0x3fc8fa30   a5 e7 94 b4 04 1e 55 d5  ff 04 c9 b8 55 a7 0a 7f  |......U.....U...|<br>I (3847) nvs: NVS partition &quot;nvs&quot; is encrypted.<br>I (3857) example: NVS partition &quot;custom_nvs&quot; is encrypted.<br>I (3857) main_task: Returned from app_main()</pre><p>You can terminate the QEMU session, using <em>control+A</em> and then pressing <em>X.</em></p><p><strong>Just to verify</strong>:</p><p>As we have selected Flash Encryption Release mode, if you try checking out the eFuses summary by running QEMU in the download mode, you will come across the following error:</p><pre>A fatal error occurred: Secure Download Mode is enabled. The tool can not read eFuses.</pre><p>As you have the eFuses file with yourself, you can always modify it, and this opens a lot of possibilities to test your firmware with different eFuses combinations.</p><h3>Future Work</h3><p>Currently, you can quickly try out any ESP-IDF (master branch) based application using QEMU by just running the command idf.py qemu. This command handles all the intermediary steps like generation of eFuses file and the merged binary. But as of now it does not support using a pre-programmed eFuses file, instead it creates a new one for every instance of the run. We are trying to support usage of pre-programmed eFuses file as this will surely increase the user experience of using the emulator approach for such use-cases.</p><h3>Summary</h3><p>Thus, we have seen that the emulator approach surely provides an advantage to iterate over and debug various security configurations and speed up the testing process to finally develop a production-ready configuration that can be tested on the real hardware, without the risk of bricking it due to any misconfigurations.</p><p>In part 2 of this blog, we would go through the host-based workflow for enabling the security features using QEMU.</p><p>Till then, in case you are unsure about the boot loader boot workflow to enable security features, you could safely try it out using ESP32-C3 QEMU first to avoid any hardware damage.</p><p>We are actively working to enable support for any other remaining peripherals of an ESP32-C3 as well, do let us know your feedback and if you come across any issues, feel free to open a discussion/issue at our GitHub repository.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f90a0e44efe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/trying-out-esp32-c3s-security-features-using-qemu-6f90a0e44efe">Trying out ESP32-C3’s security features using QEMU</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Book review: Developing IoT Projects with ESP32 (2nd Edition)]]></title>
            <link>https://medium.com/the-esp-journal/book-review-developing-iot-projects-with-esp32-2nd-edition-facdef7545bb?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/facdef7545bb</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[Juraj Michálek]]></dc:creator>
            <pubDate>Tue, 30 Jan 2024 14:16:55 GMT</pubDate>
            <atom:updated>2024-01-30T14:16:55.799Z</atom:updated>
            <content:encoded><![CDATA[<p>“Developing IoT Projects with ESP32” by Vedat Ozan Oner serves as a key guide, especially in its second edition, which has been thoughtfully updated to reflect the latest trends in IoT development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*wzpDybTFz6FjChQ-6u6Anw.png" /></figure><p>Targeted at C++ developers who want to create powerful applications using the ESP-IDF. The book explains step by step the complexities of IoT development with the ESP32. Vedat Ozan Oner, the author, is recognized for his passion for IoT, ability of making tricky topics easy to understand.</p><h4>Content and Structure</h4><p>The book is well-organized into twelve detailed chapters, each focusing on a specific area of ESP32 development. Starting with a basic introduction to IoT and the ESP32 platform in the first chapter and moving to advanced discussions on Machine Learning and Edge Impulse Development in later chapters, the book provides a step-by-step learning path. Oner introduces complex concepts like LittleFS or FlatBuffers at just the right time, allowing readers to build their knowledge gradually.</p><h4>Who is it for?</h4><p>While the book is a valuable source of information for students and hobbyist makers, the readers are expected to have a basic knowledge of software development. The book content breaks down complex concepts and code into smaller, manageable parts, which are then put together into larger applications. This approach makes the learning process smoother and shows how to apply theory to real-life projects.</p><h4>Key Highlights</h4><p>One of the book’s important points is coverage of security in IoT, a critical yet often neglected topic. Chapter 7 dives into essential security features needed for any large-scale IoT project, including secure boot processes and Over-the-Air (OTA) updates.</p><p>The chapters on Smart Home solutions and Machine Learning bring the book up to date with the latest trends in AI and IoT. These sections are especially notable, offering a peek into the future of IoT devices that are not just connected but also smart.</p><h4>Practicality and Relevance</h4><p>“Developing IoT Projects with ESP32” is packed with practical examples, source code, and advice that can be used right away in real projects. The use of diagrams and code snippets helps clarify complex topics, making this book a hands-on guide for developers looking to improve their IoT development skills.</p><h4>Conclusion</h4><p>Overall, “Developing IoT Projects with ESP32” is a comprehensive and current guide. Whether you are a student, a hobbyist maker or an experienced developer, this book is a valuable resource, offering insights into security, OTA, AI, and ML, ensuring that your IoT projects are not only functional but also secure and forward-looking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=facdef7545bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/book-review-developing-iot-projects-with-esp32-2nd-edition-facdef7545bb">Book review: Developing IoT Projects with ESP32 (2nd Edition)</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP ZeroCode]]></title>
            <link>https://medium.com/the-esp-journal/esp-zerocode-52d7f3c6fd72?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/52d7f3c6fd72</guid>
            <category><![CDATA[espressif]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[zero-code]]></category>
            <dc:creator><![CDATA[ESP BOT]]></dc:creator>
            <pubDate>Mon, 13 Nov 2023 07:59:00 GMT</pubDate>
            <atom:updated>2024-04-29T09:25:57.615Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*ftIyBPi61uUvxd6YWq4EUg.png" /></figure><p>ESP ZeroCode allows device makers to instantly specify, build and launch connected products, right through their browsers. A wide variety of products such as lightbulbs, lighting fixtures, led strips, sockets, switches, roller blinds, refrigerators, laundry washers, thermostats and more are supported.</p><h3>Articles</h3><p>The various articles on ESP ZeroCode are available below:</p><ul><li>Matter based connected devices: <a href="https://blog.espressif.com/announcing-esp-zerocode-301201c24cba?source=collection_home---4------3-----------------------">Announcing ESP ZeroCode</a></li><li>Appliances with Matter and Cloud Connectivity: <a href="https://blog.espressif.com/esp-zerocode-exl-module-powered-by-aws-iot-expresslink-simplifying-matter-compatible-6f90fa89abe6">Announcing ESP ZeroCode ExL Module</a></li><li><a href="https://blog.espressif.com/whats-new-with-esp-zerocode-1199e0c577fc">What’s new with ESP ZeroCode</a></li></ul><h3>Podcast</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXMh81q81EMA%3Fstart%3D232%26feature%3Doembed%26start%3D232&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXMh81q81EMA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXMh81q81EMA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4fbcbfab25d92b8b7cb959394d999f0/href">https://medium.com/media/a4fbcbfab25d92b8b7cb959394d999f0/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52d7f3c6fd72" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/esp-zerocode-52d7f3c6fd72">ESP ZeroCode</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP ZeroCode ExL Module powered by AWS IoT ExpressLink — Simplifying Matter-compatible…]]></title>
            <link>https://medium.com/the-esp-journal/esp-zerocode-exl-module-powered-by-aws-iot-expresslink-simplifying-matter-compatible-6f90fa89abe6?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/6f90fa89abe6</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[matter]]></category>
            <category><![CDATA[espressif]]></category>
            <dc:creator><![CDATA[Amey Inamdar]]></dc:creator>
            <pubDate>Mon, 13 Nov 2023 07:51:08 GMT</pubDate>
            <atom:updated>2023-11-13T08:46:56.960Z</atom:updated>
            <content:encoded><![CDATA[<h3>Announcing ESP ZeroCode ExL Module</h3><p><em>Announcing ESP ZeroCode ExL powered by AWS IoT ExpressLink — Simplifying Matter-compatible Cloud-connected Devices</em></p><p>As a part of our efforts to make the development of Matter protocol-enabled devices easy, Espressif <a href="https://www.espressif.com/en/news/ESP-ZeroCode_Modules">announced</a> ESP ZeroCode modules and ESP ZeroCode Console earlier this year. These ESP ZeroCode modules are well-suited for Matter connectivity for simple devices such as lighting fixtures, switches, sockets, blind controllers, and sensors. You can use ESP ZeroCode Console to configure, evaluate, and order ESP ZeroCode modules.</p><p>In continuation of these efforts, Espressif, in collaboration with Amazon Web Services (AWS), is glad to announce the ESP ZeroCode ExL connectivity module powered by <a href="https://aws.amazon.com/iot-expresslink/">AWS IoT ExpressLink</a>. This module is based on Espressif’s ESP32-C6 system-on-chip (SoC) providing Wi-Fi 6, Bluetooth 5 (LE), and 802.15.4 connectivity. It contains built-in Matter and cloud connectivity software providing a simple <a href="https://docs.aws.amazon.com/iot-expresslink/latest/programmersguide/elpg.html">AT commands-based serial interface</a> to the host. With such a simplified integration, you can build Matter-compliant, secure IoT devices that connect to AWS IoT Core and other AWS services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dXyqknrjK0PJpgNQciCICQ.png" /></figure><h3>Why ESP ZeroCode ExL?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2WVEgU33ZgPejrRPzU0Tkw.png" /></figure><ul><li>When device makers want to build cloud-connected devices, they have to write and maintain a significant amount of software. It also needs a deep understanding of connectivity, security, OTA upgrades, and device management.</li><li>The addition of the Matter protocol adds to this making the development, maintenance, and certification even more complex. The ESP ZeroCode ExL module moves this important yet undifferentiated workload onto a separate module, allowing device makers to easily build the hardware interfacing and business logic onto the host MCU.</li><li>On the other hand, AWS IoT ExpressLink is designed and built with the best security and cloud connectivity practices and the Espressif implementation went through rigorous security and functionality testing.</li></ul><p>The ESP ZeroCode ExL firmware by Espressif extends the AWS IoT ExpressLink with Matter protocol implementation. This significantly reduces the efforts and time required for building and maintaining connected products by device makers.</p><h3>Target Devices</h3><p>The Matter 1.2 specification adds support for new device types including appliances like refrigerators, laundry washers, air purifiers, and air conditioners. Additionally, some of the other device types are already supported such as dimmers, touch switches, and thermostats. Many of these types of devices have a dedicated MCU responsible for building the device logic. Also, cloud connectivity is a major feature for many of these device types especially in the appliance domain. ESP ZeroCode ExL offers simplified Matter and cloud connectivity for these devices and is even well-positioned for retrofitting existing designs to Matter-compliant and cloud-connected ones. It is important to note that ESP ZeroCode ExL can also enable Matter and cloud connectivity to devices beyond these types, supporting devices even with small, resource-constrained host MCUs.</p><h3>Key Features</h3><p>ESP ZeroCode ExL implements AWS IoT ExpressLink specification version 1.2 and Matter protocol specification version 1.2.</p><h4>AWS IoT ExpressLink Features:</h4><ol><li>AWS IoT Core MQTT connectivity</li><li>AWS IoT Core Device Shadow support</li><li>AWS IoT Device Defender metrics</li><li>Self and Host OTA using AWS IoT OTA service</li><li>Pre-provisioned with X.509 certificates supporting <a href="https://docs.aws.amazon.com/iot-expresslink/latest/oemonboardingguide/oemog.html">Onboarding by Claim</a>, Multi-Account Registration, JITP, and JITR methods</li><li>Power management support</li><li>Asynchronous event handling support</li></ol><h4>Matter protocol features</h4><ol><li>Matter over Wi-Fi with BLE-based commissioning support</li><li>Standard device types support as per Matter protocol specification 1.2 and 1.0 with pre-defined device types</li><li>Support for custom clusters</li><li>Support for Matter-specific events</li><li>Matter attributes updates, commands, and event handling support provided to the host</li><li>Matter OTA support for self and host OTA upgrades</li><li>Pre-provisioned with DAC certificates</li></ol><h3>Security</h3><p>ESP ZeroCode ExL modules are security hardened with hardware root of trust based on Secure Boot and Digital Signature Peripheral. All the sensitive data such as device identity and Wi-Fi network credentials are encrypted and secured using hardware security features such as flash encryption, digital signature peripheral, and HMAC peripheral. ESP ZeroCode ExL firmware is tested with the AWS-provided regression test suite. Communication interfaces such as Wi-Fi, BLE, and serial interface are verified against memory corruption attacks. Secure OTA ensures only the trusted firmware gets executed on the module as well as on the host. These security features add significant value and make the job of device makers significantly easier.</p><h3>Ready for Evaluation?</h3><p>Espressif provides an easy evaluation through the <a href="https://zerocode.espressif.com/">ESP ZeroCode Console</a> for the ESP ZeroCode ExL module. You can use any ESP32-C6 development board to quickly try out the functionality completely in the web browser. ESP ZeroCode Console supports a refrigerator, laundry washer, air conditioner, thermostat, and dimmer device types with ESP ZeroCode ExL module. We will be soon expanding on these device types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dgs2Q1ONnaTm6QUVpIe_JQ.png" /></figure><p>If you need more information about ESP ZeroCode ExL modules, please reach out to us at <a href="/service/mailto:zerocode@espressif.com">zerocode@espressif.com</a> and we will get back to you as quickly as we can.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f90fa89abe6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/esp-zerocode-exl-module-powered-by-aws-iot-expresslink-simplifying-matter-compatible-6f90fa89abe6">ESP ZeroCode ExL Module powered by AWS IoT ExpressLink — Simplifying Matter-compatible…</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Bill of Materials]]></title>
            <link>https://medium.com/the-esp-journal/software-bill-of-materials-b1282a58e617?source=rss----d5414d5dee73---4</link>
            <guid isPermaLink="false">https://medium.com/p/b1282a58e617</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[esp-idf]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[Mahavir Jain]]></dc:creator>
            <pubDate>Fri, 03 Nov 2023 09:55:22 GMT</pubDate>
            <atom:updated>2023-11-03T09:55:22.685Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>The “software bill of materials” (SBOM) has emerged as a key building block in software security and <a href="https://en.wikipedia.org/wiki/Software_supply_chain">software supply chain</a> risk management. An SBOM is a comprehensive list of all the software components, dependencies, and metadata associated with an application.</p><p>Espressif believes that this information is a key step towards ensuring the security of the connected devices. And as such, we have now enabled easy to use tools and solutions to track and analyze this information.</p><p>In this blog post, we shall look through the Espressif’s SBOM generator and analysis tool, <a href="https://github.com/espressif/esp-idf-sbom"><strong>ESP-IDF-SBOM</strong></a>.</p><h3>SBOM</h3><p>According to National Telecommunications and Information Administration’s (NTIA) SBOM FAQ, the official definition of SBOM goes as follows:</p><blockquote>A Software Bill of Materials (SBOM) is a complete, formally structured list of components, libraries, and modules that are required to build (i.e., compile and link) a given piece of software and the supply chain relationships between them. These components can be open source or proprietary, free or paid, and widely available or restricted access.</blockquote><p>Key data fields for each component includes:</p><ul><li>Supplier Name</li><li>Component Name</li><li>Version of the Component</li><li>Other Unique Identifiers</li><li>Dependency Relationship</li><li>Author of SBOM Data</li><li>Timestamp</li></ul><p>SBOM data needs to be presented in consistent and digestible formats. Some formats to handle the data representation are SPDX, CycloneDX etc.</p><p>Simple conceptual SBOM tree for wifi_provisioning component from ESP-IDF looks like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*0e3Rufb8-nU-px5RM6htJg.png" /></figure><h3>SPDX</h3><p><a href="https://spdx.github.io/spdx-spec/v2.3/">Software Package Data Exchange</a> (SPDX) is an open standard for communicating software bill of materials (SBOM) information that supports accurate identification of software components, explicit mapping of relationships between components, and the association of security and licensing information with each component.</p><p>The image below outlines what data can be found in an SPDX document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/0*FKOMwJwXJqTbwsRq.png" /><figcaption>Image via <a href="https://spdx.dev/specifications/?ref=fossa.com">SPDX website</a></figcaption></figure><h3>ESP-IDF-SBOM</h3><p><a href="https://github.com/espressif/esp-idf-sbom">ESP-IDF-SBOM</a> is a SBOM generator tool. It generates SPDX format SBOM for ESP-IDF based applications. This tool also allows to check the generated SBOM for known security vulnerabilities against <a href="https://nvd.nist.gov/">National Vulnerabilitiy Database</a> (NVD).</p><h3>SBOM Generator Workflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*gDN-5UHIsn4vxNnwQx2TDg.png" /></figure><p>Brief tool workflow goes like:</p><ul><li>Collect sbom.yml (<a href="https://github.com/espressif/esp-idf-sbom#manifest-file">a manifest file</a>) files from dependant components</li><li>Parse project description file generated by the ESP-IDF build system</li><li>Generate SPDX report</li><li>Scan generated SPDX against the CVE databse to generate final report</li></ul><h3>Getting Started</h3><p>Install the tool and checkout its help:</p><pre>$ pip install esp-idf-sbom<br>$ esp-idf-sbom --help<br><br>usage: esp-idf-sbom [-h] [-q] [-n] [-f] [-v] [-d] [--no-progress] {create,check,manifest} ...<br><br>ESP-IDF SBOM tool<br><br>positional arguments:<br>  {create,check,manifest}<br>                        sub-command help<br>    create              Create SBOM file based on the ESP-IDF project_description.json file.<br>    check               Check components/submodules in the ESP-IDF SBOM file for possible<br>                        vulnerabilities reported in the National Vulnerability Database.<br>    manifest            Commands operating atop of manifest files.<br><br>options:<br>  -h, --help            show this help message and exit<br>  -q, --quiet           By default auxiliary messages like errors, warnings, debug messages<br>                        or progress are reported to the standard error stream. With this<br>                        option set, all such messages are suppressed.<br>  -n, --no-colors       Do not emit color codes. By default color codes are used when stdout<br>                        or stderr is connected to a terminal.<br>  -f, --force-colors    Emit color codes even when stdout or stderr is not connected to a<br>                        terminal.<br>  -v, --verbose         Be verbose. Messages are printed to standard error output.<br>  -d, --debug           Print debug information. Messages are printed to standard error<br>                        output.<br>  --no-progress         Disable progress bar.</pre><p>Generate the SBOM file:</p><pre>$ cd esp-idf/examples/provisioning/wifi_prov_mgr<br>$ idf.py build<br>$ esp-idf-sbom create &lt;project description file&gt; --output-file prj.spdx</pre><p>The project description file is a path to the project_description.json file, which is by default created by the ESP-IDF build system in the project&#39;s build directory.</p><p>Check SBOM against the security vulnerabilities:</p><pre>$ esp-idf-sbom check prj.spdx<br><br>                                        Report summary                                         <br>┌───────────────────────────────────┬─────────────────────────────────────────────────────────┐<br>│ Date:                             │ 2023-10-10T08:21:39Z                                    │<br>│ Project name:                     │ project-wifi_prov_mgr                                   │<br>│ Project version:                  │ v5.2-dev-3250-g7d8f015a4c                               │<br>│ Vulnerability database:           │ NATIONAL VULNERABILITY DATABASE (https://nvd.nist.gov)  │<br>│ Generated by tool:                │ esp-idf-sbom (0.8.0)                                    │<br>│ Generated with command:           │ esp-idf-sbom check prj.spdx                             │<br>│ Number of scanned packages:       │ 57                                                      │<br>├───────────────────────────────────┼─────────────────────────────────────────────────────────┤<br>│ CRITICAL CVEs found:              │                                                         │<br>│ Packages affect by CRITICAL CVEs: │                                                         │<br>│ Number of CRITICAL CVEs:          │ 0                                                       │<br>├───────────────────────────────────┼─────────────────────────────────────────────────────────┤<br>│ HIGH CVEs found:                  │                                                         │<br>│ Packages affect by HIGH CVEs:     │                                                         │<br>│ Number of HIGH CVEs:              │ 0                                                       │<br>├───────────────────────────────────┼─────────────────────────────────────────────────────────┤<br>│ MEDIUM CVEs found:                │                                                         │<br>│ Packages affect by MEDIUM CVEs:   │                                                         │<br>│ Number of MEDIUM CVEs:            │ 0                                                       │<br>├───────────────────────────────────┼─────────────────────────────────────────────────────────┤<br>│ LOW CVEs found:                   │                                                         │<br>│ Packages affect by LOW CVEs:      │                                                         │<br>│ Number of LOW CVEs:               │ 0                                                       │<br>├───────────────────────────────────┼─────────────────────────────────────────────────────────┤<br>│ UNKNOWN CVEs found:               │                                                         │<br>│ Packages affect by UNKNOWN CVEs:  │                                                         │<br>│ Number of UNKNOWN CVEs:           │ 0                                                       │<br>├───────────────────────────────────┼─────────────────────────────────────────────────────────┤<br>│ All CVEs found:                   │                                                         │<br>│ All packages affect by CVEs:      │                                                         │<br>│ Total number of CVEs:             │ 0                                                       │<br>└───────────────────────────────────┴─────────────────────────────────────────────────────────┘<br><br><br>Packages with No Identified Vulnerabilities<br>                        <br>┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓<br>┃        Package        ┃          Version          ┃                   CPE                   ┃<br>┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩<br>│ project-wifi_prov_mgr │ v5.2-dev-3250-g7d8f015a4c │ cpe:2.3:a:espressif:esp-idf:5.2-dev-325 │<br>│                       │                           │       0-g7d8f015a4c:*:*:*:*:*:*:*       │<br>├───────────────────────┼───────────────────────────┼─────────────────────────────────────────┤<br>│         lwip          │           2.1.3           │ cpe:2.3:a:lwip_project:lwip:2.1.3:*:*:* │<br>│                       │                           │                :*:*:*:*                 │<br>├───────────────────────┼───────────────────────────┼─────────────────────────────────────────┤<br>│         cjson         │          1.7.16           │ cpe:2.3:a:cjson_project:cjson:1.7.16:*: │<br>│                       │                           │               *:*:*:*:*:*               │<br>├───────────────────────┼───────────────────────────┼─────────────────────────────────────────┤<br>│      protobuf-c       │           1.4.1           │ cpe:2.3:a:protobuf-c_project:protobuf-c │<br>│                       │                           │          :1.4.1:*:*:*:*:*:*:*           │<br>├───────────────────────┼───────────────────────────┼─────────────────────────────────────────┤<br>│       mbed_tls        │           3.4.1           │ cpe:2.3:a:arm:mbed_tls:3.4.1:*:*:*:*:*: │<br>│                       │                           │                   *:*                   │<br>├───────────────────────┼───────────────────────────┼─────────────────────────────────────────┤<br>│       freertos        │          10.4.3           │ cpe:2.3:o:amazon:freertos:10.4.3:*:*:*: │<br>│                       │                           │                 *:*:*:*                 │<br>└───────────────────────┴───────────────────────────┴─────────────────────────────────────────┘<br><br>...snip</pre><p>Some highlights from the SBOM vulnerability check:</p><ul><li>wifi_prov_mgr application from ESP-IDF v5.2-dev was used for the exercise</li><li>It is possible to scan the components which are not linked into final executable by adding --check-all-packages in the check command shown above</li><li>It is also possible to generate the SBOM report for the ESP-IDF bootloader. Bootloader specific build description file can be found in the build/bootloader directory inside the project</li><li>Some key components like RTOS, Networking Stack, TLS Stack etc. having <a href="https://nvd.nist.gov/products/cpe/search">Common Platform Enumeration</a> entries have been highlighted in the above output</li><li>Tool also displays information about other component and libraries (not shown in the above log) which are part of the build process</li></ul><h3>Report Format</h3><p>This tool supports multiple formats for the generated output report like JSON, CSV etc. Please refer to the tool help for more details.</p><h3>Compatibility</h3><p>SPDX being a standard format for SBOM, also offers compatibility with the external tools. SBOM files generated from esp-idf-sbom can also be scanned using tools like <a href="https://github.com/intel/cve-bin-tool">cve-bin-tool</a>. This offers an added advantage if you already have any external tools integrated in your system and want to take advantage of its specific features (e.g., more extended scan against different CVE databases).</p><h3>Summary</h3><p>To summarize, some key advantages of SBOM are:</p><ul><li>Forms inventory of the components building the software artifacts</li><li>Lists software licenses, component versions and helps to keep them up-to-date</li><li>Helps to perform security vulnerability analysis</li><li>Becoming a pre-requisite in many security related certifications</li></ul><p><a href="https://github.com/espressif/esp-idf-sbom">ESP-IDF-SBOM</a> tool is useful to generate SBOM for ESP-IDF based projects. The tool can also further help to scan and setup process for continuous security vulnerability scanning of the project.</p><p>We are actively working on to enable wider SBOM coverage across our software solutions and looking for feedback on the <strong>ESP-IDF-SBOM</strong> tool.</p><p>Please do try and share your experience!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1282a58e617" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-esp-journal/software-bill-of-materials-b1282a58e617">Software Bill of Materials</a> was originally published in <a href="https://medium.com/the-esp-journal">The ESP Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>