# Decentralized Firmware Integrity Verification for Cyber-Physical Systems Using Ethereum Blockchain

Crypto.world

> Firmware sits between hardware and control logic in CPS and has privileged, persistent access, which makes it an attractive target for backdoors and supply-chain attacks.

**arXiv**: 2601.08091

**Published**: 2026-01-13

**Authors**: S M Mostaq Hossain, Amani Altarawneh

## AI summary

Decentralized Firmware Integrity Verification for Cyber-Physical Systems Using Ethereum Blockchain

## Overview

**Research area:** Blockchain-based security for Cyber-Physical Systems (CPS), specifically firmware integrity verification and anti-tampering for embedded devices.

**Technical level:** Intermediate. The paper assumes some familiarity with blockchain concepts (smart contracts, gas, testnets) and hashing, but the architecture and workflow are explained clearly enough for a reader with basic security or embedded-systems background.

**Scope (one sentence):** The paper designs, deploys and measures a working prototype that stores SHA-256 firmware hashes in a Solidity smart contract on the public Ethereum Sepolia testnet and verifies firmware authenticity through live on-chain transactions.

## What This Paper Is About

Firmware sits between hardware and control logic in CPS and has privileged, persistent access, which makes it an attractive target for backdoors and supply-chain attacks. Existing protections — secure boot, digital signatures, and centrally hosted hash databases — depend on trusted keys and trusted servers, so they fail under insider threats, key compromise, or a single point of failure.

The goal is to replace that central point of trust with a public blockchain: publish a firmware hash on-chain once, then let any device or auditor compare a freshly computed hash against the immutable on-chain record, with no credentials and no trusted third party.

## Key Contributions

1. **A decentralized firmware verification framework on public Ethereum.** Unlike prior blockchain firmware work that used private or consortium chains, this design runs on a public Ethereum testnet, removing centralized trust and executing live transactions.
2. **A working prototype, not just a design.** The authors implement a Python client (Web3.py plus Infura) that computes firmware hashes, deploys the `FirmwareIntegrity.sol` contract, registers hashes, and performs runtime validation against a real Arduino firmware binary.
3. **An operational and economic analysis of on-chain verification.** Gas cost, transaction latency and throughput are measured from actual Sepolia deployments and reported per operation.
4. **A documented security and scalability discussion.** The paper presents a threat model (hash spoofing, replay attacks, on-chain surveillance, denial of service) and outlines extensions using Layer-2 rollups, IPFS off-chain storage, secure boot, TPM-based attestation and zero-trust architecture. Code and contracts are released in a public GitHub repository.

## Main Findings

- **Hashing works as a reliable fingerprint.** The `compute_hash.py` script read the Arduino Mega 2560 R3 `.hex` firmware in 4 KB chunks via Python's `hashlib` and produced the expected 64-character SHA-256 digest (shown in the paper as `a9c....471`), confirming deterministic, repeatable fingerprinting.
- **Infura connectivity is sufficient.** `connect_infura.py` reached the Sepolia testnet over HTTPS and returned the confirmation message "Connected to Ethereum Testnet (Sepolia)!", so no local node is required.
- **Contract deployment succeeded.** The contract was created at address `0x84f7c0...7892` from wallet `0x2fe510...Ea3A`, in block `7979133`, transaction `0xdb4975b...cef28`, with a fee of approximately 0.00443 ETH at a gas price of 9.742818053 Gwei. The body text reports 688019 block confirmations; the Fig. 5 caption instead states 9 block confirmations.
- **Verification is cheap.** The on-chain verification call (transaction `0x931e73d0...c9309`, block `7983467`) succeeded at a fee of approximately 0.0001415 ETH with a gas price of 1.539866239 Gwei.
- **Cost summary:** storing a hash cost about 0.0044 ETH and verifying cost about 0.00014 ETH.
- **Performance summary (Table III):** gas per registration averaged 78,200 units (approximately $0.12 USD), average transaction confirmation latency was 14.6 s, and verification throughput was 9–10 transactions per minute under light concurrency — reported as comparable to prior blockchain integrity frameworks.
- **Public auditability is demonstrated, not just claimed.** Deployment and verification are both independently checkable on Etherscan via the cited transaction hashes, which is the paper's distinctive point relative to private-chain designs.
- **The authors flag their own limits.** Table I lists the proposed work's weaknesses as "prototype only, performance untested," and the evaluation uses a single firmware image on a testnet rather than a fleet of physical CPS devices or Ethereum Mainnet.

## Methodology in Plain English

The approach is a three-part loop. First, a Python script reads a firmware file in 4 KB pieces and produces a SHA-256 hash — any single changed bit produces a completely different hash, so the hash acts as a fingerprint. Second, that hash is written into a small Solidity smart contract deployed on Ethereum's Sepolia testnet, a public test network that behaves like Mainnet but uses valueless test tokens. Third, to check a device's firmware later, the script recomputes the hash and asks the contract whether it matches, receiving a true/false answer.

The Python client talks to Ethereum through Infura, a hosted gateway that removes the need to run a full node, and the contract is written and read using the Web3.py library. Writing the initial hash is a state-changing transaction that costs gas; verification is designed as a low-cost read-only call. Every action is recorded on-chain, so deployment, registration and verification can all be inspected on Etherscan by anyone. The authors used one real Arduino Mega 2560 R3 `.hex` image as the test firmware, running the Python 3.11 scripts on Windows 10, and recorded contract addresses, gas used, block numbers, fees and statuses for each transaction.

## Why This Matters

**Impact on research.** The paper's contribution is less about novel cryptography than about demonstrating a publicly verifiable, permissionless deployment where prior firmware-blockchain work stayed conceptual or confined to private/consortium chains. It converts an architectural proposal into measured gas, latency and throughput numbers that later work can cite and compare against, and it explicitly identifies the cost and latency gaps that hybrid designs must close.

**Real-world applications:**

- **Critical infrastructure firmware updates** — energy, healthcare and transportation CPS where a tampered controller could disable safety features or install a persistent backdoor.
- **Supply-chain verification at delivery** — a device or integrator can check received firmware against an immutable, timestamped on-chain record without trusting the vendor's server.
- **Field audits and incident forensics** — an auditor can confirm what firmware was authorised for a device and when, using only public blockchain history.
- **Distributed, resource-constrained deployments** — installations spread across many sites with no shared central trust anchor, where a public ledger substitutes for a proprietary hash database.

**Industry relevance.** The paper reports a per-registration cost of roughly $0.12 in equivalent value on a testnet and a verification cost around 0.00014 ETH, which frames blockchain anchoring as an affordable option for high-assurance devices but a questionable one at large IoT scale — the authors themselves note this and point to Layer-2 and off-chain anchoring. The named threat precedents (ShadowHammer, TrickBoot) tie the work directly to real firmware supply-chain failures, and the proposed integration points — secure boot, TPM/HSM attestation, zero-trust architectures — map onto controls device vendors already ship.

## Future Directions

- **Move beyond the testnet.** The authors plan to extend testing to Ethereum Mainnet or Layer-2 environments and to integrate with physical CPS devices to assess real-time operational feasibility; no Mainnet gas or latency figures are reported in this paper.
- **Reduce cost and overhead at scale.** Layer-2 rollups (Optimism, zk-Rollups) and off-chain storage anchored on-chain via IPFS or Merkle proofs are proposed to bring the ~0.0044 ETH registration cost down for IoT-scale fleets.
- **Close the latency gap for time-critical systems.** With a measured 14.6 s average confirmation, the paper raises hybrid verification — fast local checks combined with periodic blockchain anchoring — as an open design question for real-time control loops.
- **Harden trust with hardware.** Integrating secure boot, TPM/HSM-based attestation and zero-trust controls, plus contract extensions for multi-hash records, firmware versioning, hardware IDs and alerting, are all left as future work rather than implemented.

## Target Audience

This paper suits embedded and CPS security engineers evaluating tamper-evident firmware attestation, blockchain architects assessing on-chain anchoring costs and latency, and graduate students or researchers entering the firmware-supply-chain security space who want a concrete, reproducible reference implementation with published contract addresses and gas figures. Practitioners deciding between private ledgers and public chains for device trust will find the explicit comparison and the honest cost/scalability caveats the most useful part.

## Authors’ abstract

Firmware integrity is a foundational requirement for securing Cyber-Physical Systems (CPS), where malicious or compromised firmware can result in persistent backdoors, unauthorized control, or catastrophic system failures. Traditional verification mechanisms such as secure boot, digital signatures, and centralized hash databases are increasingly inadequate due to risks from insider threats and single points of failure. In this paper, we propose a decentralized firmware…

[The full abstract on arXiv](https://arxiv.org/abs/2601.08091)

[Read the original paper](https://arxiv.org/abs/2601.08091)

---

Canonical: https://crypto.world/paper/decentralized-firmware-integrity-verification-for-cyber-physical-2601.08091
