Express + expert help

View pricing →
Skip to main content
tutorialCRA6 min read

Secure OTA Firmware Updates and the Evidence to Keep

Plan secure OTA test evidence for signatures, interrupted updates, recovery and downgrade controls against the CRA update requirements, with a small host demo.

By CenitiaUpdated

Fact-checked against the law as of Reviewed by Vladimír Vician on How we check

Secure OTA evidence should show that the device accepts authorised updates, rejects altered packages and recovers safely from failures. A successful normal update is only one test, and a signature check on a laptop cannot establish the behaviour of the device's flash or bootloader.

Use the OTA evidence plan to define the expected result before each test. This article lists the update requirements in the Cyber Resilience Act, shows the code and result of a small signature demonstration that runs on a development computer, and proposes device tests. The device tests are separate and have not been run for this article.

What the Cyber Resilience Act requires of updates

Annex I to the Cyber Resilience Act (Regulation (EU) 2024/2847) contains the requirements that an update design and its evidence should cover. They apply to products placed on the market from 11 December 2027.

  • Part I, point (2)(c). Vulnerabilities must be addressable through security updates. Where applicable, that includes automatic security updates installed within an appropriate timeframe and enabled as a default setting, a clear and easy-to-use opt-out mechanism, notification of available updates to users and the option to temporarily postpone them.
  • Part II, point (2). Where technically feasible, new security updates are provided separately from functionality updates.
  • Part II, point (7). The manufacturer provides mechanisms to securely distribute updates, so that vulnerabilities are fixed or mitigated in a timely manner and, where applicable for security updates, automatically.
  • Part II, point (8). Security updates are disseminated without delay and free of charge, unless otherwise agreed with a business user for a tailor-made product. They come with advisory messages that give users the relevant information, including any action to take.
  • Annex II, point 8. The user instructions explain how security updates can be installed and how the default automatic installation can be turned off.

Annex I does not name a signature scheme, a partition layout or a rollback design. Those choices come from the cybersecurity risk assessment that Article 13(2) requires, and the tests below produce evidence for them. See Regulation (EU) 2024/2847 (Cyber Resilience Act).

Separate authenticity, recovery and downgrade protection

Authenticity asks whether the accepted package was authorised by a trusted signer. Recovery asks what happens if download, writing or first boot fails. Downgrade protection asks whether an older authorised release can be installed despite a security policy.

These controls interact but are not interchangeable. A correctly signed old image may still violate a downgrade policy. Two application slots can support recovery without establishing that the trust anchor is protected. HTTPS protects transport but does not replace the product's update authorisation design.

Describe the update architecture

Record bootloader, partitions, trust anchors, image format, signature scheme, signing process and update state transitions. Include offline update paths, recovery images and secondary processor firmware. State whether data or bootloader partitions follow the same mechanism as the application.

As one platform specific example, the ESP-IDF over-the-air update documentation treats application update, rollback and anti-rollback as separate features. It describes two application slots with a safe update mode, an optional rollback of an application that is not confirmed after its first boot, and an optional anti-rollback check that compares the application's secure version with a value stored in eFuse. It also warns that updates of other partitions, such as the bootloader, are not safe against a power interruption during the final copy. Record the actual ESP-IDF version and configuration: the stable documentation link moves between releases and pointed to version 6.1.1 on 21 November 2026.

Do not apply a platform example to another chip or assume every flash operation is atomic. Review the implementation and device documentation for the actual product.

What the host demonstration checks

The demonstration creates ephemeral Ed25519 keys, signs a short synthetic payload and checks four outcomes: the original signature is accepted, and a changed payload, a different public key and an altered signature are each rejected.

import { generateKeyPairSync, sign, verify } from 'node:crypto'
import assert from 'node:assert/strict'

// Random ephemeral keys; nothing is stored.
const { publicKey, privateKey } = generateKeyPairSync('ed25519')
const otherKey = generateKeyPairSync('ed25519').publicKey
const payload = Buffer.from('SYNTHETIC OTA package version 1\n')
const signature = sign(null, payload, privateKey)

const ota = {
  validSignatureAccepted: verify(null, payload, publicKey, signature),
  tamperedPayloadRejected: !verify(null, Buffer.from('SYNTHETIC OTA package version 2\n'), publicKey, signature),
  wrongKeyRejected: !verify(null, payload, otherKey, signature),
  alteredSignatureRejected: !verify(null, payload, publicKey, Buffer.alloc(signature.length)),
}
assert(Object.values(ota).every(Boolean))
console.log(ota)

These checks ran on Node.js 24.11.1 on 1 October 2026 as part of a larger script, and all four returned true. The standalone listing above gave the same result on Node.js 24.11.1 on 21 November 2026. Save it as a .mjs file and run it with node to repeat it.

The result demonstrates those cryptographic API operations. It is not a test of an OTA client, a real firmware format, key provisioning or a physical product. The keys are not retained and are not used in any product. It cannot support claims about power loss, flash corruption, secure boot, rollback or eFuse configuration.

Prepare the hardware matrix

TestExpected behaviour to defineEvidence to retain
Approved signed packageAccepted only for the intended target and version policyInput hash, trust configuration and boot result
Tampered package or wrong signerRejected without leaving an unusable deviceError log, device state and subsequent normal boot
Power interruption during updateDefined recoverable state at selected interruption pointsControlled timing, flash state and recovery outcome
Failed first bootRecovery follows the documented health decisionBoot logs, health criteria and selected image
Older signed releaseBehaviour matches the product downgrade policyOld and new versions, policy state and rejection or acceptance evidence
Automatic update default, opt-out and postponementBehaviour matches the documented default and the user controlsSettings state, user notification and the matching user instructions

These are proposed tests. They have not been performed on hardware for this article. Plan safe test units, controlled interruption equipment and a recovery method before testing. Do not experiment with irreversible device configuration on production units.

Make failure results useful

Specify whether the device should continue running the previous image, enter a restricted recovery mode or wait for a valid update. “Did not brick” is too imprecise when credentials or functions are lost.

Capture the exact image and bootloader versions, device revision, initial state and test steps. Repeat relevant boundary cases where the implementation has multiple phases. A power interruption at one convenient point does not cover every update phase.

Connect the results to release and support

Keep the test record with the signed release and vulnerability handling evidence. Define who can sign, how keys are protected and rotated, and how affected devices receive a corrected image if a signer is compromised. Map each test to the Annex I points listed above and record any point the tests do not cover, such as free-of-charge delivery or the advisory message, which are process evidence rather than device behaviour.

Use actual device logs and an embedded security review to support product release decisions. The host signature demonstration does not establish hardware behaviour.

CRA applicability and timing

Most Cyber Resilience Act obligations apply to products placed on the market from 11 December 2027; a product placed on the market earlier becomes subject to them only if it is substantially modified from that date (Article 69(2)). Article 14 reporting is already a current duty: it has applied since 11 September 2026 to every in-scope product, including products placed on the market before 11 December 2027 (Article 69(3)), and it continues after the support period ends. Check the product’s scope, your role and the transitional provisions. See the Commission page for manufacturers, the Commission page on reporting and the Commission guidance on the application of the Cyber Resilience Act (C/2026/6013).

Continue reading

Related guides

Put this into practice

Free tools & references

New to the terminology? Browse the compliance glossary — plain-English, citation-backed definitions of every term above.