Skip to content
Tech Interview Prep
Technical interview guide

Embedded Security

How a device establishes that its firmware hasn't been tampered with, and the physical-access attack classes that don't exist in typical server-side security.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: PSA Crypto 1.5, Storage 1.0, Attestation 2.0; current TF-M and MCUboot; NIST IR 8259A/SP 800-193; OWASP ISVS 1.0 reviewed 2026-09-04.

Overview

Curated: · Written: · Reviewed:

Embedded Security

In one line

Embedded security is the set of controls that keeps a device running only authenticated firmware, with keys and counters it cannot leak or roll back, against an adversary who holds the hardware. Reach for it whenever the attacker can reach flash, a debug port, a bus or the power rail, which for any field device is the default.

Key definitions

  • Root of trust: the immutable first stage (mask ROM, or OTP-fused key hash) that runs unchecked and verifies everything below it.
  • Chain of trust: each stage verifies the next before jumping to it, and verification terminates at the root.
  • Rollback index: a monotonic counter in OTP, a secure element or replay-protected storage; images below it are refused.
  • Authenticity vs authorization: a valid signature proves who signed an image; the counter, identity and lifecycle state decide whether it may run now.
  • RDP / debug lock: read-out protection and fused-off debug access, verified per unit at end of line.
  • Fleet blast radius: the number of devices a single key compromise exposes; a device key is one serial, an update signing key is the whole fleet.

Formulas and complexity

Signed-update acceptance is a conjunction, not a single check:

accept(img)=VerifyKfused(img.sig,img.metadata)∧(img.security_version≥counter)∧compatible(img)\text{accept}(img) = \text{Verify}_{K_{fused}}(img.\text{sig}, img.\text{metadata}) \wedge (img.\text{security\_version} \ge \text{counter}) \wedge \text{compatible}(img)

A 16-bit security version gives 65,536 steps; a 32-bit counter overflow must trigger key rotation, not wrap to zero.

How it works

The boot ROM verifies the bootloader against a fused key hash. The bootloader verifies the application, or the inactive A/B slot, and checks the rollback counter. The counter is burned only after the new image passes its trial boot and health checks. Every signed object covers the payload and the metadata used to select it: load address, entry point, version, dependencies and hardware compatibility.

verify sig verify sig + metadata security_version >= OTP counter? no yes health OK fail Boot ROM / fused key hash Bootloader Inactive slot image Accept Refuse, stay on current Trial boot Burn counter, confirm Roll back to verified slot

When to use and when not to

SituationDecision
Device holds keys or actuates a lock, relay or paymentHardware root of trust, locked debug, rollback counter, lab fault testing
Device holds no secrets, $3 classSigned-update check and locked debug; no secure element
Per-device unique keysCompromise is one serial; enrol the public key in the backend
One fleet-wide symmetric keyReject: one theft is a fleet event
Attestation quote for appraisalUse only with a fresh challenge; never as authorization

Traps interviewers probe

  • Signing only the payload. Load address, version and dependency IDs are unsigned, so an attacker repositions a valid image or pairs it with hostile metadata. Fix: sign the whole header with the payload and check the header CRC is not the integrity check.
  • Bumping the counter at install. A failed update then blocks rollback to the working build. Fix: burn after trial boot and health confirmation.
  • Treating encryption as authentication. Ciphertext without a signature or MAC lets an attacker substitute code that decrypts to attacker code. Fix: sign or MAC the ciphertext, and verify before decrypt.
  • Leaving debug open after provisioning, or testing RDP at 25 °C only. A $20 probe reads flash. Fix: fuse debug off at provision and read back a 1 KiB dump from flash base as a fail-if-readable test on every unit.
  • Assuming a MAC carries freshness. A MAC covers only the bytes it is given. Fix: add a monotonic counter or device-issued challenge and reject stale values after reboot.

Interview tips

Open with the root: "The root is the fused key hash in ROM; everything below it is verified, and the root is trusted by construction." Then name the asset and the attacker's cheapest path.

Expected follow-ups:

  • How do you provision keys without the factory fixture becoming a fleet key?
  • How does RMA debug unlock work without a master bypass? (Per-device, signed, nonce-fresh, audited.)
  • How do you verify the fuses actually burned? (Production read-back test on every unit.)
  • What is the update signing key blast radius, and how do you rotate it? (Fleet-wide; designed in from day one; HSM-held.)
  • What is your decommissioning story? (Secure erase and credential revocation.)

30-second outline:

  1. Root of trust: fused key hash in ROM, verification ends there.
  2. Chain: bootloader then image, signed over payload and metadata.
  3. Authorization: rollback counter in OTP, burned after confirmation.
  4. Keys: device keys are per-serial in a secure element; update keys are fleet-wide in an HSM.
  5. Physical: debug locked and verified per unit, side channels and glitching in scope only where assets justify it.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.