## 3 Security and Privacy-Preserving Solutions for IoE
### Integration of Different Security Layers
#### 3.5.3 Proposed Integrated Layered Architecture
If the data label indicates \"high confidentiality\", the corresponding model contribution is not shared, ensuring compliance with the privacy policy. The allowed updates are transmitted via the blockchain to be integrated into the global model. During this process, aggregation (such as federated averaging) is performed to construct a new global model. Each edge node performs FL training on its processed data. Updates are sent not directly to the central model but to the aggregator. If the aggregator is decentralized, the model is updated via consensus on the blockchain. Additionally, quantum-resilient encryption is applied during this transmission. ```
0:Filtered_Data_i //Processed data from the \(i\)-th edge device \(M\_local\_i\) //Local model on the edge node \(E\) //Epoch \(\eta\) //Learning rate Output:Model_Update_i //Weight update of the i-th device
1: Initialize M_local_i \(\leftarrow\) Global_Model
2:forepoch = 1 to Edo
3:\(Mini\_Batch\)\(\leftarrow\) CreateBatches(Filtered_Data_i)
4:foreach (\(x\), \(y\)) \(\in\) Mini_Batch do
5:\(y\_pred\)\(\leftarrow\) M_local_i(\(x\))
6:\(\text{loss}\)\(\leftarrow\) ComputeLoss(y_pred, \(y\)) //Update of model parameters (weights and biases)
7: M_local_i \(\leftarrow\) M_local_i \(-\)\(\eta\)\(\
abla\)loss
8:endforeach
9:endfor
10:Model_Update_i \(\leftarrow\) M_local_i \(-\) Global_Model
11:returnModel_Update_i //to aggregator on blockchain or //secure aggregator node
```  
**Algorithm 2**_Federated learning phase on edge devices_  
Following Algorithm 2, Table 17 summarizes the layered structure of the proposed system by mapping each security layer to the specific technology used and its corresponding function. This representation clarifies how FL, blockchain, and quantum-resilient cryptography interact to ensure secure, decentralized, and privacy-preserving model updates in IoE environments. Algorithm 3 Blockchain Logging with Quantum-Resilient EncryptionThe purpose of this algorithm is to utilize a quantum-resistant blockchain for the secure storage and sharing of FL model updates. This algorithm is designed as a chaincode (smart contract) running on a blockchain infrastructure. It ensures that system events are timestamped, immutable, and that authorization processes are enforced. The algorithm securely integrates the model updates generated during the FL process, which are authorized for sharing, into the blockchain network. In the first step, data such as model parameters and training metrics to be transmitted are encrypted using quantum-resistant encryption algorithms. Unlike classical systems like RSA/ECC, these algorithms provide protection \begin{table}
\begin{tabular}{l l l} \hline \hline
**Layer** & **Associated Technology** & **Function** \\ \hline Edge Node & FL (FedAvg/FedSGD) & Local model training \\ \hline Blockchain Layer & Smart Contract + Logging & Model updates are hashed and logged \\ \hline Quantum Resilient Crypto & Lattice/Hash-based Encryption & Secure transmission of FL model updates \\ \hline \hline \end{tabular}
\end{table} 
Table 17: Layer–Technology function mapping of the proposed FL and security architecture. against quantum computer attacks. The encryption schemes are generally based on lattice-based or hash-based cryptography. Subsequently, these encrypted updates are written to the blockchain as a transaction. Each transaction serves both as a historical log and as reference data. Moreover, through the use of hash functions, the integrity and authenticity of the model updates can always be verified. This process ensures not only security but also auditability and traceability, forming a secure and verifiable chain of model development.