Design and Implementation of Microservice Secure Communication Framework based on National Secret Algorithm and Dynamic Key

With the acceleration of the pace of the national electricity reform and the wide application of the micro-service architecture, various network threats in the field of information security are increasing, and the power industry has become the “hardest hit area” for cyber attacks. In order to improve the safe implementation of the National Power Grid’s electronic projects and effectively resist the “malicious exploration” of various network threats, this paper proposes a microservice secure communication framework based on the combination of dynamic keys and national secret algorithms for a high concurrency web system based on microservices. The framework uses the national secret SM2 algorithm to generate session-level paired keys and then generates a digital signature through the SM3 algorithm, which effectively guarantees the integrity of the communication. Finally, it extracts the encryption key and encryption offset from the paired keys and uses the SM4 algorithm to encrypt the original request text payload. Timestamps and random numbers are added to each request to prevent tampering and replay attacks effectively. The system framework has been practically applied on the State Grid’s digital capability open platform, which ensures the security of micro-service communication and the safety and efficient transmission of data.