# Secure Data Sharing in Federated Learning through Blockchain-Based Aggregation
## 4 The Enhanced Scheme
If \(\mathcal{C}_{i}\in\mathcal{C}^{*}\), it can raise a dispute. If any successful dispute occurs, all clients abort the protocol. 2. Selects a random number, \(r_{i}\), and generates the Burmester-Desmedt group key agreement material \(g^{\prime}_{i}\); publishes \(g^{\prime\prime}\) on the **blockchain**. 3. Generates \(\mathbf{t}_{k}=(\frac{g^{\prime\prime}_{k}}{g^{\prime\prime}_{k}})^{\top}\) and publishes it on the **blockchain**. 4. Computes the [PERSON] group key as \(\mathbf{c}_{k}=(\mathbf{t}_{k-1})^{\top_{g^{\prime}}}\cdots(\mathbf{t}_{k})^{\top_{k-2}}\), supposing \(l\) clients are participating at this stage; publishes H(\(\mathbf{c}_{k}||_{l}\)) on the **blockchain**. 5. Checks that all other clients possess the same ephemeral keys as \(\mathbf{c}_{k}\). If so, publishes the aggregate \(SE\_enc_{\mathcal{C}_{i}}(\mathcal{C}_{i})\), where \(\mathcal{U}_{i}=\sum_{\mathcal{C}_{i}\
eq c^{\top}}u_{ij}\), on the **blockchain**. 6. **Model parameter aggregation**: Each client, \(\mathcal{C}_{i}\), recovers the final aggregate \(\mathcal{U}\gets robustRecon(\{\mathbf{x},\mathcal{U}_{i}\})_{\mathcal{C}_{i} \
eq c^{\top}}\), after obtaining all the \(\mathcal{U}_{i}\), after decryption. 7. **Model update**: Each client, \(\mathcal{C}_{i}\), resets its local model with the parameters, \(\mathcal{U}\). Figure 7: Training procedures in one iteration/epoch. should be tamper-resistant and will not collude with any entity in the FL system (i.e., none of the clients should be able to collude with the blockchain). For simplicity, we assume there is a secure channel between the blockchain and any client, in the sense that the client will be authenticated for its access to the blockchain, and the communication is protected regarding its integrity. Similar to EIFFeL, we assume that, at most, \(m<\left\lfloor\frac{n}{3}\right\rfloor\) malicious users are tolerated, and the threshold of [PERSON]'s \(t\)-out-of-\(n\) secret sharing scheme is also set as \(t=m+1\). We omit attacks with the single purpose of denial of service (DoS). In practice, such attacks can be prevented by additional security mechanisms. In comparison to the EIFFeL scheme, the major philosophy of the enhanced scheme is to use the blockchain platform to replace both the public bulletin board and the server. To this end, all the actions performed by the blockchain platform are deterministic. Apart from the new setup phase, the following major changes have been made: (1) regarding the fourth comment in Section 3.3, a new verification procedure has been proposed for the blockchain platform to trace the malicious client. (2) Leveraging the blockchain platform, the clients execute a Burmester-Desmedt group key agreement protocol [27] to generate a shared group key. The validity of the key is checked as well. (3) Instead of asking a third party to compute the aggregate, the clients store the encrypted shares under the group key on the blockchain platform, so that they can recover the aggregate locally. In contrast to the EIFFeL scheme, the need for a dedicated server has been eliminated. As a result, the risks following the compromise of the server are also eliminated. By asking the clients to share the credentials and intermediary results on the blockchain platform, the clients can check by themselves the validity of the credentials and results from other users. This is facilitated by making the validation operations deterministic. It is worth stressing that the enhanced scheme preserves all the privacy and integrity properties of the EIFFeL scheme due to the fact that all the security and integrity mechanisms have been kept in the new scheme.