IoT-Enabled Fog-Based Secure Aggregation in Smart Grids Supporting Data Analytics
Abstract
1. Introduction
- The Fog-enabled Secure Data Analytics Operations (FESDAO) scheme offers a distributed architecture that supports real-time processing at the fog level while incorporating robust security features such as secure aggregation, authentication, and resilience against insider threats. Privacy and confidentiality of SM data are ensured through modified homomorphic Boneh-Goh-Nissim (mBGN) cryptosystem and other mechanisms. Only FN and CCC can decrypt aggregated data. Moreover, our scheme is resilient against replay attacks and false data injection (FDI) attacks, and it ensures security even in the presence of potentially malicious SM, FN and CCC. In addition, the scheme is resistant against collusive attacks.
- Unlike current state-of-the-art schemes that support statistical analytics on encrypted data only at the CCC after decryption [2,12], our FESDAO scheme enables secure analytical operations such as average, variance, and ANOVA functions directly on encrypted data at both the FN and CCC levels. This capability allows for real-time insights into energy consumption patterns, facilitating the design of dynamic tariff plans. Customers can make informed decisions by selecting optimal tariff plans that align with their consumption patterns. Furthermore, the FESDAO scheme is fault-tolerant, guaranteeing that statistical operation evaluations remain unaffected and latency is not compromised, even in the presence of malfunctioning smart meters It enhances reliability in real-world deployments with intermittent failures.
- The FESDAO scheme has been analyzed for security, statistical function support on encrypted data, computational, and communication overheads. The results are then compared to the current state-of-the-art schemes [2,12], particularly in encryption, aggregation, decryption, and computation cost efficiency. Moreover, a detailed security analysis has been conducted to verify the scheme’s resistance against insider collusion attacks, replay attacks, and false data injection (FDI) attacks
2. Related Work
3. Preliminaries
3.1. BGN Cryptosystem
3.2. Key Generation
3.2.1. Encryption
3.2.2. Decryption
3.3. MAC Algorithm
3.4. Privacy-Preserving Aggregation and Statistical Functions Calculation
3.4.1. Average Calculation
3.4.2. Variance Calculation
3.4.3. ANOVA Calculation
- ANOVA from aggregates (no raw data required):
- Between-groups SS (SSB) = 8.416022
- Within-groups SS (SSW) = 19.935330
- Total SS (SST) = 28.351352
- Degrees of freedom: = 2, = 69
- Mean Squares: MSB = 4.208011, MSW = 0.288918
- F-statistic: F = 14.564734
- p-value ≈ (significant at α = 0.05)
- Reject (equal group means).
- Effect size (eta-squared): η2 = 0.296847 (~29.7% of variance explained by group).
4. System Model and Security Goals
4.1. System Model
4.2. Attacker Model
- An adversary eavesdropping on the communication between SM and CCC.
- External adversaries can manipulate messages from SM to FN or from FN to CCC.
- The adversary goals may include knowing the aggregated and individual SM readings
- SMs do not transmit data due to malfunction.
- An adversary compromising CCC.
- An adversary initiating the following attacks:
- (a)
- Replay attack
- (b)
- FDI attack
- (c)
- Message modification attack
- (d)
- Unauthorized access
- Assumptions
- (a)
- CCC and FN are honest but curious
- (b)
- CCC and FN may collude
- (c)
- Residential users/SMs are considered honest
- (d)
- Communication channel is not secure
4.3. Security Goals
5. Proposed Scheme
Symbol | Description |
---|---|
SM | Smart Meter |
FN | Fog Node |
CCC | Cloud Control Center |
q1 | Private Key of BGN |
(n,G,G1,e,g,h) | Public Key of BGN |
Secret parameter of CCC | |
Secret parameter of SM/User | |
Secret parameter of FN | |
Message text | |
R | Random number |
or | The timestamp for a particular time interval |
Statistical Function calculation request form FN | |
MAC tag generated on at | |
MAC tag generated on received at FN | |
Ciphertext at SM (metering data as m) | |
Ciphertext at SM (metering data as m*m) | |
Buffer storage for the current reading of | |
Data structure contains , , and Flag | |
Flag | Status field, 0 for failed meter, 1 for working meter |
The aggregated ciphertext of all SMs at | |
Aggregated value at CCC | |
Sum of square metering data | |
Hash function using SHA-256 | |
M/ | Sum of all SMs consumption data |
All fog nodes’ aggregated value | |
Working SM | |
Failed SM |
5.1. Key Generation
Algorithm 1. Key generation algorithm. |
|
5.2. Encryption and MAC Generation at SM
Algorithm 2. Encryption and MAC generation algorithm. |
|
5.3. Fault Tolerant Secure Aggregation of Data at FN
Algorithm 3. Aggregation and MAC verification algorithm at FN. |
|
5.4. MAC Verification and Fault-Tolerance Secure Data Aggregation at FN
Algorithm 4. Decryption and MAC verification at FN algorithm. |
|
5.5. Statistical Functions Calculation at FN
Algorithm 5. Statistical functions calculation algorithm. |
|
6. Security and Privacy Analysis
7. Performance Evaluation
- Aggregation costs at the FN and CCC level, as shown in Table 4.
- Communication cost comparison is given in Table 7.
- Comparison of security properties with existing schemes, as shown in Table 8.
- Computation cost of three data analytical operations (average, variance, ANOVA).
Parameter | Value Used |
---|---|
512 bits | |
512 bits | |
Hash Algorithm | 256 bits |
BGN based Aggregation Cost | |||||||
---|---|---|---|---|---|---|---|
Level | Level | Level | CCC | ||||
No# of SMs | Time (ms) | No# of SMs | Time (ms) | No# of SMs | Time (ms) | Total SM | Time (ms) |
100 | 12 | 100 | 11 | 100 | 12 | 300 | 35 |
200 | 30 | 200 | 34 | 200 | 32 | 600 | 98 |
400 | 84 | 300 | 40 | 300 | 43 | 1000 | 167 |
500 | 101 | 400 | 87 | 500 | 81 | 1400 | 269 |
1000 | 166 | 500 | 103 | 500 | 104 | 2000 | 373 |
Level | Encryption | MAC-Generation | MAC-Verification | Decryption |
---|---|---|---|---|
90 per SM | 1 per SM | - | - | |
- | 1 per FN | 2 per SM | 34.1 per 100 SMs | |
CCC | - | - | 2 per FN | 2 per 3 FNs |
7.1. Computation Cost
No. of SM | L. Chen et al. [2] | Y. Chen et al. [12] | Proposed |
---|---|---|---|
100 | 9000 | 2000 | 9000 |
200 | 18,000 | 4000 | 18,000 |
300 | 27,000 | 6000 | 27,000 |
400 | 36,000 | 8000 | 36,000 |
500 | 45,000 | 10,000 | 45,000 |
7.2. Communication Cost
Scheme | Security Parameter | Cipher Text Size | Time Stamp | MAC Generation | SM ID# Size | Per SM Total | For all SMs |
---|---|---|---|---|---|---|---|
Proposed | 512 | 1024 | 32 | 256 | 32 | 1344 | 1344 × N |
L. Chen et al. [2] | 512 | - | - | - | - | 1024 | 1024 × N |
Y. Chen et al. [12] | 1024 | 2048 | 32 | 256 | 32 | 2368 | 2368 × N |
7.3. Fault Tolerance
7.4. Random Meters Addition and Removal
8. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Neoaz, N. Internet of Things (IoT) and Smart Cities: Examine how IoT technologies can improve urban living and infrastructure management. Unpublished Work. 2025; submitted. [Google Scholar]
- Chen, L.; Lu, R.; Cao, Z.; AlHarbi, K.; Lin, X. MuDA: Multifunctional data aggregation in privacy-preserving smart grid communications. Peer-Peer Netw. Appl. 2015, 8, 777–792. [Google Scholar] [CrossRef]
- Baig, Z.A.; Amoudi, A.-R. An analysis of smart grid attacks and countermeasures. J. Commun. 2013, 8, 473–479. [Google Scholar] [CrossRef]
- Khan, H.M.; Khan, A.; Jabeen, F.; Anjum, A.; Jeon, G. Fog-enabled secure multiparty computation based aggregation scheme in smart grid. Comput. Electr. Eng. 2021, 94, 107358. [Google Scholar] [CrossRef]
- Bonomi, F.; Milito, R.; Zhu, J.; Addepalli, S. Fog computing and its role in the internet of things. In Proceedings of the First Edition of the MCC Workshop on Mobile Cloud Computing, Helsinki, Finland, 17 August 2012; pp. 13–16. [Google Scholar]
- Saleem, A.; Khan, A.; Malik, S.U.R.; Pervaiz, H.; Malik, H.; Alam, M.; Jindal, A. FESDA: Fog-Enabled Secure Data Aggregation in Smart Grid IoT Network. IEEE Internet Things J. 2019, 7, 6132–6142. [Google Scholar] [CrossRef]
- Bao, H.; Lu, R. A lightweight data aggregation scheme achieving privacy preservation and data integrity with differential privacy and fault tolerance. Peer-Peer Netw. Appl. 2017, 10, 106–121. [Google Scholar] [CrossRef]
- Lyu, L.; Nandakumar, K.; Rubinstein, B.; Jin, J.; Bedo, J.; Palaniswami, M. PPFA: Privacy preserving fog-enabled aggregation in smart grid. IEEE Trans. Ind. Inform. 2018, 14, 3733–3744. [Google Scholar] [CrossRef]
- Yang, L.; Li, F. Detecting false data injection in smart grid in-network aggregation. In Proceedings of the 2013 IEEE International Conference on Smart Grid Communications (SmartGridComm), Vancouver, BC, Canada, 21–24 October 2013; IEEE: New York, NY, USA, 2013; pp. 408–413. [Google Scholar]
- Fu, S.; Ma, J.; Li, H.; Jiang, Q. A robust and privacy-preserving aggregation scheme for secure smart grid communications in digital communities. Secur. Commun. Netw. 2016, 9, 2779–2788. [Google Scholar] [CrossRef]
- Khan, H.M.; Khan, A.; Jabeen, F.; Rahman, A.U. Privacy preserving data aggregation with fault tolerance in fog-enabled smart grids. Sustain. Cities Soc. 2021, 64, 102522. [Google Scholar] [CrossRef]
- Chen, Y.; Martínez-Ortega, J.-F.; Castillejo, P.; López, L. A homomorphic-based multiple data aggregation scheme for smart grid. IEEE Sens. J. 2019, 19, 3921–3929. [Google Scholar] [CrossRef]
- Shi, Z.; Sun, R.; Lu, R.; Chen, L.; Chen, J.; Shen, X.S. Diverse grouping-based aggregation protocol with error detection for smart grid communications. IEEE Trans. Smart Grid 2015, 6, 2856–2868. [Google Scholar] [CrossRef]
- Borges, F.; Demirel, D.; Böck, L.; Buchmann, J.; Muehlhauser, M. A privacy-enhancing protocol that provides in-network data aggregation and verifiable smart meter billing. In Proceedings of the 2014 IEEE Symposium on Computers and Communications (ISCC), Funchal, Portugal, 23–26 June 2014; IEEE: New York, NY, USA, 2014; pp. 1–6. [Google Scholar]
- Erkin, Z.; Tsudik, G. Private computation of spatial and temporal power consumption with smart meters. In International Conference on Applied Cryptography and Network Security; Springer: Berlin/Heidelberg, Germany, 2012; pp. 561–577. [Google Scholar]
- Tonyali, S.; Akkaya, K.; Saputro, N.; Uluagac, A.S.; Nojoumian, M. Privacy-preserving protocols for secure and reliable data aggregation in IoT-enabled Smart Metering systems. Future Gener. Comput. Syst. 2018, 78, 547–557. [Google Scholar] [CrossRef]
- Abdallah, A.; Shen, X.S. A lightweight lattice-based homomorphic privacy-preserving data aggregation scheme for smart grid. IEEE Trans. Smart Grid 2016, 9, 396–405. [Google Scholar] [CrossRef]
- Thoma, C.; Cui, T.; Franchetti, F. Secure multiparty computation based privacy preserving smart metering system. In Proceedings of the 2012 North American Power Symposium (NAPS), Champaign, IL, USA, 9–11 September 2012; IEEE: New York, NY, USA, 2012; pp. 1–6. [Google Scholar]
- Zhao, S.; Li, F.; Li, H.; Lu, R.; Ren, S.; Bao, H.; Lin, J.-H.; Han, S. Smart and practical privacy-preserving data aggregation for fog-based smart grids. IEEE Trans. Inf. Forensics Secur. 2020, 16, 521–536. [Google Scholar] [CrossRef]
- Zhang, M.; Li, Y.; Ding, Y.; Yang, B. A lightweight and robust multidimensional data aggregation scheme for IoT. IEEE Internet Things J. 2023, 11, 3578–3588. [Google Scholar] [CrossRef]
- Pang, H.; He, K.; Fu, Y.; Liu, J.-N.; Liu, X.; Tan, W. Enabling Efficient and Malicious Secure Data Aggregation in Smart Grid with False Data Detection. IEEE Trans. Smart Grid 2023, 15, 2203–2213. [Google Scholar] [CrossRef]
- Zhang, S.; Chang, J.; Wang, B. A Multidimensional Data Aggregation Scheme of Smart Home in Microgrid with Fault Tolerance and Billing for Demand Response. IEEE Syst. J. 2023, 17, 4639–4649. [Google Scholar] [CrossRef]
- Song, Z.; Zhou, T.; Zhong, W.; Chen, D.; Liu, L.; Yang, X. Fault-tolerant data aggregation scheme supporting fine-grained linear operation in smart grid. IEEE Access 2023, 11, 68525–68537. [Google Scholar] [CrossRef]
- Zhang, X.; You, L.; Hu, G. An efficient and robust multidimensional data aggregation scheme for smart grid based on blockchain. IEEE Trans. Netw. Serv. Manag. 2022, 19, 3949–3959. [Google Scholar] [CrossRef]
- Bellare, M.; Canetti, R.; Krawczyk, H. Keying hash functions for message authentication. In Annual International Cryptology Conference; Springer: Berlin/Heidelberg, Germany, 1996; pp. 1–15. [Google Scholar]
- Boneh, D.; Goh, E.-J.; Nissim, K. Evaluating 2-DNF formulas on ciphertexts. In Theory of Cryptography Conference; Springer: Berlin/Heidelberg, Germany, 2005; pp. 325–341. [Google Scholar]
- Gentry, C.; Halevi, S.; Vaikuntanathan, V. A simple BGN-type cryptosystem from LWE. In Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2010; pp. 506–522. [Google Scholar]
- Menezes, A.J.; Van Oorschot, P.C.; Vanstone, S.A. Handbook of Applied Cryptography, 1st ed.; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar]
- Fisher, R.A. Statistical methods for research workers. In Breakthroughs in Statistics; Springer: New York, NY, USA, 1992; pp. 66–70. [Google Scholar]
- Jung, T.; Li, X.-Y.; Wan, M. Collusion-tolerable privacy-preserving sum and product calculation without secure channel. IEEE Trans. Dependable Secur. Comput. 2014, 12, 45–57. [Google Scholar] [CrossRef]
- Irish Social Science Data Archive. Available online: https://issda.ucd.ie/dataset.xhtml?persistentId=doi:10.7929/ISSDA/BX59EU (accessed on 2 August 2025).
Group | ||||
---|---|---|---|---|
Tariff-A | 24 | 124.62 | 657.476 | 5.1925 |
Tariff-B | 22 | 133.053 | 809.389 | 6.04877 |
Tariff-C | 26 | 151.024 | 870.436 | 5.80862 |
Properties | L. Chen et al. [2] | Y. Chen et al. [12] | Proposed Scheme |
---|---|---|---|
Privacy | ✔ | ✔ | ✔ |
Integrity | ✔ | ✔ | ✔ |
Authentication | ✔ | ✔ | ✔ |
FDI | ✘ | ✔ | ✔ |
Collusive Attack | ✘ | ✘ | ✔ |
Basic Statistical Functions at FN | ✘ | ✘ | ✔ |
Basic Functions at CCC Level | ✔ | ✔ | ✔ |
ANOVA calculation at FN | ✘ | ✘ | ✔ |
ANOVA calculation at CCC | ✘ | ✘ | ✔ |
Fault Tolerance at FN | ✘ | ✘ | ✔ |
Fault Tolerance at FN | ✘ | ✘ | ✔ |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Khan, H.M.; Jabeen, F.; Khan, A.; Waqar, M.; Kim, A. IoT-Enabled Fog-Based Secure Aggregation in Smart Grids Supporting Data Analytics. Sensors 2025, 25, 6240. https://doi.org/10.3390/s25196240
Khan HM, Jabeen F, Khan A, Waqar M, Kim A. IoT-Enabled Fog-Based Secure Aggregation in Smart Grids Supporting Data Analytics. Sensors. 2025; 25(19):6240. https://doi.org/10.3390/s25196240
Chicago/Turabian StyleKhan, Hayat Mohammad, Farhana Jabeen, Abid Khan, Muhammad Waqar, and Ajung Kim. 2025. "IoT-Enabled Fog-Based Secure Aggregation in Smart Grids Supporting Data Analytics" Sensors 25, no. 19: 6240. https://doi.org/10.3390/s25196240
APA StyleKhan, H. M., Jabeen, F., Khan, A., Waqar, M., & Kim, A. (2025). IoT-Enabled Fog-Based Secure Aggregation in Smart Grids Supporting Data Analytics. Sensors, 25(19), 6240. https://doi.org/10.3390/s25196240