# Analysis of Cryptographic Algorithms to Improve Cybersecurity in the Industrial Electrical Sector
## 6 Conclusions  
The integrity of messages transmitted through GOOSE and R-GOOSE frames is critical for the proper operation of smart grids. Therefore, it is imperative to protect both the integrity and confidentiality of this information. To achieve this, the IEC62351 standard is followed, and AEAD algorithms are considered the most appropriate solution. These algorithms add an extra layer of security while complying with the IEC61850 standard. In conclusion, both standards, IEC62351 and IEC61850-90-5, only propose the use of AES and HMAC algorithms. The assumption that weaknesses are found in these algorithms seriously affects the digital security of IEC61850 communication protocols, leaving them once again exposed to cyber attacks. Having backup cryptographic algorithms is important in continuing to guarantee the digital security of substations under the IEC61850 standard. The study of the ChaCha20 and Poly1305 algorithms was carried out as they are possible substitutes for the AES and HMAC algorithms, with the conclusion that both of these algorithms can satisfactorily adapt to the strict maximum latency requirements that these protocols must sustain.  
In all cases analyzed for both the GOOSE and R-GOOSE frames, it can be concluded that the ChaCha20 and Poly1305 algorithms, either operating individually or as an AEAD algorithm, met the strict time requirements (less than 3 ms) set by the IEC61850 standard. It is worth noting that in several cases, the times obtained were equal to or even shorter than those obtained using the AES algorithm and its variants. It is concluded that the presented algorithms are effective due to their simplicity when compared to standard algorithms.  
Based on the latest test (Table 9), it was verified that the AEAD algorithm (ChaCha20/Poly1305) meets the requirements of the IEC61850 standard for R-GOOSE frames. The total time for generation, verification, communication, and network delay was less than 1 ms, which is a significant result. This verification has not been previously reported for R-GOOSE frames with the AES AEAD algorithm.  
Of the tests carried out, the AEAD algorithm proposed by RFC 8439 is the most notable. This algorithm guarantees the confidentiality, integrity, and authenticity of the GOOSE and R-GOOSE communication protocols within the specified requirements. The performance on the computer that subscribes to these messages with AEAD ChaCha20/Poly1305 digital security is optimal because it first verifies the Poly1305 MAC TAG before decrypting. If the MAC does not match, the frame is immediately discarded without decryption.  
S-GoSV is a valuable tool for laboratory testing to observe GOOSE, SV, R-GOOSE, and R-SV frames with various digital security measures. Future work could combine the ChaCha20 and Poly1305 algorithms to send SV and R-SV frames with digital security, allowing for real-time observation of changes.  
Conceptualization, G.F. and S.D.-C.; methodology, G.F.; software, F.A. and B.S.; validation, B.S.; investigation, F.A. and B.S.; formal analysis, F.A. and B.S.; resources, S.D.-C.; writing--original draft preparation, F.A. and B.S.; review and editing, F.A. and B.S.; supervision, G.F.; project administration, S.D.-C.; funding acquisition, S.D.-C. All authors have read and agreed to the published version of the manuscript  
This research was funded and APC by Ministry of Science and Innovation of Spain under Project PID2022-137680 OB-C32.  
The authors declare no conflicts of interest.