---
title: "FAQ: identity, certificates, twins, updates, CRA | yngest"
description: "Short answers on IoT device identity, certificate renewal, sleeping devices, peak load, firmware updates, ESP32 security and the Cyber Resilience Act."
language: en
canonical_url: https://yngest.com/faq/
source: https://yngest.com/faq.md
site: "yngest"
---

[Skip to content](#main)

## Device identity and keys

### Why should every IoT device have its own identity?

Every IoT device needs its own identity because a shared credential is a single point of failure for the whole fleet. A key or password copied from one unencrypted flash with esptool works on every device, and the only fix is a new secret everywhere. With per-device identity, each device holds its own key pair and an X.509 certificate with its device ID in the subject, and authenticates with mutual TLS. A compromised device exposes exactly one identity, which the server revokes alone.

[Read the article](https://yngest.com/blog/esp32-shared-secret-per-device-identity/)

### Where should the private key of an ESP32 live?

The private key of an ESP32 must never exist outside the device. Either the device generates an ECDSA P-256 key pair at first boot, keeps it in encrypted flash and sends only a certificate signing request with the public key, or the key is sealed into the Digital Signature peripheral. On ESP32-S2, S3, C3 and C6, that peripheral holds the RSA key encrypted under an HMAC key in a read-protected eFuse and signs the TLS handshake in hardware. The firmware never sees the plaintext key.

[Read the article](https://yngest.com/blog/esp32-shared-secret-per-device-identity/)

### How does device number 1,000 get its identity?

Device number 1,000 gets its identity through the same provisioning method as device number 1, and that method is fixed before the first device ships. Three methods scale: enrolment at first boot, where the device generates its key and submits a CSR authenticated by a one-time claim code; a provisioning station on the production line that seals the identity and registers the serial number; or modules pre-provisioned by Espressif. In all three the private key stays in the device. They differ in whom you trust at the moment the certificate is issued.

[Read the article](https://yngest.com/blog/esp32-shared-secret-per-device-identity/)

### Can I use Espressif pre-provisioned modules without AWS?

Yes. Espressif’s pre-provisioned ESP32-C3, S2 and S3 modules carry a standard X.509 device certificate in the esp\_secure\_cert partition and a private key protected by the Digital Signature peripheral. Nothing in them is specific to AWS: any MQTT broker or HTTPS endpoint with TLS client authentication accepts them. The backend either trusts the issuing CA chain and registers each device on its first connection, or allow-lists the certificate fingerprints from the order. The firmware reads certificate and key context with esp\_secure\_cert\_mgr and passes both to esp-mqtt.

### How do I revoke one lost or stolen IoT device?

Revoking one device takes four steps in one operation: add its certificate serial and device ID to a deny list, refuse that identity on every gateway at connect time, force-disconnect its open MQTT session, and block it in the renewal service. Revocation is checked when a connection starts, so the forced disconnect is required. For a fleet that only connects to your own gateways, a deny list checked on every connect replaces CRL and OCSP. All of this requires one identity per device.

## Certificates, renewal and time

### What happens when an IoT device certificate expires?

When a device certificate expires, the TLS handshake fails: the server compares notAfter with its clock, rejects the certificate, and the device stays offline until it holds a new one. There is no grace period in TLS. Because notAfter is fixed at issuance, devices provisioned in the same week expire in the same week and drop off together. The firmware must renew by itself, with a fresh CSR, well before notAfter. Without that path, every device needs physical access.

[Read the article](https://yngest.com/blog/iot-device-certificate-expiry/)

### How long should an IoT device certificate be valid?

An IoT device’s operational certificate should be valid for one year, renewed automatically from two thirds of its lifetime and no later than four weeks before notAfter. Pair it with a long-lived bootstrap identity that is authorised for one thing only, getting a new certificate, so a device that missed its window recovers by itself. Ten-year certificates remove renewal and also remove containment: a leaked key stays valid for a decade, and only a deny list on every gateway stops it.

[Read the article](https://yngest.com/blog/iot-device-certificate-expiry/)

### Can an offline device renew its certificate?

No, renewal is an online exchange with the certificate service, so the design has to tolerate long offline periods. The renewal window opens months before notAfter, and the device attempts renewal on every wake inside it. A device that comes back after its certificate expired authenticates with its bootstrap identity, which the server accepts on exactly one endpoint, certificate issuance, and receives a new operational certificate. No technician touches the device.

[Read the article](https://yngest.com/blog/iot-device-certificate-expiry/)

### Why does my ESP32 fail TLS after a power cut?

An ESP32 fails TLS after a power cut when certificate date checks are enabled, because a power-on reset sets its clock back to 1 January 1970 and every server certificate’s notBefore then lies in the future. The ESP32 has no battery-backed clock, and Mbed TLS rejects the certificate with MBEDTLS\_X509\_BADCERT\_FUTURE. ESP-IDF ships with the check off (CONFIG\_MBEDTLS\_HAVE\_TIME\_DATE), which accepts expired certificates forever. Enable it, and sync time with SNTP before the first TLS connection.

[Read the article](https://yngest.com/blog/esp32-time-before-tls/)

### What do 47-day certificates mean for IoT devices?

Under CA/Browser Forum ballot SC-081, public TLS certificates are limited to 200 days since 15 March 2026, 100 days from 15 March 2027 and 47 days from 15 March 2029. A server on a public certificate then rotates about eight times a year. A device that pins the server’s leaf certificate or its key breaks at every rotation. Devices should verify the device endpoint against a private root CA that you control, bundled in the firmware, with a second root pre-installed for root rotation.

[Read the article](https://yngest.com/blog/iot-server-certificate-47-days/)

### Does my IoT product need its own certificate authority?

Yes, an IoT product needs a private certificate authority for its device certificates. Public CAs are bound to the shortened TLS lifetimes and are dropping client-authentication certificates from their public hierarchies under the browser root programs. The private CA can be a service CA with one intermediate per project, a dedicated project CA, or a CA owned by the customer. In every case the root key stays offline, the issuing key lives in a hardware security module, and every signing operation is logged.

[Read the article](https://yngest.com/blog/iot-server-certificate-47-days/)

## Sleeping devices and twins

### How does an app talk to an ESP32 that sleeps most of the time?

An app talks to a sleeping ESP32 through a device twin: the server-side record of the device’s state, split into desired state written by the app and reported state written by the device, each with a version number. The app writes to the twin, never to the device. On wake, the device fetches the desired state, applies the difference, reports the result and goes back to sleep. A setting written during a week of sleep arrives on the next wake.

[Read the article](https://yngest.com/blog/esp32-sleeping-device-twin/)

### What is the difference between desired and reported state?

Desired state is the configuration the backend wants a device to run, reported state is what the device confirms it has applied. The difference between the two is the pending change. A change counts as delivered only when the reported value and version match the desired ones, which proves that the device runs the setting, while a sent command only proves transmission. A device that rejects a value reports the error, so no change stays pending without a reason.

[Read the article](https://yngest.com/blog/esp32-sleeping-device-twin/)

## Peak load and the database

### Why can IoT devices take a website down?

IoT devices take a website down when the writes they cause exhaust the database connections the website also needs. Postgres refuses clients beyond max\_connections with error 53300, and the Supabase pooler in session mode admits only as many clients as its pool size, 15 by default up to the Medium compute. The usual causes are app pools that add up to more than the limit, serverless functions on session mode, idle sessions, devices with database credentials, and the burst after an outage.

[Read the article](https://yngest.com/blog/iot-devices-took-website-down/)

### Should IoT devices write directly into my database?

No, IoT devices should never write directly into the database. Direct writes give every device a database credential, a connection slot and the power to block the app with its own traffic. The production pattern is an ingest tier: devices publish over MQTT or HTTPS to an endpoint that authenticates the device certificate, a durable buffer absorbs the burst, and one forwarder inserts batches over one or two pooled connections. Database load then scales with data volume instead of device count, and a database outage loses no message.

[Read the article](https://yngest.com/blog/iot-devices-took-website-down/)

### What is a reconnect storm, and how do I prevent it?

A reconnect storm is the synchronised flood of TLS handshakes after an outage, when every device retries on the same fixed interval. A full handshake costs the server far more than a normal message, so the storm keeps the recovering service down. Prevent it with exponential backoff with full jitter: wait a random time between zero and min(cap, base × 2^attempt), for example with a base of 1 second and a cap of 5 minutes. Give periodic reports a random offset too, so the fleet never aligns on the full hour.

[Read the article](https://yngest.com/blog/iot-reconnect-storm-backoff-jitter/)

### How do I handle firmware 1.0 and 1.3 sending different data?

Wrap every message in an envelope with device ID, firmware version, schema version and timestamp, and decode the body with the decoder registered for its schema version. Decoders are added, never changed. During a staged rollout firmware 1.0 and 1.3 report side by side for weeks, and a device that slept through the rollout sends the old format months later. Changing the meaning of a field without a new schema version corrupts the data silently, while the envelope keeps every message decodable for the life of the fleet.

## Firmware updates and production security

### Why must the update channel be in the first firmware?

The update channel must be in the first firmware because it is the only code that can install new code. ESP-IDF provides it: two OTA app partitions, an otadata partition and app rollback, which boots the previous image again unless the new one confirms itself with esp\_ota\_mark\_app\_valid\_cancel\_rollback() after a health check. A device shipped without this path needs a cable for every bug fix, certificate change and security update, for its entire life in the field.

[Read the article](https://yngest.com/blog/esp32-signed-ota-first-firmware/)

### Is HTTPS enough to protect an ESP32 firmware update?

No. HTTPS authenticates the update server and protects the transfer, but it proves nothing about who built the image. A compromised server, a leaked CI token or an insider delivers a malicious image over perfectly valid TLS. The device must verify a signature on the image itself. With Secure Boot v2 and signed app verification, the OTA step rejects any image not signed with a key whose digest is burned into the eFuses, and the bootloader checks the signature again on every boot.

[Read the article](https://yngest.com/blog/esp32-signed-ota-first-firmware/)

### In which order do I enable flash encryption and Secure Boot v2 on an ESP32?

Enable flash encryption first and Secure Boot v2 second when you provision from a host with espefuse and espsecure; that is Espressif’s documented workflow. The Secure Boot step write-protects the RD\_DIS eFuse so its key digest stays readable, and after that the flash encryption key can no longer be read-protected. Both burn one-time eFuses, so production devices use release mode, disabled JTAG and a restricted download mode, and the signing key stays in an HSM.

## Regulation: RED and the CRA

### Does the RED cybersecurity regulation apply to my ESP32 product?

Yes, a Wi-Fi or Bluetooth ESP32 product that can communicate over the internet and is placed on the EU market from 1 August 2025 falls under Delegated Regulation (EU) 2022/30. It activates RED Article 3(3)(d), (e) and (f): protect the network, protect personal data and privacy, and protect against fraud, where (f) applies only to products that handle money or monetary value. The harmonised standards are EN 18031-1, -2 and -3, cited in the Official Journal with restrictions.

[Read the article](https://yngest.com/blog/esp32-red-cra-records/)

### When does the Cyber Resilience Act apply to connected products?

The Cyber Resilience Act, Regulation (EU) 2024/2847, applies in two steps. Since 11 September 2026, manufacturers must report actively exploited vulnerabilities and severe incidents, also for products already on the market. From 11 December 2027, every product with digital elements placed on the EU market must meet the essential requirements of Annex I, pass conformity assessment and carry the CE marking for cybersecurity, which then replaces the RED cybersecurity rules. Fines reach EUR 15 million or 2.5 percent of worldwide annual turnover.

[Read the article](https://yngest.com/blog/esp32-red-cra-records/)

### How fast must a vulnerability be reported under the CRA?

Under Article 14 of the CRA, an actively exploited vulnerability in your product requires an early warning within 24 hours of becoming aware of it, a vulnerability notification within 72 hours and a final report no later than 14 days after a corrective measure is available. Reports go through ENISA’s Single Reporting Platform to the coordinating CSIRT. Meeting 24 hours requires a live inventory that maps every device to its firmware version and components.

[Read the article](https://yngest.com/blog/esp32-red-cra-records/)

### Which records should I keep for every IoT device?

Keep, for every device from the first one: device ID, product, hardware revision and serial number, the running firmware version, certificate serial and validity, last-seen time, the full update history, and security events such as failed authentications and revocations. For every firmware release, generate a machine-readable software bill of materials in SPDX or CycloneDX, as CRA Annex I requires. The CRA asks to keep the technical documentation for at least ten years, and device records cannot be reconstructed after the fact.

[Read the article](https://yngest.com/blog/esp32-red-cra-records/)

### Is my IoT backend part of my product under the CRA?

Yes, if you designed the backend, or had it designed for the product, and the product cannot perform one of its functions without it. Article 3(2) of the CRA calls this remote data processing, and it falls under the product’s essential requirements and conformity assessment. Who operates it does not matter. A licensed SaaS that you did not design is not remote data processing; the Commission guidance published on 17 November 2026 treats it like a component, with due diligence similar to Article 13(5).

## Building with AI agents

### Can a coding agent build my IoT backend?

Yes, a coding agent builds a working IoT backend prototype in one session: an MQTT broker with TLS, a small CA, a renewal job, an OTA server and a database writer. It does not deliver the operation: custody of the CA keys, broker patches, renewal monitoring and the CRA’s 24-hour reporting clock, for a support period the CRA sets at five years unless the product is used for less. The code is finished when the session ends, and the obligations start when the first device ships.

### Which parts of an IoT backend should an agent not improvise?

Six parts must not be improvised: CA key custody, certificate renewal, revocation, firmware signing, the ingest path under peak load and the security event log. Each one passes every test when the product ships and fails later, on a date such as notAfter, under a load such as the first reconnect storm, or in an incident such as a leaked signing key, and then fails for the whole fleet at once. Each needs a named owner for the life of the devices, or a maintained service that runs it.

### How do I give my coding agent rules for device firmware?

Put device rules in the file the agent loads before it writes code: AGENTS.md or CLAUDE.md in the firmware repository, or the project instructions of the agent client. Write each rule as a testable imperative, for example generate the device key on the chip, sync time over SNTP before TLS, sign every OTA image. yngest.com/llms.txt starts with a ten-rule production checklist in this form, and the markdown version of every article carries its rule directly below the summary.

[Read the article](https://yngest.com/blog/iot-production-checklist-ai-agents/)

## Clouds and alternatives

### When will Azure IoT Central be retired?

Azure IoT Central will be retired on 20 September 2029, as Microsoft announced in September 2026. New applications cannot be created since 23 September 2026, and existing applications run until the retirement date. Microsoft’s migration path is Azure IoT Hub with the Device Provisioning Service, with Microsoft Fabric for analytics. IoT Hub has no device templates or dashboards, so a migration rebuilds the application layer, not only the device connection.

### When is Azure IoT Hub the right choice?

Azure IoT Hub is the right choice when the team and the data already live in Azure. It provides per-device identity with X.509 certificates or symmetric keys, the Device Provisioning Service, device twins on the Standard tier, and, since November 2026, operational certificates issued, renewed and revoked through Azure Device Registry. For ESP32 fleets, firmware updates are not covered, since Device Update for IoT Hub supports Linux devices only, and data for Postgres or Supabase outside Azure needs a forwarder your team operates.

## About yngest

### What is yngest?

yngest is the production layer between ESP32 devices and software built by AI agents. It gives every device its own certificate-based identity, keeps a twin for devices that sleep, buffers ingest in front of your database and delivers signed firmware updates. Coding agents configure it through MCP tools, and device data is written into your own database. Your agent builds the prototype, yngest brings the production details.

### Where does yngest put my device data?

yngest puts your device data into your own database, for example Supabase or Postgres. It holds the data only briefly on the way and stores no telemetry long term. It keeps only what running the devices requires, such as device identities and certificate state, twins, update history and the security log.

### Does yngest make my product CRA compliant?

No, and no tool can: CRA compliance is the manufacturer’s obligation and covers the risk assessment, the conformity assessment route, the technical documentation and vulnerability handling. yngest supplies the mechanisms and the evidence for the device-to-cloud part: a unique identity per device, signed updates traceable per firmware version, a live inventory of devices and versions for the 24-hour reporting duty, and a security log recorded from the first device.

### How can I work with yngest?

Sign up in the yngest console, then connect your coding agent to the yngest MCP server. Without hardware, the console sets up a demo project with a simulated ESP32 board that wakes, sends readings, follows its device twin and has a BOOT button, so you and your agent can build the whole path to your database first. Teams that take an ESP32 product from prototype to series production can also join as a design partner: write to Micha through the contact form on the homepage.

## Your question is not here?

Write to me, and the answer may end up on this page. [Contact](https://yngest.com/#contact)
