A Robust Security System Using SHA-512 with Reinforcement Learning in Wireless Sensor Networks
Received: 13 August 2025 | Revised: 12 September 2025 | Accepted: 24 September 2025 | Online: 8 December 2025
Corresponding author: C. Anuradha
Abstract
Routing in Wireless Sensor Networks (WSNs) is highly vulnerable due to the unreliable wireless medium and limited node resources. Routing attacks can severely degrade network performance. This paper proposes a Robust Security system using Reinforcement Learning (RSRL) and the Secure Hash Algorithm 512 (SHA-512) for secure and efficient routing in WSNs. The primary objective of the RSRL mechanism is to detect malicious nodes and enhance system security. In the RSRL mechanism, the Base Station (BS) performs aggregator verification using SHA-512 to ensure data integrity without burdening low-power sensor nodes. A Reinforcement Learning (RL) agent, executed at the BS, dynamically learns optimal policies to detect malicious sensor nodes based on node Response Time ( ), Consumed Energy ( ), and Loss Ratio ( ). The RSRL system selects reliable nodes for route selection to improve routing efficiency. The proposed RSRL model is implemented in Network Simulator 2.35. Simulation results demonstrate a 26.44% improvement in Packet Forwarding Ratio ( ) and 95% detection accuracy compared to a conventional secure routing mechanism. The results confirm that RSRL effectively mitigates routing attacks while maintaining high network performance.
Keywords:
Reinforcement Learning (RL), Wireless Sensor Networks (WSNs), Secure Hash Algorithm 512 (SHA-512), malicious node detection, reward functionDownloads
References
R. Ahmad, R. Wazirali, and T. Abu-Ain, "Machine Learning for Wireless Sensor Networks Security: An Overview of Challenges and Issues," Sensors, vol. 22, no. 13, Jul. 2022, Art. no. 4730. DOI: https://doi.org/10.3390/s22134730
Vikas, B. B. Sagar, and M. Munjul, "Security issues in wireless sensor network – A survey," Journal of Discrete Mathematical Sciences and Cryptography, vol. 24, no. 5, pp. 1415–1427, Jul. 2021. DOI: https://doi.org/10.1080/09720529.2021.1932937
P. William, N. Chinthamu, A. Saxena, T. R. V. Lakshmi, and M. Tiwari, "Integration of Secure Data Communication with Wireless Sensor Network Using Cryptographic Technique," in Forth International Conference on Mobile Radio Communications and 5G Networks, Kurukshetra, India, 2023, pp. 589–605. DOI: https://doi.org/10.1007/978-981-97-0700-3_46
S. Nirmalraj, D. N. S. Ravikumar, Krishnamoorthy, R. Babu, G. Immanuel, and P. Rajasekaran, "Securing data in Wireless Sensor Network using Hybrid ECC + AES Cryptographic Approach," in 2023 International Conference on Innovative Computing, Intelligent Communication and Smart Electrical Systems, Chennai, India, 2023, pp. 1–5. DOI: https://doi.org/10.1109/ICSES60034.2023.10465343
S. Vadlamani, A. Byri, I. Khan, S. Krishnamurthy, O. Goel, and M. Hussien, "A Cryptography-Based Approach to Wireless Sensor Network Security," in Proceedings of International Conference on Next-Generation Communication and Computing, Ghaziabad, India, 2024, pp. 169–182. DOI: https://doi.org/10.1007/978-981-96-3728-7_14
P. Kumar et al., "Machine Learning Enabled Techniques for Protecting Wireless Sensor Networks by Estimating Attack Prevalence and Device Deployment Strategy for 5G Networks," Wireless Communications and Mobile Computing, vol. 2022, no. 1, Apr. 2022, Art. no. 5713092. DOI: https://doi.org/10.1155/2022/5713092
Z. Qu, H. Xu, X. Zhao, H. Tang, J. Wang, and B. Li, "An Energy-Efficient Dynamic Clustering Protocol for Event Monitoring in Large-Scale WSN," IEEE Sensors Journal, vol. 21, no. 20, pp. 23614–23625, Oct. 2021. DOI: https://doi.org/10.1109/JSEN.2021.3103384
S. Hussain et al., "An Adaptive Intrusion Detection System for WSN using Reinforcement Learning and Deep Classification," Arabian Journal for Science and Engineering, vol. 50, no. 15, pp. 12463–12477, Aug. 2025. DOI: https://doi.org/10.1007/s13369-024-09769-x
W. Yang, C. Hou, Y. Wang, Z. Zhang, X. Wang, and Y. Cao, "SAKMS: A Secure Authentication and Key Management Scheme for IETF 6TiSCH Industrial Wireless Networks Based on Improved Elliptic-Curve Cryptography," IEEE Transactions on Network Science and Engineering, vol. 11, no. 3, pp. 3174–3188, May 2024. DOI: https://doi.org/10.1109/TNSE.2024.3363004
G. A. Sukkar and S. Al-Sharaeh, "Enhancing Security in Wireless Sensor Networks: A Machine Learning-based DoS Attack Detection," Engineering, Technology & Applied Science Research, vol. 15, no. 1, pp. 19712–19719, Feb. 2025. DOI: https://doi.org/10.48084/etasr.7191
T. Devapriya, V. Ganesan, and S. Velmurugan, "Efficient Malicious Node Detection in Wireless Sensor Networks using Rabin-Karp Algorithm," International Journal of Advances in Signal and Image Sciences, vol. 10, no. 2, pp. 24–36, Dec. 2024. DOI: https://doi.org/10.29284/IJASIS.10.2.2024.24-36
G. Ramalingam and P. Uthirapathy, "Optimizing Secure Data Transmission in Cognitive IoT-WSN: An Energy-Aware Approach With Hybrid POA-SCA and Block Chain Technology," International Journal of Communication Systems, vol. 38, no. 8, May 2025, Art. no. e70081. DOI: https://doi.org/10.1002/dac.70081
S. Urooj, S. Lata, S. Ahmad, S. Mehfuz, and S. Kalathil, "Cryptographic Data Security for Reliable Wireless Sensor Network," Alexandria Engineering Journal, vol. 72, pp. 37–50, Jun. 2023. DOI: https://doi.org/10.1016/j.aej.2023.03.061
S. E. Mathe, L. Boppana, and R. K. Kodali, "Implementation of Elliptic Curve Digital Signature Algorithm on an IRIS mote using SHA-512," in 2015 International Conference on Industrial Instrumentation and Control, Pune, India, 2015, pp. 445–449. DOI: https://doi.org/10.1109/IIC.2015.7150783
I. Mustafa et al., "RL-MADP: Reinforcement Learning-based Misdirection Attack Prevention Technique for WSN," in 2020 International Wireless Communications and Mobile Computing, Limassol, Cyprus, 2020, pp. 721–726. DOI: https://doi.org/10.1109/IWCMC48107.2020.9148445
J. Tang, H. Xu, M. Wang, T. Tang, C. Peng, and H. Liao, "A Flexible and Scalable Malicious Secure Aggregation Protocol for Federated Learning," IEEE Transactions on Information Forensics and Security, vol. 19, pp. 4174–4187, 2024. DOI: https://doi.org/10.1109/TIFS.2024.3375527
N. U. Bhanu, S. R. Mallick, S. R. Chappidi, and K. Sangeethalakshmi, "RF-SFAD: A Random Forest Model for Selective Forwarding Attack Detection in Mobile Wireless Sensor Networks," International Journal of Advances in Signal and Image Sciences, vol. 11, no. 1, pp. 104–116, Jun. 2025. DOI: https://doi.org/10.29284/IJASIS.11.1.2025.104-116
X. Li, L. Zhou, X. Yin, and J. Ning, "A Security-Enhanced Certificateless Designated Verifier Aggregate Signature Scheme for HWMSNs in the YOSO Model," IEEE Internet of Things Journal, vol. 11, no. 6, pp. 10865–10879, Mar. 2024. DOI: https://doi.org/10.1109/JIOT.2023.3327505
A. Mohamed, A. Salama, and A. Ismail, "Enhancing Ad Hoc Network Security using Palm Vein Biometric Features," Engineering, Technology & Applied Science Research, vol. 15, no. 1, pp. 20034–20041, Feb. 2025. DOI: https://doi.org/10.48084/etasr.9481
K. S. Madhuri and J. Mungara, "Reinforcement Learning for Intrusion Detection and Improving Optimal Route by Cuckoo Search in WSN," Indian Journal of Computer Science and Engineering, vol. 12, no. 6, pp. 1760–1770, Dec. 2021. DOI: https://doi.org/10.21817/indjcse/2021/v12i6/211206024
"kddcup99 | TensorFlow Datasets." TensorFlow. [Online]. Available: https://www.tensorflow.org/datasets/catalog/kddcup99.
Downloads
How to Cite
License
Copyright (c) 2025 C. Anuradha, A. V. Mayakkannan, R. Vinodha, K. Narsimha Reddy, B. Annapurna, T. Bhargava Ramu, T. M. Nithya, C. Srinivasan

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.
