# An Improved Federated Learning-Assisted Data Aggregation Scheme for Smart Grids
## 7 Security Analysis
### Honest But Curious Security  
In this section, the technical principles used in this system for security purposes will be described. Before the user transmits the parameters, we use **PRG** to add pairs of random vectors to the data, which hide the specific information entered by the user, so that the final result obtained by the server is always uniformly random to the result obtained without adding the random vectors. Within our system, the transfer of user data occurs in an environment where all participants are honest but curious. During this process, the users collaboratively engage in computational logic while preserving the utmost confidentiality of their private data. Each participant gains access solely to the computation results, completely oblivious to the data of other participants or the intermediate outcomes of the computation process. This ensures a high level of privacy and security for all involved parties, including both the participants and the server. The system effectively shields the sensitive data from being disclosed, fostering trust and confidentiality among the users, while allowing them to collectively obtain the required results without any compromise on their privacy. We assume that the server \(S\) interacts with a group of \(n\) users, denoted as \(\mathcal{U}\), and the threshold is set to \(t\). Users have the freedom to exit at any point during their interaction with the server. Let \(\mathcal{U}_{i}\) represent the set of users who have sent data to the server in Round \(i-1\) or, in other words, the users who have not exited by Round \(i-1\). Therefore, we have \(\mathcal{U}\supseteq\mathcal{U}_{1}\supseteq\mathcal{U}_{2}\supseteq \mathcal{U}_{3}\supseteq\mathcal{U}_{4}\supseteq\mathcal{U}_{5}\). \(\mathcal{U}_{2}\backslash\mathcal{U}_{3}\) refers to the users who sent data to the server in Round 1 but did not send data within the time limit of Round 2. For any arbitrary subset \(\text{C},\text{REAL}^{\mathcal{U},t,k}(x_{\mathcal{U}},\mathcal{U}_{1}, \mathcal{U}_{2},\mathcal{U}_{3},\mathcal{U}_{4},\mathcal{U}_{5})\) is a random variable representing a collectiveperspective of the parties in C during the execution of the system. In the following, two theorems applied in this system will be given. In a user honest-but-curious environment, the joint view with fewer than t users can only infer its own data. In the server's honest-but-curious environment, the server and the joint view with fewer than t users can only infer the sum of its own data and the other users' data. **Theorem 1**. : _chochasasasasasas\((\)Against Multiple Users\()\) For all \(k\), \(t\), \(\mathcal{U}\), \(xu\), \(\mathcal{U}_{1}\), \(\mathcal{U}_{2}\), \(\mathcal{U}_{3}\), \(\mathcal{U}_{4}\), \(\mathcal{U}_{5}\), \(C\) with \(t<=|\mathcal{U}|\), and \(C\supseteq\mathcal{U}\), \(\mathcal{U}\supseteq\mathcal{U}_{1}\supseteq\mathcal{U}_{2}\supseteq\mathcal{U }_{3}\supseteq\mathcal{U}_{4}\supseteq\mathcal{U}_{6}\), there is a PPT simulator \(\mathrm{SIM}\). The output of \(\mathrm{SIM}\) is identical to \(\mathrm{REAL}_{\mathbb{C}}^{U,t,k}:\)_  
\[\mathrm{REAL}_{\mathbb{C}}^{U,t,k}(x_{\mathcal{U}},\mathcal{U}_{1 },\mathcal{U}_{2},\mathcal{U}_{3},\mathcal{U}_{4},\mathcal{U}_{5})\] \[\equiv\] \[\mathrm{SIM}_{\mathbb{C}}^{U,t,k}(x_{C},\mathcal{U}_{1}, \mathcal{U}_{2},\mathcal{U}_{3},\mathcal{U}_{4},\mathcal{U}_{5})\]  
Proof of Theorem 1.: The collective perspective of users in \(C\) relies only on their own inputs, so it is possible to run their inputs through the simulator and obtain a simulated perspective of users in \(C\) that is consistent with \(\mathrm{REAL}\). The server's response in Round 2 solely consists of a list of user identities without disclosing specific values of \(yu\). As a result, the simulator can execute the inputs of users in \(C\) and utilize hypothetical values to represent the inputs of all honest participants not in \(C\). This ensures that the collective perspective of users in \(C\) in the simulation remains consistent with \(\mathrm{REAL}\).