Security by Design for Embedded Systems: What to Decide Before Launch

Published
20 minutes
Table of contents:

The regulatory timeline of the EU Cyber Resilience Act (CRA) is advancing: in June 2026, notified bodies began accepting products for conformity assessment. From September 2026, manufacturers must report actively exploited vulnerabilities and serious security incidents. By December 2027, your product should be secure by design and fully compliant with the CRA requirements, with a complete technical documentation file to prove it.

For IoT manufacturers, it’s time to review existing products, establish required SDLC processes, and ensure cybersecurity is built in at every stage of the product lifecycle. In this article, our embedded systems and security experts explain security-by-design across the entire development process, so you know what to consider and when.

What is security by design?

Security by design (or secure by design) is a set of principles that ensure any product is created with security in mind from the start. The engineering team considers possible security risks for a given solution and includes ways to mitigate them in the overall system architecture. This way, you won’t have to make trade-offs or invent workarounds when those risks emerge.

The table below demonstrates what implementing the same security features looks like when designed into the system from day one versus when added later, and how a late fix disrupts the development process.

Comparison table: Security by design vs. security added after launch

AreaDesigned from day oneAdded after launchWhat a late fix requires
CommunicationStandard encrypted channels (TLS/mTLS) with mutual device-to-cloud identity checks built directly into the baseline network stack.Bolted-on encryption layers or ad-hoc VPN tunnels that degrade device performance, latency, and battery life.Heavy firmware refactoring, cloud backend re-architecture, and potential microcontroller upgrades to handle cryptographic processing overhead.
ProvisioningUnique cryptographic keys and certificates injected automatically on the factory line during chip programming.Shared global master keys across batches, or manual onboarding procedures prone to human error and key leakage.Retooling factory test fixtures, costly line downtime, and complex fleet-wide credential revocation procedures.
Default credentialsUnique per-device passwords (e.g., printed on labels/QR codes) or passwordless token pairing out of the box.Universal factory logins (e.g., admin/admin) that expose customer fleets to mass automated botnet takeovers.Forcing disruptive first-boot password resets, surging customer support costs, and scrambling to meet regulatory bans.
Firmware updatesCryptographically signed Over-The-Air (OTA) updates with automatic rollback protection if an installation fails.Unauthenticated or cleartext updates that can be spoofed, intercepted, or corrupted during transmission.Massive bricking liability across the installed base, emergency field technician visits, or full product recalls if the bootloader cannot be patched remotely.
Secure bootHardware root of trust (RoT) built into silicon, verifying firmware integrity before execution so untrusted code never runs.Firmware-level integrity checks that can easily be bypassed or stripped once an attacker has physical or memory access.A complete hardware redesign. True hardware-enforced secure boot cannot be retrofitted via software; it requires swapping microcontrollers and spinning new PCBs.
Debug and programming portsHardware debug interfaces (JTAG, SWD, UART) permanently locked or cryptographically gated before units leave the factory.Live, unprotected physical access points left on the board, allowing competitors or attackers to dump firmware and extract intellectual property.Physical enclosure redesign, PCB trace revamps, or manual rework on assembled inventory.
Encryption at restOn-chip hardware cryptographic engines automatically protecting proprietary code, IP, and user data stored in flash memory.Plaintext storage or basic software obfuscation, leaving proprietary algorithms and credentials exposed to simple flash-chip extraction.Slower system performance, memory starvation from software-based encryption, or scrap-and-replace costs for silicon lacking hardware crypto blocks.
Operational dataMinimal telemetry, privacy-by-design, and tamper-resistant local logging strictly separated from sensitive credentials.Unfiltered system logs capturing sensitive user activity, tokens, or plaintext secrets, pushed insecurely over the wire.Urgent data-protection remediation, refactored telemetry pipelines, and substantial legal exposure under privacy frameworks like GDPR.

What makes an embedded system secure by design?

Secure-by-design embedded systems must be built with security in mind at every stage of development, from product definition through hardware selection and architecture design to factory production and technical support after launch. 

In embedded systems development, the software and hardware parts of the product are tightly interconnected. So many embedded security decisions, like boot chain, update mechanism, or support plan, get locked in with the selected MCU and board layout, and when production starts, they become really hard and expensive to change. 

In the table below, we provide a concise outline of the key decisions that must be made in the course of development and how they impact the next steps. Further in this article, we discuss each stage and decision in more detail.

Table: When each security decision locks in

StageDecisionWhy it mattersWhat it takes to change after launch
1. Product definitionSecurity level and target marketsSets the budget for every downstream decision; defines whether an external test body is neededRedo risk assessment, design, and tests; the launch slips
Threat modeling and security risk assessmentIdentifies potential attack scenarios, exposed assets, trust boundaries, and security weaknesses; drives security requirements and mitigation measuresRework of architecture, hardware and software design, security controls, and verification tests
Security support period/end of lifeCRA mandates at least five years; the end date must be defined before release and shown to the buyerCannot be shortened once announced
2. Hardware selectionStorage for secret keys and certificatesEvery other security feature builds on thisNew board; units already sold remain vulnerable
Big enough memory budgetDevices need several updates a year; a failed update without a backup breaks or bricks the deviceNew board, dropped features, or early end of support
Secure bootEnsures a device only executes software that is verified and trusted by the manufacturerHardware redesign; if the MCU has dedicated memory slots — bootloader refactoring and building a Public Key Infrastructure (PKI)
3. Board and enclosure freezePhysical access and tamper detectionKeys copied from one unit open all unitsBoard or enclosure redesign
4. Software architecture freezeIsolation of critical softwareA bug in the app or WiFi code cannot reach the security keysLarge software rewrite
Secure communication and data encryption at restData and commands cannot be read or fakedSoftware update if the chip has headroom; otherwise device replacement
Security event reportingAttacks are seen by the company, not first by customers or the press; CRA requires itSoftware update, if memory and data volume were planned
5. Factory productionUnique device identityOne shared key leaked exposes the whole fleetRe-register every device, often by a technician
Firmware signing keysThey decide who can install software on every device ever builtImpossible: a lost key ends updates, a leaked key lets anyone install software
Safe updater and locked debug portsThe updater is the only way to fix devices after saleManual update of each unit or recall
6. Market launchVulnerability handling and SBOM

Documenting every system component is mandated by CRA and FDA; makes it easier to catch emerging vulnerabilities.

Ensures repeatable incident response: CRA requires reporting within 24 h / 72 h / 14 days.

CRA fines up to €15M or 2.5% of turnover;

Reverse-engineer the system, set up post-market continuous monitoring

Which security aspects must be considered during product definition?

During the product definition stage, the team must determine the solution’s target markets and necessary security level. With these points clarified, you will understand which standards and security regulations you have to comply with and what specific requirements to satisfy. These requirements will dictate all downstream hardware needs and software design. 

How does defining product security level and target markets impact the design?

Product’s security level and target markets define the foundational technical budget for every downstream engineering decision and dictate the mandatory regulatory standards the system must satisfy:

  • Which legal mandates govern the device — the Cyber Resilience Act (CRA) or EN 18031 radio conformity in the EU, the PSTI Act in the UK, or FDA regulations. Product classification under the CRA determines whether the manufacturer may self-assess conformity or must engage and budget for a third-party external test body.
  • The required security baseline dictates whether the microcontroller must provide dedicated hardware-isolated key storage, a hardware root of trust, and cryptographic hardware acceleration to avoid CPU, memory, and battery drain.
  • The environment and threat level define physical hardening measures, including tamper-detection switches/sensors, reserved footprints for external secure elements, and physical lockdown of debug/programming interfaces.

If the security level or regulatory scope is altered after hardware and software freezes, the manufacturer is forced to redo risk assessments, system design, and verification testing, leading to severe launch slips.

What should a threat model for a device cover?

A threat model and security risk assessment identify vulnerabilities early to drive engineering mitigations:   

  • Critical components including cryptographic keys, user data, and device control mechanisms.   
  • How someone might attack the device and what they stand to gain from compromising it.   
  • Every physical and logical connection an attacker could target, including physical debug ports, radio links, cables, cloud APIs, and firmware update channels.   
  • A clear map of how data moves across boundaries between trusted and untrusted parts of the architecture to pinpoint security weaknesses.   
  • Turning every identified threat scenario into concrete mitigations and testable requirements (e.g., verifying that firmware updates are accepted only if cryptographically signed).

To avoid post-launch architectural reworks, redesigns, and repeated verification testing, the threat model should remain fairly detailed, strictly product-specific, and continuously reviewed and updated across the device's entire lifecycle.

How do we convert threats into security requirements?

To convert threats into security requirements, think of them as possible attack scenarios and plan how you would address each of them. Then, analyze and prioritize the mitigation measures you came up with and compose them into a concrete, testable engineering specification applicable to your system.

Steps to turn threat model into requirements: Step1: Decompose the system: data flows, trust boundaries, entry points and critical assets; Step 2: Identify possible threats: vulnerabilities, attack scenarios; Step 3: Suggest mitigation measures: risk prioritization, technical controls, security requirements; Step 4: Assess and validate: testing, architecture changes
  1. Define what must be protected and chart data flows showing where information crosses from untrusted to trusted domains.
  2. You will notice potential attack paths, adversary profiles, and system weaknesses across those trust boundaries.
  3. Each significant threat is rewritten as an explicit requirement with measurable pass/fail criteria.
  4. Include mandatory target market rules you haven’t covered yet, like banning default credentials.
Click to download an example of threat modeling

How do we decide how long to support a device after launch?

Deciding on the security support duration requires balancing regulatory baselines, hardware capacity, and long-term software maintainability. Target markets set legal baselines; for example, the EU Cyber Resilience Act (CRA) mandates at least five years. Memory capacity must take into account software backups, security tooling, event logging, and software footprint growth over the entire intended lifespan. Look at your Software Bill of Materials (SBOM): every dependency on this list must remain patchable and maintainable for the entire duration of the lifecycle. The exact end-of-support date must be determined prior to release and explicitly presented to buyers at the time of purchase.

What impacts device support period: Target market baselines; Vendor’s policy for hardware support; Memory capacity to store future updates; Third-party component support period

What should be decided at the hardware selection stage? 

Before you freeze the board and enclosure, you must select a chip with dedicated root-of-trust key storage, hardware cryptographic acceleration (if needed), and memory room. Finalize all physical layout protections, including unreachable and lockable service connectors, tamper detection mechanisms, and reserved footprints for secondary security chips.

Why do secret keys and certificates need dedicated storage?

Dedicated secure storage acts as the system’s hardware root of trust (HRoT). Every security feature across the product lifecycle relies on this storage for the secure-boot public key, device private key, and certificates. Since standard memory like SRAM, EEPROM, or general flash is inherently vulnerable to physical and software attacks, these trust components have to be isolated from other application code.

Here’s how it works. Secure storage has dedicated components — eFuses, secure enclaves, or trusted platform modules (TPMs), which bind the keys or certificates to specific hardware. Firmware’s public key gets burned into it during factory production, and then secure storage uses it to cryptographically verify whether the installed firmware is genuine and trusted by the manufacturer. This is a key security feature of a secure-by-design embedded system.

Do we need a secure element?

You always need a hardware root of trust, but whether you need a standalone Secure Element depends on your security needs and the silicon capabilities of your main processor. If you haven’t considered any MCU options just yet, our guide on choosing the right microcontroller can be a good starting point.

You need a dedicated Secure Element if the chosen microcontroller cannot isolate root-of-trust credentials from general software execution, cryptographic operations burden the main processor, or you are unsure whether the main microcontroller will suffice. Certification requirements, like Trusted Platform Module version 2.0 (TPM 2.0) support, will also mandate a Secure Element.

Comparison table: Root of trust options by product risk level

Product typeRoot of trustRelative BOM costRisk if too low
Consumer sensorThe main chip's own protection: unchangeable start-up code, fused key, protected key area. Optionally, a basic security chipLowKeys copied from one unit, devices taken over into a botnet, product not allowed on the EU or UK market
Industrial controllerA security chip or TPM, plus separation of critical software inside the main chip. Tamper detection for exposed sitesMediumOne device becomes the way into a plant network. Customer security audits fail
Medical deviceA certified security chip or a chip with a built-in security processor, tamper detection, signed updatesHigh: certified parts plus external testingPatient harm and recall

What security features should memory be budgeted for?

In a secure-by-design embedded system, memory budgeting must account for attack surface reduction, hardware isolation, cryptographic operations, and safe firmware updates.

  • Chain of trust: apart from dedicated key storage, you need a separate, read-only memory for boot-chain validation, which ensures the device only executes trusted, unmodified software during startup. It is physically etched during manufacturing and cannot be altered by software or attackers.
  • Anti-rollback mechanism and safe updates: keep a redundant space to install new firmware in parallel with the current version, then restart the system on the new version, and lock the door behind this update once it’s finished. This prevents update failure in case the download breaks halfway through and hinders rollback to the old, potentially vulnerable version. 
  • Data encryption at rest: reserve a memory block on flash memory, a hard drive, or inside a dedicated security chip protected by encryption engines to store inactive data like telemetry and credentials. 
  • Logging: make sure you’ll have space for secure system logs so they don’t overflow active operating memory or expose sensitive debug traces.

What does secure boot require from hardware?

The baseline requirement is that hardware must ensure that only software verified and trusted by the manufacturer is executed. This means:

  • The chip can validate firmware security and prove it is genuine
  • The chip has dedicated memory slots or one-time programmable memory (OTP) to permanently store and lock the public security key
  • Physical isolation of RoT credentials and critical boot validation logic
  • Memory storage for an incremental firmware version to prevent rollback to an older version.

How does hardware ensure physical access and tamper detection?

Hardware prevents unauthorized physical access and detects tampering primarily through deliberate board layout and physical port lockdown. Debug and programming pads are routed so users can’t physically reach them plus they are locked down at the end of factory production. The enclosure freeze prevents physical access to internal electronics and can integrate a switch or sensor that detects when the case is opened, triggering the device to immediately erase its secure-boot public key, device private key, and certificates.

Which security features must be designed into software architecture?

Moving on to firmware development, embedded system engineers must design critical software isolation, secure communication, data encryption at rest, and security event reporting. These measures establish the internal system barriers before production flashing and freezing the software architecture in hardware.

How do we isolate critical software, and why does it matter?

To ensure critical software isolation on the software architecture level, the system is structured into separated compartments with controlled communication channels between them. Specialized operating systems are used to run separate environments on the same chip so that software tasks cannot interfere with one another's data or processing power. This way, user-facing features, like Wi-Fi connectivity or a touchscreen, are placed in one compartment, while core safety and security functions, like braking controls, medical dosing, or encryption keys, are locked in another. 

With such a design approach, each software component has its own locked memory space and slice of processor time, so a minor software glitch will never crash or delay core safety operations. Also, this helps prevent cyberattacks: if a hacker breaks in through the Wi-Fi connection, they still won’t be able to reach the core product functions

What to implement for secure device communication with the cloud?

Secure communication between a connected device, like an IoT sensor or edge computer, and the cloud relies on three core pillars: data encryption in transit, device authentication and identity management, and strict access control. In European countries, EN 18031 under the Radio Equipment Directive (RED) and the UK PSTI Act strictly ban default credentials and require secure communications.

Encryption in transit helps ensure that data cannot be intercepted, read, or forged. It relies on Mutual Transport Layer Security (mTLS) protocols that ensure mutual authentication between the cloud and the device. Modern cloud platforms and operating systems automate cryptographic operations, so development teams should mostly focus on proper configuration and rules enforcement. 

Device verification proves a device can be trusted. But instead of easy-to-steal passwords, devices use unique digital certificates or hardware-based private keys to prove their identity. In sensitive business operations, it is better when both the cloud system and the device verify each other's identity.

Access control follows the least privilege principle: devices can have access only to the data they need to do their job. This ensures that even if a field device is lost, stolen, or hacked, the attacker won’t be able to use it to take over the rest of the company's cloud resources.

Why do we need to think about security event reporting at the software architecture stage?

Security event reporting requires dedicated data collection, defense, and resource management mechanisms, which are designed at the software architecture stage. Special workflows are built to track and log data about events like failed authentication attempts or hardware tamper alerts. Security data also needs tamper-proof storage within the system, which must be isolated from the main execution environment.

It’s possible to add security event reporting after launch via a software update, but you still must project sufficient memory headroom and data transmission allowances from the start. Also, incorporating reporting early helps meet the incident-disclosure CRA requirements and lets you discover attacks internally before customers or the press make them public.

What becomes the most expensive to change after factory production?

At the assembly line, device identities and hardening production units are permanently written,  so errors in firmware signing keys and the safe updater are the most expensive to address after factory production. A lost private signing key halts all future updates, and once it’s leaked, attackers can push malware across the entire fleet. Fixes for a defective updater require device recalls or field technicians.

How do you secure device identity?

Device identity is ensured by an immutable, hardware-bound, unique cryptographic key and certificate device receives directly on the production line. It is safely locked inside the device's hardware — a TPM chip and the hardware pathways are physically configured so that the key can only be read by the chip's internal cryptographic engine. 

A private key proves a specific device is genuine, distinguishable from all other devices, and authorized to interact with networks, services, or updates. During production, it immediately gets a matching public key — this one is openly shared and used to verify signatures made by the private key.

Individual provisioning prevents fleet-wide compromise; if a shared key is used and leaked, the entire fleet is exposed, requiring every device to be re-registered.

After flashing keys and identities, factory processes must lock the physical service connectors and eliminate shared default passwords and unused services. This locks the physical attack surface against key extraction and enforces secure baseline settings required by regulations like the UK PSTI Act and EU radio conformity under EN 18031.

How should firmware signing keys be provisioned?

Firmware security keys work the other way around: the public firmware key gets burned into the chip's one-time programmable (OTP) memory during production while the private firmware key is stored on the manufacturer’s server. The public firmware key verifies who can install software on the specific device or batch. If the private key is lost or the chip is provisioned incorrectly, future updates are permanently blocked; if the private key leaks, unauthorized parties can install software across the entire fleet.

How secure root of trust works: Private key is used to create digital signature. The firmware is signed with it, device verifies the firmware with public key. If it matches, firmware can be trusted


Why are OTA updates so hard to retrofit?

Over-the-Air (OTA) firmware update mechanism is difficult to retrofit because it is not a standalone feature and depends on other lifecycle stages, from security requirements for cryptographically signed updates to memory budgeting and software separation.

First, a secure firmware update requires enough flash memory to hold a second, full software image alongside the active one. Without it, if the device loses power mid-update, it will be permanently bricked. Secondly, secure firmware updates require bootloader verification, which is impossible without a hardware root of trust. The verification keys for cryptographic signatures are also permanently burned into the hardware’s one-time programmable (OTP) memory.

Another problem is the secure update engine, which enforces firmware version checking to prevent downgrade attacks. To retrofit this logic, you need tamper-resistant storage integrated into the chip and bootloader from day one.

What OTA updates rely on: Memory space; Hardware root of trust; Firmware verification logic; Tamper-resistant storage

Learn more about how OTA updates work and firmware update distribution approaches in a dedicated blog article.

What happens after launch: SBOM, logging, and vulnerability handling?

During this phase, security shifts from architectural design to continuous governance, monitoring, and patch distribution. Having accurate SBOM generation, secure event logging, and vulnerability reporting in place will help you keep the product’s cybersecurity under control and stay compliant with regulations coming into force.

Why does an SBOM matter for firmware?

A Software Bill of Materials (SBOM) provides a full inventory of every software component and version included in each firmware release. This helps to effectively track third-party dependencies, instantly identify newly published vulnerabilities, and quickly verify whether a disclosed zero-day exists within their fleet. EU CRA and the US FDA strictly require generating and maintaining an SBOM, and operating without it puts the manufacturer at risk of non-compliance fines reaching up to €15 million or 2.5% of annual global turnover.

What security events should a device log?

An embedded device must log security events that indicate attempted breaches, operational anomalies, and system integrity failures:

  • Failures in secure boot cryptographic verification or attempts to execute unsigned code.
  • Rejected OTA update payloads, signature validation failures, and unauthorized attempts to downgrade the firmware.
  • Activations of the enclosure tamper switch, unexpected device resets or voltage anomalies, attempts to probe locked interfaces.
  • Failed mutual TLS handshakes, rejected or expired device certificates, and anomalous traffic patterns.
  • Repeated failed local or remote authentication attempts, access attempts using removed factory default credentials, and memory isolation violations.
  • Failures communicating with the external Secure Element or internal hardware root of trust, cryptographic engine faults, and active instances of the device erasing its own keys.

To enable secure logging, the memory budget must be set during hardware selection, and the software architecture must include encrypted cloud channels to transmit it.

Who handles vulnerabilities after launch?

After market launch, the manufacturer's assigned security owner or dedicated product security incident response team (PSIRT) handles vulnerabilities. According to the CRA-mandated requirements, this team manages the continuous post-market security lifecycle, including:

  • Contact point for reporting incidents and a vulnerability disclosure policy.
  • Continuous monitoring of the device’s SBOM and analyzing telemetry logs.
  • Incident response and reporting within 24 hours, 72 hours, and 14 days.
  • Developing, cryptographically signing, and deploying patches to the fleet via the secure Over-the-Air (OTA) update mechanism.

Lemberg Solutions' CRA implementation consulting experts help product teams navigate the new regulation and set up the right embedded development and vulnerability handling processes effectively.

Click to talk to an expert about vulnerability reporting

Conclusion

Embedded system security is most effective operationally and economically when it is determined before the first board is fabricated. Every layer of protection across a device’s lifecycle relies on decisions made earlier. As a result, the cost of remediation increases by orders of magnitude with every stage: a security feature missed during threat modeling might eventually cause a PCB redesign, or poorly budgeted chip memory might lead to an MCU replacement.

Postponing compliance until the last minute can be disruptive as well: market surveillance authorities will be monitoring, and failure to meet the requirements can result in significant financial penalties. So building in security today is the best way to avoid fines and launch products with confidence.

FAQ on secure-by-design architecture

  • Is secure by design still relevant in 2026?

    Yes, the secure-by-design approach to system architecture remains highly relevant in 2026 for several reasons. First, stricter regulations like the EU Cyber Resilience Act (CRA) and initiatives like ENISA's Secure by Design and Default Playbook or CISA’s Secure by Design program push product manufacturers to build proactive, preventive security. 

    Second, the open nature of modern software and hardware supply chains generates multiple security threats. Additionally, the boom of AI and autonomous agents creates new vulnerabilities and expands the potential attack surface. Given that the average cost of a security breach reached 4.99 million USD in 2026, built-in security is more cost-efficient than reactive patching.

  • What are the 5 core principles of secure by design?

    Security-by-design principles assume security measures are an integral part of a system’s architecture. Along with the security-by-default approach, they create a network of shields and obstacles across different system layers that are hard to bypass all at once:

    1. The least privilege principle: give every user of a system no more access rights than they need to do their job. That’s when we separate a network-facing Wi-Fi/Bluetooth stack from the motor-control or critical safety firmware in a vehicle, ensuring the communication task runs in a restricted user domain.
    2. Fail-safe design: if any system component fails to complete its function, it should do so safely. A fail-safe mechanism in an embedded system may respond to a malicious digital attack or sensor spoofing by dropping into a restricted or isolated mode, preventing unauthorized takeover.
    3. Minimized attack surface: keep the number of entry points into the system as small as possible. For instance, physical debug interfaces (JTAG or UART test pins) or physical ports on the circuit board get disabled after manufacturing and factory programming are complete.
    4. Defense in depth: security is integrated independently into every system layer, from application to physical. Embedded systems are designed taking into account different layers — physical tampering resistance, hardware root of trust, domain isolation, and encrypted communication.
    5. Zero trust: no network, identity, or service is ever trusted. Unlike traditional perimeter security, where everything inside a device or network was considered safe, modern secure devices implement strict, continuous validation of every component, process, and communication channel, whether inside or outside the system.

    In our article on the cost of weak embedded systems security, we provide a detailed breakdown of possible threats for these systems and best practices for protecting them.

  • How is data encryption at rest implemented?

    Implementing data encryption at rest requires coordination between hardware selection and the software architecture. The underlying chip provides a hardware root of trust and dedicated hardware cryptographic engines, while the software architecture isolates encryption keys and key-management routines. For example, LUKS (Linux Unified Key Setup) containers are used for encrypting hard drives, USB drives, partitions, or virtual disk files on Linux systems.

FAQ on secure-by-design architecture

Relevant blog posts