# Blockchain Solutions for Enhancing Security and Privacy in Industrial IoT
## 4 Blockchain-Based Architecture and System Design
### System Entities and Interactions  
The proposed blockchain-integrated Industrial Internet of Things (IIoT) system is designed to ensure secure, scalable, and efficient operations by integrating several core entities. These entities interact across multiple architectural layers--physical, network, edge, cloud, and application--to support real-time data processing, the decentralized enforcement of security policies, and automated threat response. The seamless integration of IIoT devices with blockchain-based infrastructure enhances trust, traceability, and operational resilience in industrial environments. IoT devices form the foundation of the system, serving as primary sources of environmental and operational data. These include low-power sensors, actuators, and embedded systems deployed throughout industrial settings to monitor parameters such as temperature, pressure, humidity, and machine status. Typically based on microcontroller units like ESP32 or STM32, these devices operate within constraints related to computational power, memory, and battery life. To facilitate secure communication, they employ lightweight protocols such as MQTT, CoAP, or LoRaWAN for energy-efficient and low-bandwidth data transmission. Basic cryptographic capabilities, such as AES-128, are incorporated to secure data at the source before transmission. Due to their resource-constrained nature, these devices offload complex tasks such as protocol translation and identity verification to secure hubs, ensuring secure upstream communication and preventing unauthorized access. Edge computing nodes act as intermediaries between constrained IoT devices and centralized cloud infrastructure. These nodes perform preprocessing, filtering, and authentication of sensor data before forwarding it to controllers or cloud services. Typically implemented using single-board computers, such as the Raspberry Pi, edge nodes run lightweight operating systems optimized for real-time performance, like Ubuntu Core. They support containerized services like Docker, allowing the modular deployment of applications for anomaly detection, data aggregation, and local decision making. Edge nodes perform cryptographic operations, such as SHA-256 hashing and digital signature generation, to verify data integrity before uploading it to the blockchain. They also implement access control policies and perform the initial validation of both device identities and data authenticity, contributing to system resilience by mitigating DDoS attacks and reducing latency. Controllers serve as central coordination points within the architecture, managing data flow, enforcing security policies, and interfacing with the blockchain layer. Implemented  
Figure 3: The proposed blockchain-based IIoT system architecture. as high-performance embedded systems or virtual machines hosted in private clouds or fog nodes, controllers utilize middleware platforms such as Node-RED and Apache Kafka to process streaming data and handle event-driven logic. They communicate with both edge nodes and blockchain components via RESTful APIs or gRPC-based interfaces, enabling seamless integration across the different layers of the system. Controllers execute smart contracts to automate access control, transaction verification, and policy enforcement, ensuring that only authenticated and validated transactions are recorded on the blockchain. They maintain a local cache of frequently accessed data for fast retrieval, synchronizing this information periodically with the immutable blockchain ledger. As critical components for maintaining data consistency, controllers play a crucial role in preserving the integrity and reliability of the entire system. A secure and indexed database serves as a repository for validated sensor data, supporting long-term storage and analytics. Unlike traditional databases, this component is tightly governed by the controller module to ensure data integrity, traceability, and auditability.