Security and Cryptography
Security has become a baseline requirement for embedded systems as they connect to networks, handle personal data, and control physical processes. Embedded security spans hardware protection mechanisms, cryptographic implementation, secure software development, and the operational discipline of provisioning keys, distributing updates, and responding to disclosed vulnerabilities over a product lifetime that may run for a decade or more.
Two constraints separate embedded security from server and desktop security. First, the resource budget is fixed and small: a device may carry tens of kilobytes of RAM, run from a coin cell, and cost a few dollars, so every cryptographic operation competes with the application for memory, energy, and unit cost. Second, the attacker often holds the device. Physical possession enables invasive and semi-invasive attacks—probing buses, reading flash through a debug port, injecting faults, or measuring power consumption—that simply do not apply to hardware locked in a data center. The sections below cover the principles, threat models, hardware foundations, cryptographic practice, and certification regimes that shape secure embedded design, and the subcategories treat each area in depth.
Articles in This Category
Core Security Principles
Defense in Depth
No single mechanism is sufficient. Effective designs layer protections so that defeating one does not grant complete access: an immutable boot root of trust, signed firmware, isolated execution domains, authenticated communications, and runtime hardening each raise the cost of an attack independently. Layering also buys time, because a defect in one layer can often be repaired by update before the layers beneath it are reached.
Least Privilege and Isolation
Each component should hold only the access its function requires. On processors with a memory protection unit or memory management unit, network stacks, parsers, and third-party libraries can run in restricted regions that cannot reach key storage or peripheral registers. Privilege separation converts a full compromise into a contained one, which matters most for the code that touches attacker-controlled input first.
Secure by Design
Security decisions made in silicon and board layout are effectively permanent. Whether a part offers a one-time-programmable key store, whether debug ports can be locked or authenticated, and how much flash is available for a dual-image update scheme are all fixed at design time. Retrofitting these capabilities after tape-out or after deployment is usually impossible, so threat analysis belongs in architecture rather than in validation.
Trust Boundaries and Roots of Trust
A trust boundary marks the transition between components with different levels of assurance—between the radio stack and the application, between the application processor and a secure element, or between the device and the cloud. Data crossing a boundary must be validated, and communication across it must be authenticated. Every chain of trust terminates in a root of trust: a small quantity of code and key material that cannot be modified, typically held in mask ROM and one-time-programmable fuses, and trusted because it cannot be changed rather than because it was verified.
Threat Models and Attack Surfaces
Building a Threat Model
Protection without a stated adversary is guesswork. A threat model enumerates assets (keys, firmware, user data, safety functions), the interfaces an attacker can reach, and the attacker's capability and budget. Structured methods make the enumeration repeatable: STRIDE classifies threats by category against a data-flow diagram, attack trees decompose a goal into the steps required to achieve it, and the automotive standard ISO/SAE 21434 formalizes threat analysis and risk assessment as a required work product. The output is a set of security requirements that can be tested, not a list of features.
Remote and Network Attacks
Networked devices expose protocol stacks, parsers, and management interfaces to anyone who can reach them. Memory-safety defects in C-language network code remain the dominant class; widely publicized vulnerability clusters in embedded TCP/IP stacks have shown how a single library defect propagates into millions of devices across many vendors. Default or shared credentials are equally consequential: the Mirai botnet of 2016 recruited hundreds of thousands of cameras and routers using little more than a list of factory default passwords. Protocol-level protections are treated in the article on security protocols.
Local and Physical Attacks
Physical access opens a distinct family of attacks. Non-invasive methods observe or stimulate the device from outside its package: power and electromagnetic analysis recover keys from emissions correlated with secret data, and fault injection—voltage glitches, clock glitches, electromagnetic pulses, or focused laser pulses—perturbs execution so that a signature check returns success or a key is emitted in the clear. Semi-invasive and invasive methods go further, decapsulating the die to probe internal buses or read memory directly. Simpler openings are more common in practice: an unlocked JTAG or serial-wire debug port, a UART console left enabled, or unencrypted external flash that can be desoldered and read with a commodity programmer.
Supply-Chain Threats
Devices are assembled from third-party silicon, open-source libraries, and contract-manufactured boards, and each link is a potential entry point. Concerns include counterfeit or recycled components, overproduction of authorized designs at a subcontractor, malicious or vulnerable code inherited from dependencies, and key material exposed during factory provisioning. A software bill of materials, secure provisioning that limits how many device identities a factory can issue, and cryptographic verification of every image before it is programmed all reduce this exposure.
Hardware Security Foundations
Trusted Execution Environments
Hardware-isolated execution domains separate sensitive code from the general-purpose operating system. Arm TrustZone partitions a system on chip into secure and non-secure worlds, with the partition enforced by the bus fabric so that memory and peripherals can be assigned to one world or the other; the Armv8-M variant, TrustZone-M, brings the same model to microcontrollers with fast, hardware-managed transitions suited to interrupt-driven code. Server-class equivalents include Intel Software Guard Extensions and AMD Secure Encrypted Virtualization, although Intel deprecated SGX on its consumer client processors and now targets data-center platforms with it—a reminder that enclave availability is a product decision as much as an architectural one.
Secure Elements and Trusted Platform Modules
A secure element is a hardened microcontroller, often certified against invasive attack, that stores keys and performs cryptographic operations on behalf of a host that never sees the private key material. Trusted platform modules conforming to the TPM 2.0 library specification, standardized as ISO/IEC 11889, add a defined command set for measured boot, sealed storage, and attestation. Many modern microcontrollers integrate an equivalent function on-die as a security subsystem with its own core, key store, and cryptographic engines, avoiding an exposed inter-chip bus at the cost of sharing the same package as the application processor.
Physical Unclonable Functions
A physical unclonable function derives a device-unique value from uncontrollable manufacturing variation, such as the power-up state of an SRAM array or frequency differences between nominally identical ring oscillators. Because the raw response is noisy, a PUF is paired with a fuzzy extractor and public helper data that reconstruct a stable key at each power-up. The key exists only while the device is running and is never stored in nonvolatile memory, which removes the offline read-out attack that threatens fused keys and yields a credential that is difficult to clone even with the device in hand.
Tamper Detection and Response
Physical countermeasures detect intrusion and react before secrets escape. Active shields route a serpentine mesh over sensitive circuitry and monitor it for cuts or shorts; voltage, temperature, and clock-frequency monitors detect the out-of-range operating conditions used for glitching; case switches and light sensors detect enclosure opening. The usual response is immediate zeroization of keys, sometimes combined with a permanent transition to a disabled state and an audit record. FIPS 140-3, which adopts ISO/IEC 19790, defines four graduated security levels for cryptographic modules, from basic requirements at Level 1 through tamper-evident and tamper-responsive envelopes with environmental failure protection at Levels 3 and 4.
Debug and Test Port Protection
Debug interfaces are indispensable in development and dangerous in the field, because a live JTAG or serial-wire port typically grants full memory access and defeats every software protection above it. Production devices therefore lock debug access through fuses or a protection-level setting, and better parts support authenticated debug, in which a signed challenge-response unlocks a specific device for return-material analysis without weakening the fleet. Boundary-scan chains, test modes, and factory-only commands deserve the same treatment, since they frequently survive into production unreviewed.
Cryptographic Implementation
Symmetric Encryption
AES provides efficient bulk encryption and is available as a hardware engine on most modern microcontrollers, which raises throughput while cutting energy per byte relative to a software implementation. Authenticated encryption with associated data is the correct default: AES-GCM and AES-CCM are widely deployed and hardware-friendly, while ChaCha20-Poly1305 performs well on cores without an AES engine. Mode discipline matters more than cipher choice, because nonce reuse in a counter-based authenticated mode can expose plaintext and, for GCM, the authentication key itself. Devices that must generate nonces across power cycles need a monotonic counter in nonvolatile memory or a deterministic construction rather than a random value drawn from a weak source.
Asymmetric Cryptography
Public-key algorithms provide key establishment, digital signatures, and identity. Elliptic-curve cryptography dominates embedded use because it reaches a given security level with far smaller keys and signatures than RSA: a 256-bit elliptic-curve key is generally credited with security comparable to a 3072-bit RSA key, which cuts storage, transmission, and computation. ECDSA and EdDSA over curves such as P-256 and Curve25519 are the common signature choices, with ECDH for key agreement. Post-quantum algorithms are now entering embedded roadmaps: NIST published ML-KEM for key encapsulation, ML-DSA for signatures, and the hash-based SLH-DSA as FIPS 203, 204, and 205 in August 2024, selected HQC in 2025 as a backup key-encapsulation mechanism built on different mathematics, and has a further compact signature standard in progress. Their larger keys and signatures pressure flash budgets and update payload sizes, which is why long-lived devices increasingly plan for cryptographic agility rather than a fixed algorithm set. The algorithm choices and migration schedule are treated in the article on quantum-resistant cryptography.
Hash Functions and Message Authentication
Cryptographic hash functions such as SHA-256 underpin signature verification, firmware measurement, and key derivation; the SHA-3 family offers an alternative construction where design diversity is wanted. Message authentication codes provide integrity with a shared secret at far lower cost than a signature: HMAC builds on a hash function and CMAC on a block cipher, the latter attractive when an AES engine is already present. Key derivation functions such as HKDF expand a single provisioned secret into distinct keys per purpose and per session, and password-based derivation functions with deliberate work factors protect any credential a user chooses.
Random Number Generation
Weak randomness has broken more embedded deployments than weak algorithms. Keys, nonces, and signature parameters must come from a properly seeded generator, yet a device at first boot has no disk, no user input, and no network entropy. The accepted structure is a hardware entropy source—typically ring-oscillator jitter or thermal noise—feeding a deterministic random bit generator, with continuous health tests on the raw source, following the guidance in the NIST SP 800-90 series. Two failure modes recur in the field: seeding from a value that is identical across a production run, which yields duplicate keys across devices, and treating a bare hardware source as directly usable without conditioning or health testing. Entropy sources, conditioning, and validation are covered in the article on random number generation.
Side-Channel and Fault Resistance
An algorithm that is secure on paper can leak through its implementation. Execution time, power draw, and electromagnetic emission all correlate with secret data unless the implementation is written to prevent it, and differential power analysis can recover a key from many traces of otherwise correct operation. Countermeasures include constant-time code that avoids secret-dependent branches and table indices, masking that splits secrets into randomized shares, and hardware measures such as noise injection, power filtering, and dual-rail logic. Fault attacks require separate defenses: verifying a signature twice, checking the result of an RSA or ECC operation before releasing it, and adding redundancy to critical branches so that a single glitch cannot skip a security check.
Key Management and Device Identity
Cryptography converts a data-protection problem into a key-management problem, and it is key management that most often fails. Each device needs a unique identity established at manufacture, protected in storage, and usable for the life of the product.
Provisioning and Identity
Device identity is injected during production or generated on-device, and the second approach is preferable when the part supports it, because a private key created inside the security subsystem never exists outside it. IEEE 802.1AR defines this pattern as a secure device identifier: an initial identity installed by the manufacturer and locked, alongside locally significant identities that an operator issues after the device joins a network. Where keys must be injected, the operation belongs in a controlled environment with a hardware security module, an auditable count of identities issued, and no retention of secrets by the contract manufacturer.
Key Hierarchies and Storage
A well-structured design separates keys by role and lifetime: an immutable root verification key in fuses or ROM, firmware signing keys held offline by the vendor, device identity keys unique per unit, and short-lived session keys derived per connection. Diversifying per-device keys from a master secret ensures that extracting one device's key does not compromise the fleet—the single most valuable property to design in. Storage options run from one-time-programmable fuses and locked flash regions to key slots in a secure element that permit use but never export, and the last of these is the only option that survives an attacker with the device in hand.
Rotation, Revocation, and End of Life
Keys must be replaceable. Supporting multiple root verification keys, and a fuse-based mechanism to retire a compromised one, allows a signing key to be rotated without bricking deployed hardware. Certificate lifetimes, revocation distribution, and the behavior of a device whose certificate has expired all need explicit decisions, because devices installed for twenty years will outlive typical certificate practice. Decommissioning deserves the same attention: a secure erase path that zeroizes keys and user data prevents a resold or discarded unit from becoming an entry point or a source of cloned credentials.
Secure Development and Lifecycle
Secure Coding and Language Choice
Most exploited embedded defects are memory-safety errors in C or C++. Coding standards such as CERT C and the MISRA C guidelines constrain the language to a defensible subset and eliminate whole classes of undefined behavior, while compiler hardening—stack canaries, non-executable data regions, and bounds-checked library functions—raises exploitation cost at modest overhead. Memory-safe languages, principally Rust, are appearing in new embedded work for parsers and network code, where the risk concentrates. Related discipline appears in the article on secure coding practices.
Analysis and Testing
Static analyzers detect vulnerable patterns before hardware exists and integrate cleanly into continuous integration. Fuzzing supplies malformed input to parsers and protocol handlers and is the most productive way to find memory-safety defects in practice; embedded targets are usually fuzzed by compiling the module for a host or by running the firmware under emulation, since on-target throughput is too low. Independent penetration testing adds what tooling cannot: chained logical attacks, and hardware work such as glitching, bus probing, and flash extraction. Testing must cover the physical attack surface, because a design reviewed only for network security typically has an unlocked debug port.
Update and Vulnerability Response
Nothing ships free of defects, so the ability to deploy a fix is itself a security control. A dependable update path authenticates images with a digital signature verified against a root key, prevents downgrade to a vulnerable version using a monotonic counter, and tolerates power loss mid-update through dual-bank images or a verified rollback slot—the mechanics belong to the bootloader and are treated in the firmware update subcategory above. Around the technical mechanism sits a process: a published coordinated vulnerability disclosure policy along the lines of ISO/IEC 29147 and 30111, a maintained software bill of materials in a standard format such as SPDX or CycloneDX so that a newly disclosed library flaw can be traced to affected products, and a stated support period after which the device is declared end of life.
Standards, Certification, and Regulation
Embedded security has moved from a competitive differentiator to a legal obligation in several major markets, and the applicable regime often determines how much assurance evidence a program must produce.
Evaluation Schemes
FIPS 140-3 validates cryptographic modules against ISO/IEC 19790 and is effectively mandatory for equipment sold to United States and Canadian federal buyers. Common Criteria, standardized as ISO/IEC 15408, evaluates products against protection profiles and remains the reference regime for smart cards and secure elements, where high-assurance evaluations include laboratory attack testing. Because full Common Criteria evaluation is slow and costly for connected products, lighter schemes have emerged: GlobalPlatform's SESIP offers a modular, reusable methodology for connected-device platforms, and PSA Certified provides tiered assurance levels for silicon, system software, and devices built on Arm's platform security requirements.
Baseline and Sector Standards
ETSI EN 303 645 sets a consumer Internet of Things baseline, covering practices such as eliminating universal default passwords, providing a vulnerability disclosure route, and declaring the security update period. NIST IR 8259 and its companion profile define comparable device capability baselines for United States manufacturers. Industrial systems follow the IEC 62443 family, which separates secure development process requirements from technical requirements on components and systems, expressed as graduated security levels. Automotive programs follow ISO/SAE 21434 for cybersecurity engineering across the vehicle lifecycle.
Regulatory Requirements
The United Kingdom's Product Security and Telecommunications Infrastructure regime took effect on 29 April 2024, requiring consumer connectable products sold in that market to avoid default passwords, publish a vulnerability disclosure policy, and state a minimum security update period. The European Union's Cyber Resilience Act entered into force in December 2024; its incident and actively exploited vulnerability reporting duties apply from 11 September 2026, and the remaining obligations—essential cybersecurity requirements, conformity assessment, technical documentation, and CE marking—from 11 December 2027. In the vehicle sector, UN Regulation No. 155 requires a certified cybersecurity management system for type approval and UN Regulation No. 156 an equivalent software update management system, applying to all new vehicles registered in the European Union since July 2024. The United States has taken a voluntary route, with the Federal Communications Commission establishing the Cyber Trust Mark labeling program for consumer Internet of Things products in 2024.
Engineering Trade-Offs
Every security measure costs something measurable. Signature verification at boot adds startup latency, which is unwelcome in a device expected to respond within milliseconds of a wake event; side-channel countermeasures such as masking can multiply the execution time and code size of a cipher several times over; a secure element adds bill-of-materials cost, board area, and a supply-chain dependency; and post-quantum keys and signatures consume flash and update bandwidth that constrained parts may not have. Battery-powered designs feel these costs most acutely, since cryptographic work translates directly into shortened field life.
The resolution is proportionality rather than maximal protection. A threat model that names the adversary, the assets, and the attacker's budget indicates where hardware isolation earns its cost and where a well-implemented software cipher on a locked-down microcontroller is sufficient. Measures that cost little and cannot be retrofitted—an immutable root of trust, locked debug ports, unique per-device keys, and a working signed update path—belong in nearly every design, because their absence forecloses every later remedy.
About This Category
The subcategories above develop each of these threads in depth: the mechanics of implementing ciphers efficiently on constrained hardware, the construction of a boot chain that verifies and attests to the software it launches, the dedicated silicon that guards keys, the isolation properties of trusted execution environments, the measurement-based attacks that defeat correct algorithms, and the update path that keeps a deployed fleet defensible. Read together, they support the discipline that distinguishes a secure product from one that merely uses cryptography: identifying what must be protected and from whom, then building protections that hold when the attacker owns the device.