# Secure Data Sharing in Federated Learning through Blockchain-Based Aggregation
## 4 The Enhanced Scheme  
In this section, we describe the enhanced scheme that eliminates the need for any third-party server or bulletin board by integrating blockchain technology. It is worth emphasizing that this scheme aims to address the existing privacy and security challenges in the EIFFeL framework, particularly those related to the third-party bulletin board. Certainly, in our design, we attempt to minimize the complexity overhead for all the involved entities. Our scheme eliminates the need for a central server and any other third party, such as a public bulletin board, thereby mitigating the risks associated with the compromise of such third parties. Similar to EIFFeL, the enhanced scheme assumes a blockchain platform and multiple (\(n\)) clients, and it relies on the same building blocks. In each iteration/epoch, the interactions are shown in Figure 5, where the setup phase is shown in Figure 6 and the numbering of steps corresponds to the description in Figure 7. The overall design of the enhanced scheme is agnostic to any blockchain platform; however, the interaction details between clients and the blockchain (i.e., the smart contracts) may differ in the implementation. To keep the generality and simplicity, we skip the details in our description. The design of smart contracts for the proposed scheme is quite straightforward based on the following fact: when invoking a smart contract, the requester (i.e., a client) can pass the location of necessary input parameters (i.e., where these data are located on the blockchain) so that the smart contract can fetch the data and perform the desired operations in a deterministic manner. To start FL training, the setup phase is depicted in Figure 6, and the training epoch, shown in Figure 7, will be iterated until a satisfactory global model is achieved. By its nature, information stored on a blockchain is not supposed to be updated. In our description in Figure 7, if a piece of information is stored in the blockchain, then it means that a transaction is made to the blockchain to store the information. When we say that a piece of information is updated (e.g., \(C^{*}\)), we simply mean that a new version of this information is stored on the blockchain, and all follow-up computations should be based on this new version of information. Figure 5: System architecture of enhanced scheme. Figure 6: Setup of the Enhanced scheme [27]. 1. **Local model training:** Each client \(\mathcal{C}_{i}\): * Generates its local update, \(\mathbf{n}_{i}\in\mathbb{P}^{d}\), which is a value of \(d\) dimensions. 2. **Model parameter sharing**: The following steps are performed: 1. Each client, \(\mathcal{C}_{i}\), generates its protected parameters as follows: 1. Generates a proof \(\mathbf{\pi}_{i}=(\mathbf{h}_{i},(\mathbf{a}_{i},\mathbf{b}_{i},\mathbf{c}_{i})),\mathbf{h}_{i}\in \mathbb{F}[\mathbb{X}],(\mathbf{a}_{i},\mathbf{b}_{i},\mathbf{c}_{i})\in\mathbb{P}^{3},\bm {a}_{i}\cdot\mathbf{b}_{i}=\mathbf{c}_{i}\) for the computation \(Valid(\mathbf{u})=1\). 2. Creates shares of its update \(\mathbf{u}_{i}\) for all clients, denoted as \(\{(\{\mathbf{u}_{i}\}_{i}\)}\cdots(\{\mathbf{u}_{i},\mathbf{u}_{i},\mathbf{v}_{\mathbf{\pi}_{i}}\} )\gets SS\_share(\mathbf{u},[\mathbf{u}],\mathbf{m}+1)\). 3.