Asymmetric Encryption-Based Secure Data Configuration Method and Related Equipment

By storing the private key in the PLC and employing dual authentication with TLS and CRL checking mechanisms, combined with random value and timestamp verification, the problem of PLC private key exposure is solved, and secure configuration data transmission and tamper-proofing of industrial control systems are achieved.

CN120811658BActive Publication Date: 2026-03-06NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

In industrial control systems, the exposure of PLC private keys makes it easy for private keys to be exposed during security configuration. Existing technologies are not effective in preventing man-in-the-middle attacks on certificates, private keys and initial passwords, and configuration files are easily tampered with or forged.

Method used

A secure data configuration method based on asymmetric encryption is adopted. The PLC's private key is stored in the encryption module. Dual authentication is performed using TLS and CRL checking mechanisms. Combined with binding random values ​​and timestamps to prevent replay, and configuration data is verified by hash value to ensure the security of configuration information.

Benefits of technology

It effectively prevents man-in-the-middle attacks on certificates, private keys, and initial passwords, and prevents configuration programs from being tampered with or forged, thus improving the security and reliability of the encryption protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120811658B_ABST
    Figure CN120811658B_ABST
Patent Text Reader

Abstract

This invention provides a secure data configuration method and related equipment based on asymmetric encryption, relating to the technical field of asymmetric encrypted communication. If the security verification results of the PLC's first CA certificate and the engineering station's second CA certificate are both secure and trustworthy, the PLC and the engineering station perform bidirectional TLS verification. If the handshake verification is successful, the PLC and the engineering station negotiate to generate a temporary symmetric encryption key and establish an encrypted session channel. The engineering station uses the temporary symmetric encryption key to encrypt the configuration information, performs hash calculation on the encrypted configuration information, and signs it using the private key in the second CA certificate. The PLC obtains the signed encrypted configuration information and verifies it using the private key in the second CA certificate. If the verification passes, the PLC binds the configuration data to the PLC chip. This application stores the PLC's private key in the encryption module and employs a dual-mechanism authentication mechanism of TLS and CRL checking, improving the security of the encryption protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of encrypted communication in engineering, and more specifically, to a secure data configuration method and related equipment based on asymmetric encryption. Background Technology

[0002] With the rapid development of technologies such as Industry 4.0, smart manufacturing, and the Industrial Internet of Things (IIoT), traditional Industrial Control Systems (ICS) have transformed from their original closed, localized, and physically isolated architectures into highly interconnected, networked, and intelligent integrated systems. In this development process, programmable logic controllers (PLCs) serve as the core edge computing nodes of ICS, widely deployed in smart factories and critical infrastructures to undertake real-time data acquisition and control tasks.

[0003] To enhance PLC system communication security, the industry has begun to introduce standard security protocols. For example, TLS / SSL is gradually replacing bare plaintext S7 / Modbus communication, supporting methods such as cryptographic negotiation, certificate authentication, and session key protection. Siemens, as a leader in the industrial control equipment market, has introduced the TLS 1.2 / 1.3 protocol on its S7-1200 / 1500 series controllers, establishing a technical framework for two-way authentication and secure communication between the PLC and the engineering programming station. However, when the programmable logic controller's private key is exposed, such as during secure configuration between the PLC and the engineering station, the programmable logic controller's private key can be easily exposed. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a secure data configuration method based on asymmetric encryption, as well as a storage medium.

[0005] Firstly, a secure data configuration method based on asymmetric encryption is applied to an industrial system. The industrial system includes a programmable logic controller (PLC) and an engineering station. The PLC performs asymmetric encrypted communication based on a first RSA / ECC key pair. An encryption module is built into the PLC chip, storing the private key from the first RSA / ECC key and the PLC device fingerprint. The engineering station performs asymmetric encrypted communication based on a second RSA / ECC key pair. The method includes:

[0006] In response to the download configuration request, the programmable logic controller obtains the second CA certificate installed on the engineering station and performs security verification on the second CA certificate. The engineering station obtains the first CA certificate installed on the programmable logic controller and verifies the security of the first CA certificate. The first CA certificate is bound to the public key information in the first RSA / ECC key and the PLC fingerprint information. The second CA certificate is bound to the engineering station device information and the public key in the second RSA / ECC key.

[0007] If the security verification results of the first CA certificate and the second CA certificate are both secure and trustworthy, the programmable logic controller and the engineering station perform bidirectional TLS verification.

[0008] If the handshake verification is successful, the programmable logic controller and the engineering station negotiate to generate a temporary symmetric encryption key and establish an encrypted session channel;

[0009] The engineering station uses the temporary symmetric encryption key to encrypt the configuration information, performs a hash calculation on the encrypted configuration information, and then signs it using the private key in the second CA certificate to generate signed encrypted configuration information. The configuration information includes: configuration data, a first timestamp, and a random number. The random number and the first timestamp are used for anti-replay verification.

[0010] The programmable logic controller obtains the signed encrypted configuration information and uses the public key in the second CA certificate to perform signature verification and anti-replay verification on the signed encrypted configuration information.

[0011] If the verification passes, the programmable logic controller (PLC) binds the configuration data to the PLC chip.

[0012] In the embodiments provided in this application, the PLC's private key is stored in the encryption module, making it impossible to send the private key back. During PLC security configuration, a dual authentication mechanism of TLS and CRL is used to prevent the use of self-signed certificates to forge clients for configuration injection. This prevents man-in-the-middle attacks on certificates, private keys, and initial passwords. In the configuration file, random values ​​and timestamps are bound to prevent replay, and hash values ​​are used to verify the original configuration data to prevent the configuration program from being tampered with or forged, thus improving the security of the encryption protocol.

[0013] One possible approach is that, in response to the download configuration request, the programmable logic controller obtains a second CA certificate installed on the engineering station and performs security verification on the second CA certificate; in the step where the engineering station obtains a first CA certificate installed on the programmable logic controller and verifies the security of the first CA certificate:

[0014] The programmable logic controller specifically verifies whether the second CA certificate is blacklisted, whether it is within its validity period, and whether it belongs to the same CA server as the first CA certificate.

[0015] The engineering station specifically verifies whether the first CA certificate is blacklisted, whether it is within its validity period, and whether it belongs to the same CA server as the second CA certificate.

[0016] One possible approach is that, in the step where, if both the first CA certificate and the second CA certificate are verified as secure and trustworthy, the programmable logic controller (PLC) and the engineering station perform bidirectional TLS authentication; and if the handshake authentication is successful, the PLC and the engineering station construct a temporary symmetric encryption key, the engineering station performs TLS authentication on the PLC in the following manner:

[0017] The programmable logic controller acquires handshake data and generates a first hash digest based on the handshake data using a hash algorithm;

[0018] The first hash digest is signed using a temporary private key to generate a first signature structure, wherein the temporary private key is generated by binding the private key in the first RSA / ECC key with a second timestamp and then encapsulating it using the AES key encapsulation mechanism;

[0019] The first signature structure is sent to the engineering station, and the engineering station verifies the first signature structure.

[0020] One possible approach is that, in the step where, if both the first CA certificate and the second CA certificate are verified as secure and trustworthy, the programmable logic controller (PLC) performs bidirectional TLS authentication with the engineering station; and if the handshake authentication is successful, the PLC constructs a temporary symmetric encryption key with the engineering station. In this step, the PLC performs TLS authentication on the engineering station in the following manner:

[0021] The engineering station acquires handshake data and generates a third hash digest based on the handshake data using a hash algorithm;

[0022] The third hash digest is signed using the public key in the second RSA / ECC key pair to generate a second signature structure;

[0023] The second signature structure is sent to the programmable logic controller, and the second signature structure is verified using the public key in the second RSA / ECC key in the second CA certificate.

[0024] One possible approach is that the handshake data includes: a random number generated by the programmable logic controller, a random number generated by the engineering station, and key exchange parameters.

[0025] One possible approach is that the programmable logic controller obtains the signed encrypted configuration information and uses the public key in the second CA certificate to perform signature verification and anti-replay verification on the signed encrypted configuration information, including the following steps:

[0026] The programmable logic controller extracts the public key from the second RSA / ECC key from the second CA certificate, decrypts the signed encrypted configuration information, and obtains the hash structure and encrypted configuration information.

[0027] The encrypted configuration information is hashed, and the hash result is compared with the hash structure. If the comparison result matches, the signature verification is successful.

[0028] The encrypted configuration information is decrypted using the temporary symmetric encryption key to obtain a verification random value and a first timestamp;

[0029] If the verification random value appears for the first time and the first timestamp is within its validity period, the anti-replay verification passes.

[0030] One possible approach is for the programmable logic controller to install the first CA certificate in the following manner:

[0031] In response to the initialization command, the first RSA / ECC key pair is randomly generated, and the private key in the first RSA / ECC key pair is stored in the encryption module of the chip in the programmable logic controller;

[0032] Generate a certificate signing request, the certificate signing request including: the public key in the first RSA / ECC key pair and the PLC device fingerprint;

[0033] The certificate signing request is sent to the CA server;

[0034] Install the first CA certificate. The first CA certificate is generated by the CA server in response to the certificate signing request, performing a hash calculation on the content formed by the certificate signing request, and then signing it using the CA private key.

[0035] Secondly, this application provides a secure data configuration device based on asymmetric encryption, applied to an industrial system. The industrial system includes a programmable logic controller (PLC) and an engineering station. The PLC performs asymmetric encrypted communication based on a first RSA / ECC key pair. The PLC chip has an encryption module internally configured to store the private key from the first RSA / ECC key and the PLC device fingerprint. The engineering station performs asymmetric encrypted communication based on a second RSA / ECC key pair. The method includes:

[0036] Response module: Used to respond to a download configuration request, wherein the programmable logic controller obtains a second CA certificate installed on the engineering station and performs security verification on the second CA certificate, and the engineering station obtains a first CA certificate installed on the programmable logic controller and verifies the security of the first CA certificate, wherein the first CA certificate is bound to the public key information in the first RSA / ECC key and the PLC fingerprint information, and the second CA certificate is bound to the engineering station device information and the public key in the second RSA / ECC key;

[0037] Verification module: If the security verification results of the first CA certificate and the second CA certificate are both secure and trustworthy, the programmable logic controller and the engineering station shall perform bidirectional TLS verification.

[0038] Module construction: If the handshake verification is successful, the programmable logic controller and the engineering station negotiate to generate a temporary symmetric encryption key and establish an encrypted session channel;

[0039] The generation module is used by the engineering station to encrypt the configuration information using the temporary symmetric encryption key, and then perform hash calculation on the encrypted configuration information and sign it using the private key in the second CA certificate to generate signed encrypted configuration information. The configuration information includes: configuration data, a first timestamp, and a verification random value. The verification random value and the first timestamp are used for anti-replay verification.

[0040] Verification module: used by the programmable logic controller to obtain the signed encrypted configuration information and to perform signature verification and anti-replay verification on the signed encrypted configuration information using the public key in the second CA certificate;

[0041] Binding module: If the verification passes, the programmable logic controller binds the configuration data to the programmable logic controller chip.

[0042] Thirdly, this application provides an electronic device, comprising:

[0043] At least one processor; and

[0044] At least one memory communicatively connected to the processor, wherein:

[0045] The memory stores program instructions that can be executed by the processor, which can invoke the program instructions to perform the method as described in the first aspect.

[0046] Fourthly, this application provides a computer-readable storage medium that stores computer instructions that cause the computer to perform the method described in the first aspect.

[0047] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0049] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0050] Figure 1 A flowchart of a secure data configuration method based on asymmetric encryption is provided for embodiments of this application;

[0051] Figure 2 A timing diagram of a secure data configuration method based on asymmetric encryption provided in this application embodiment;

[0052] Figure 3 A flowchart illustrating another secure data configuration method based on asymmetric encryption provided in this application embodiment;

[0053] Figure 4 A timing diagram of another secure data configuration method based on asymmetric encryption provided in the embodiments of this application;

[0054] Figure 5 A structural diagram of a secure data configuration device based on asymmetric encryption is provided in an embodiment of this application;

[0055] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] With the rapid development of technologies such as Industry 4.0, smart manufacturing, and the Industrial Internet of Things (IIoT), traditional Industrial Control Systems (ICS) have transformed from their original closed, localized, and physically isolated architectures into highly interconnected, networked, and intelligent integrated systems. In this development process, programmable logic controllers (PLCs) serve as the core edge computing nodes of ICS, widely deployed in smart factories and critical infrastructures to undertake real-time data acquisition and control tasks.

[0058] To enhance PLC system communication security, the industry has begun to introduce standard security protocols. For example, TLS / SSL is gradually replacing bare plaintext S7 / Modbus communication, supporting methods such as cryptographic negotiation, certificate authentication, and session key protection. Siemens, as a leader in the industrial control equipment market, has introduced the TLS 1.2 / 1.3 protocol on its S7-1200 / 1500 series controllers, establishing a technical framework for two-way authentication and secure communication between the PLC and the engineering programming station. However, when the programmable logic controller's private key is exposed, such as during secure configuration between the PLC and the engineering station, the programmable logic controller's private key can be easily exposed.

[0059] To address the aforementioned problems, this application provides a secure data configuration method, apparatus, electronic device, and storage medium based on asymmetric encryption, aiming to resolve at least some of the aforementioned issues.

[0060] First, the relevant data provided in this application will be explained:

[0061] Engineering Station: A fully integrated automation software development platform that supports programmable controller configuration, programming, simulation, debugging, and deployment.

[0062] TLS is a cryptographic protocol used to establish an encrypted communication channel between a client and a server to ensure data confidentiality, integrity, and authentication.

[0063] Reference Figure 1 and Figure 2 This application provides a secure data configuration method based on asymmetric encryption, applicable to industrial systems.

[0064] In the embodiments provided in this application, the industrial system includes a programmable logic controller (PLC) and an engineering station. The PLC performs asymmetric encrypted communication based on a first RSA / ECC key pair. That is, the private key of the PLC corresponds to the private key in the first RSA / ECC key pair, and the public key of the PLC corresponds to the public key in the first RSA / ECC key pair.

[0065] In the embodiments provided in this application, the PLC chip is provided with an encryption module, which is used to store the private key in the first RSA / ECC key and the PLC device fingerprint.

[0066] Specifically, the private key in the first RSA / ECC key is used for signing with the public key in the second CA certificate after the following access strategy and hash calculation: the private key is set to be non-exportable / non-forwardable.

[0067] The engineering station uses the second RSA / ECC key pair for asymmetric encrypted communication. That is, the private key in the second RSA / ECC key pair corresponds to the private key of the engineering station, and the public key in the second RSA / ECC key pair corresponds to the public key of the engineering station.

[0068] Reference Figure 1 The embodiments provided in this application specifically include the following steps:

[0069] S10: In response to the download configuration request, the PLC obtains the second CA certificate installed on the engineering station and performs security verification on the second CA certificate. The engineering station obtains the first CA certificate installed on the PLC and performs security verification on the first CA certificate.

[0070] In the embodiments provided in this application, the first CA certificate is bound to the public key information in the first RSA / ECC key and the PLC fingerprint information, while the second CA certificate is bound to the engineering station equipment information and the public key in the second RSA / ECC key.

[0071] In this step, the PLC verifies the trustworthiness of the second CA certificate. Specifically, the PLC verifies whether the second CA certificate is blacklisted, whether it is valid, and whether it belongs to the same CA server as the first CA certificate.

[0072] Correspondingly, the engineering station specifically verifies whether the first CA certificate is blacklisted, whether it is within its validity period, and whether it belongs to the same CA server as the second CA certificate.

[0073] S20: If the security verification results of the first CA certificate and the second CA certificate are both secure and trustworthy, the PLC and the engineering station perform bidirectional TLS verification.

[0074] TLS is a cryptographic protocol used to establish encrypted communication channels between clients and servers, ensuring data confidentiality, integrity, and authentication. In industrial control systems, TLS effectively prevents eavesdropping or tampering by performing TLS hash calculations and signing processes such as remote PLC access and configuration distribution using the public key in a second CA certificate.

[0075] In this step, using symmetric encryption, the PLC and the engineering station communicate and negotiate to construct a temporary symmetric encryption key. Specifically, the Advanced Encryption Standard (AES) can be used to construct the temporary symmetric encryption key.

[0076] S30: If the handshake verification is successful, the PLC and the engineering station negotiate to generate a temporary symmetric encryption key and establish an encrypted session channel.

[0077] In this step, based on the aforementioned S20, an encrypted session channel is established using a TLS handshake, and the configuration information is encrypted using a symmetric encryption key, that is, a TLS two-way authentication and CRL check mechanism are adopted.

[0078] In some embodiments, in the embodiments provided in this application, in addition to using the CRL check mechanism to verify the security of the CA certificate, TLS two-way authentication is used for dual authentication, which improves the security of the verification.

[0079] In this embodiment, the signed encrypted configuration information can be transmitted using an encrypted session channel based on the Secure Copy Protocol (SCP).

[0080] In some embodiments, in addition to the authentication methods described above, dynamic fingerprint technology is also used to track expired certificates / identities.

[0081] S40: The engineering station uses a temporary symmetric encryption key to encrypt the configuration information, performs a hash calculation on the encrypted configuration information, and then uses the private key in the second CA certificate to sign it, generating signed encrypted configuration information.

[0082] Here, the configuration information includes: configuration data, first timestamp, and verification random value. The verification random value and first timestamp are used for anti-replay verification.

[0083] Specifically, in each configuration data transmission, two mechanisms, a "timestamp" and a "nonce," are introduced to jointly transmit uniqueness and validity. Before the engineering station prepares to send configuration data, it generates a timer to determine the current system time and a highly randomized unique nonce, thus generating the first timestamp and the verification nonce.

[0084] S50: The PLC obtains the signed encrypted configuration information and uses the public key in the second CA certificate to perform signature verification and anti-replay verification on the signed encrypted configuration information. If the verification passes, the PLC binds the configuration data to the PLC chip.

[0085] In this step, after the PLC obtains the signed encrypted configuration information, it performs signature verification on the signed encrypted configuration information to determine whether the configuration information comes from a trusted deployment source. It also uses a random value and the first timestamp for anti-replay verification to prevent the configuration data from being replayed. At the same time, since the PLC's private key is always stored in the encryption module and there is no private key return mechanism, and the PLC's private key is not exposed during the TLS handshake, man-in-the-middle attacks cannot intercept the certificate, private key, and initial password, thus improving the security of the encryption protocol.

[0086] Therefore, in the embodiments provided in this application, the PLC's private key is stored in the encryption module, making it impossible to send the private key back. During PLC security configuration, a dual authentication mechanism of TLS and CRL is used to prevent the use of self-signed certificates to forge clients for configuration injection. This prevents man-in-the-middle attacks on certificates, private keys, and initial passwords. In the configuration file, random values ​​and timestamps are bound to prevent replay, and hash values ​​are used to verify the original configuration data to prevent the configuration program from being tampered with or forged, thus improving the security of the encryption protocol.

[0087] The following will describe the specific steps involved in the aforementioned TLS authentication.

[0088] As mentioned above, the PLC and the engineering station need to perform bidirectional authentication. In this step, the engineering station performs TLS authentication on the PLC using the following method:

[0089] First, the PLC signs the first hash digest using a temporary private key to generate the first signature structure.

[0090] It should be noted that, as mentioned above, the PLC first acquires the handshake data and then uses a hash algorithm to generate the first hash digest based on the handshake data.

[0091] Here, the handshake data refers to the handshake data used during engineering station authentication. Specifically, the engineering station random number, the programmable controller random number, and the key exchange parameters (such as ECDHE parameters) form a structure that generates the handshake data. Then, the handshake data is hashed to generate the aforementioned first hash digest.

[0092] At the same time, the PLC first binds the private key in the first RSA / ECC key to the second timestamp, and then uses the AES key encapsulation mechanism to encapsulate and generate it.

[0093] Specifically, AES is used to bind a timestamp to the original key. This second timestamp can be used to generate a temporary private key for the timer. The private key in the first RSA / ECC key is combined with this timestamp to form a data block. The AES key encapsulator is then used to encapsulate the data block, thereby ensuring that the original private key is not exposed. Indirect signing is also used to ensure that the original private key is not exposed.

[0094] After a temporary private key is generated, the PLC uses the temporary private key to sign the first hash digest, generating the first signature structure, and sends the first signature structure to the engineering station, which then verifies the first signature structure.

[0095] Specifically, the first signature structure includes handshake data, a first hash digest, and a temporary private key.

[0096] To verify the first signature structure and confirm that the PLC is correctly holding the private key, the public key in the first RSA / ECC key of the first CA certificate is extracted to decrypt the first signature structure, thus obtaining the first hash digest.

[0097] Then, a second hash digest is generated based on the handshake data in the first signature structure using a hash algorithm. If the second hash digest matches the first hash digest, the first signature structure is successfully authenticated.

[0098] Correspondingly, the PLC also needs to authenticate the identity of the engineering station. Specifically, firstly, the engineering station obtains the handshake data and generates a third hash digest based on the handshake data using a hash algorithm. Then, the engineering station signs the third hash digest using the public key in the second RSA / ECC key pair to generate a second signature structure and sends the second signature structure to the PLC.

[0099] Finally, the PLC receives the second signature structure and verifies it based on the public key in the second RSA / ECC key in the second CA certificate.

[0100] Specifically, in this step, the PLC first extracts the public key from the second RSA / ECC key in the second CA certificate to decrypt the second signature structure, obtains the third hash digest and the handshake data in the second signature structure, generates a fourth hash digest from the handshake data in the second signature structure using a hash algorithm, and verifies the fourth hash digest and the third hash digest. If the third hash digest matches the fourth hash digest, the second signature structure is successfully authenticated.

[0101] By using the above method, both-way authentication of TLS is completed. At the same time, the PLC's private key is never exposed during this step, which improves the security of the TLS handshake.

[0102] The following will describe the steps for obtaining the signed encrypted configuration information from the S50 PLC and performing signature verification and anti-replay verification on the signed encrypted configuration information using the public key in the second CA certificate:

[0103] In this step, a random value is recorded in the PLC as a unique identifier, either stored or in temporary memory, while the timing (i.e., the first timestamp) ensures that the entire configuration identifier has "short-term real-time validity." This design provides time verification and final protection, effectively preventing data from being intercepted and replayed by third parties, thereby ensuring the security and consistency of configuration operations.

[0104] Reference Figure 3 As a preferred embodiment, this step specifically includes the following steps:

[0105] S501: The PLC extracts the public key from the second RSA / ECC key of the second CA certificate, decrypts the signed encrypted configuration information, and obtains the hash structure and encrypted configuration information.

[0106] In some embodiments, the PLC also authenticates the validity of the signature in the encrypted configuration information after it has been signed.

[0107] S502: Perform a hash calculation on the encrypted configuration information and compare the result of the hash calculation with the hash structure. If the comparison results are consistent, the signature verification is successful.

[0108] S503: Decrypt the encrypted configuration information using the temporary symmetric encryption key to obtain a verification random value and a first timestamp.

[0109] The above methods ensure that the configuration information is not tampered with, guarantee the integrity of the transmitted data, and verify the CA certificate of the engineering station, thus ensuring that the engineering station comes from a reliable deployment source.

[0110] S504: If the verification random value appears for the first time and the first timestamp is within the validity period, the anti-replay verification passes.

[0111] In summary, the random value is recorded in the PLC as a unique identifier in storage or temporary memory. If the random value appears for the first time, it indicates that the data packet has appeared for the first time. If the timestamp is valid, it indicates that the configuration file has appeared for the first time.

[0112] In the embodiments provided in this application, random values ​​and timestamps are added to the configuration information to prevent replay of the configuration file, and the configuration file is signed with the engineering station's private key, which can effectively ensure that the configuration data comes from a reliable deployment source.

[0113] Reference Figure 4 Based on the foregoing embodiments, the following will describe the installation method of the first CA certificate in this application:

[0114] In the embodiments provided in this application, when the PLC is first started or forcibly initialized, it generates an initialization instruction. In response to the initialization instruction, the PLC randomly generates a first RSA / ECC key pair and stores the private key of the first RSA / ECC key pair in the encryption module of the chip in the PLC.

[0115] Then, a certificate signing request is generated, which includes the public key from the first RSA / ECC key pair and the PLC device fingerprint.

[0116] A PLC device fingerprint is a unique identifier for a PLC device, specifically a unique ID for the PLC.

[0117] Once a certificate signing request is generated, the CA server responds by generating the certificate signing request content, which is the content generated by the certificate signing request.

[0118] As can be seen from the foregoing, the content formed by the certificate signing request includes: the public key in the first RSA / ECC key pair and the PLC device fingerprint.

[0119] At the same time, the CA server also verifies the PLC's ID and signs the content formed by the certificate signing request using the CA's private key, thereby generating a CA certificate, such as a standard X.509 certificate.

[0120] Thus, the first CA certificate is generated. The engineering station sends the first CA certificate to the PLC, and the PLC installs the first CA certificate. The PLC only saves the signature body and the private key in the first RSA / ECC key pair.

[0121] By using the above methods, it is possible to install CA certificates without exposing the private key. The lifecycle of the private key and certificate is generated autonomously by the device and strongly bound to the PLC's own hardware, ensuring that the key is unique and cannot be extracted.

[0122] Based on the aforementioned embodiments, as a preferred embodiment, when configuring access and executing business records, the behavior trajectory needs to be recorded through the PLC log mechanism. Detailed records of abnormal behavior are maintained, such as duplicate signature mismatch, TLS handshake failure, and unauthorized access. All log data can be sent to the analysis module.

[0123] Reference Figure 5 This application provides a secure data configuration device based on asymmetric encryption, applied to an industrial system. The industrial system includes a PLC and an engineering station. The PLC performs asymmetric encrypted communication based on a first RSA / ECC key pair. The PLC chip has an encryption module built in, which stores the private key in the first RSA / ECC key and the PLC device fingerprint. The engineering station performs asymmetric encrypted communication based on a second RSA / ECC key pair. The method includes:

[0124] Response module: Used to respond to the download configuration request. The PLC obtains the second CA certificate installed on the engineering station and performs security verification on the second CA certificate. The engineering station obtains the first CA certificate installed on the PLC and verifies the security of the first CA certificate. The first CA certificate is bound to the public key information in the first RSA / ECC key and the PLC fingerprint information. The second CA certificate is bound to the engineering station device information and the public key in the second RSA / ECC key.

[0125] Verification module: Used to perform bidirectional TLS verification between the PLC and the engineering station if both the first CA certificate and the second CA certificate are verified as secure and trustworthy.

[0126] Module construction: If the handshake verification is successful, the PLC and the engineering station negotiate to generate a temporary symmetric encryption key and establish an encrypted session channel;

[0127] The generation module is used by the engineering station to encrypt the configuration information using a temporary symmetric encryption key, and then perform hash calculation on the encrypted configuration information and sign it using the private key in the second CA certificate to generate signed encrypted configuration information. The configuration information includes: configuration data, a first timestamp, and a verification random value. The verification random value and the first timestamp are used for anti-replay verification.

[0128] Verification module: Used by the PLC to obtain the signed encrypted configuration information and to perform signature verification and anti-replay verification on the signed encrypted configuration information using the public key in the second CA certificate;

[0129] Binding module: If the verification passes, the PLC will bind the configuration data to the PLC chip.

[0130] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0132] Figure 6 A block diagram is shown that is suitable for implementing embodiments of the present invention. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0133] like Figure 6 As shown, the electronic device is represented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: one or more processors 410, memory 430, and communication bus 440 connecting different system components (including memory 430 and processor 410).

[0134] Communication bus 440 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MAC) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.

[0135] Electronic devices typically include a variety of computer-readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, and removable and non-removable media.

[0136] Memory 430 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Memory 430 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.

[0137] A program / utility having a set (at least one) of program modules can be stored in memory 430. Such program modules include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules typically perform the functions and / or methods described in the embodiments of this invention.

[0138] Processor 410 executes various functional applications and data processing by running programs stored in memory 430, such as implementing embodiments of the present invention. Figures 1-3 The method provided in the illustrated embodiment.

[0139] This invention provides a non-transitory computer-readable storage medium that stores computer instructions, which cause a computer to execute embodiments of this invention. Figures 1-3The method provided in the illustrated embodiment.

[0140] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in connection with an instruction execution system, apparatus, or device.

[0141] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0142] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0143] Computer program code for performing the operations of embodiments of the present invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] The foregoing has described specific embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0145] In the description of the embodiments of the present invention, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In the embodiments of the present invention, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in the embodiments of the present invention, as well as the features of the different embodiments or examples.

[0146] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of embodiments of the present invention, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0147] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.

[0148] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0149] It should be noted that the terminals involved in the embodiments of the present invention may include, but are not limited to, personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, MP3 players, MP4 players, etc.

[0150] In the embodiments provided in this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0151] Furthermore, in the various embodiments of the present invention, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0152] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute partial steps of the methods in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0153] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A secure data configuration method based on asymmetric encryption applied to an industrial system, characterized in that, The industrial system comprises a programmable logic controller and an engineering station, the programmable logic controller performs asymmetric encryption communication based on a first RSA / ECC key pair, an encryption module is arranged in a chip of the programmable logic controller, the encryption module is used for storing a private key in the first RSA / ECC key and a PLC device fingerprint, the engineering station performs asymmetric encryption communication based on a second RSA / ECC key pair, and the method comprises the following steps: In response to a download configuration request, the programmable logic controller acquires a second CA certificate installed in the engineering station and performs security verification on the second CA certificate, the engineering station acquires a first CA certificate installed in the programmable logic controller and performs security verification on the first CA certificate, wherein the first CA certificate binds public key information in the first RSA / ECC key and PLC fingerprint information, and the second CA certificate binds engineering station device information and public key information in the second RSA / ECC key; If the security verification results of the first CA certificate and the second CA certificate are both safe and reliable, the programmable logic controller and the engineering station perform bidirectional TLS verification; If the handshake verification is successful, the programmable logic controller and the engineering station negotiate to generate a temporary symmetric encryption key and construct an encrypted session channel; The engineering station encrypts configuration information by using the temporary symmetric encryption key, performs hash calculation on the encrypted configuration information to generate a hash structure, signs the hash structure by using a private key in the second CA certificate, and generates signed encrypted configuration information, wherein the configuration information comprises configuration data, a first timestamp and a check random value, and the check random value and the first timestamp are used for anti-replay check; The programmable logic controller acquires the signed encrypted configuration information, performs signature verification and anti-replay check on the signed encrypted configuration information by using a public key in the second CA certificate, and if the check is passed, the programmable logic controller binds the configuration data with a programmable logic controller chip.

2. The method of claim 1, wherein, in the steps of: In response to a download configuration request, the programmable logic controller acquires a second CA certificate installed in the engineering station and performs security verification on the second CA certificate, the engineering station acquires a first CA certificate installed in the programmable logic controller and performs security verification on the first CA certificate, wherein the first CA certificate binds public key information in the first RSA / ECC key and PLC fingerprint information, and the second CA certificate binds engineering station device information and public key information in the second RSA / ECC key; The programmable logic controller specifically verifies whether the second CA certificate is listed in a blacklist, whether it is within a valid period, and whether it belongs to the same CA server as the first CA certificate; The engineering station specifically verifies whether the first CA certificate is listed in a blacklist, whether it is within a valid period, and whether it belongs to the same CA server as the second CA certificate.

3. The method of claim 1, wherein, If the first CA certificate and the second CA certificate are both safe and credible, the programmable logic controller and the engineering station perform two-way TLS verification, and if the handshake verification is successful, the programmable logic controller and the engineering station build a temporary symmetric encryption key, wherein the engineering station performs TLS authentication on the programmable logic controller in the following manner: The programmable logic controller obtains handshake data and generates a first hash digest based on the handshake data by using a hash algorithm; The first hash digest is signed by using a temporary private key to generate a first signature structure, wherein the temporary private key is generated by binding a private key in the first RSA / ECC key pair with a second timestamp and then encapsulating the result by using an AES key encapsulation mechanism; The first signature structure is sent to the engineering station, and the engineering station verifies the first signature structure.

4. The method of claim 3, wherein, if the first CA certificate and the second CA certificate are both safe and credible, the programmable logic controller and the engineering station perform two-way TLS verification, and if the handshake verification is successful, the programmable logic controller and the engineering station build a temporary symmetric encryption key, wherein the programmable logic controller performs TLS authentication on the engineering station in the following manner: The engineering station obtains handshake data and generates a third hash digest based on the handshake data by using a hash algorithm; The third hash digest is signed by using a public key in the second RSA / ECC key pair to generate a second signature structure; The second signature structure is sent to the programmable logic controller, and the second signature structure is verified by using a public key in the second RSA / ECC key in the second CA certificate. The handshake data includes a random number generated by the programmable logic controller, a random number generated by the engineering station, and a key exchange parameter.

5. The method of claim 4, wherein, The step of the programmable logic controller obtaining the signed encrypted configuration information and performing signature verification and copy protection verification on the signed encrypted configuration information by using the public key in the second CA certificate comprises:

6. The method according to any one of claims 1 to 5, characterized in that, The programmable logic controller extracts a public key in the second RSA / ECC key based on the second CA certificate, decrypts the signed encrypted configuration information, obtains a hash structure and encrypted configuration information, and performs hash calculation on the encrypted configuration information and compares the result with the hash structure, and if the comparison result is consistent, the signature verification is passed; The encrypted configuration information is decrypted by using the temporary symmetric encryption key to obtain a verification random value and a first timestamp; If the verification random value appears for the first time and the first timestamp is within a valid period, the copy protection verification is passed. The programmable logic controller installs the first CA certificate in the following manner: In response to an initialization instruction, the first RSA / ECC key pair is randomly generated, and a private key in the first RSA / ECC key pair is stored in an encryption module in a chip in the programmable logic controller.

7. The method of claim 6, wherein, ​ ​ generating a certificate signing request, the certificate signing request comprising: a public key in a first RSA / ECC key pair and a PLC device fingerprint; sending the certificate signing request to a CA server; installing a first CA certificate, the first CA certificate being generated by the CA server in response to the certificate signing request, the CA server hashing the content of the certificate signing request and signing the hashed content with a CA private key.

8. A secure data provisioning apparatus based on asymmetric encryption, characterized by, The method is applied to an industrial system, the industrial system comprising a programmable logic controller and an engineering station, the programmable logic controller performing asymmetric encryption communication based on a first RSA / ECC key pair, an encryption module being arranged in a chip of the programmable logic controller, the encryption module being configured to store a private key in the first RSA / ECC key pair and a PLC device fingerprint, the engineering station performing asymmetric encryption communication based on a second RSA / ECC key pair, the method comprising: a response module configured to, in response to a download configuration request, acquire a second CA certificate installed in the engineering station and perform security verification on the second CA certificate, the engineering station acquiring a first CA certificate installed in the programmable logic controller and verifying security of the first CA certificate, wherein the first CA certificate binds public key information in the first RSA / ECC key pair and PLC fingerprint information, and the second CA certificate binds engineering station device information and a public key in the second RSA / ECC key pair; a verification module configured to, if the first CA certificate and the second CA certificate are both secure and trusted according to the security verification results, perform bidirectional TLS verification between the programmable logic controller and the engineering station; a construction module configured to, if the handshake verification is successful, negotiate a temporary symmetric encryption key between the programmable logic controller and the engineering station and construct an encrypted session channel; a generation module configured to, the engineering station encrypting configuration information by using the temporary symmetric encryption key, hashing the encrypted configuration information, and signing the hashed configuration information by using a private key in the second CA certificate to generate signed encrypted configuration information, the configuration information comprising: configuration data, a first timestamp, and a check random value, the check random value and the first timestamp being used for anti-replay check; a check module configured to, the programmable logic controller acquiring the signed encrypted configuration information and performing signature verification and anti-replay check on the signed encrypted configuration information by using a public key in the second CA certificate; a binding module configured to, if the check is passed, binding the configuration data to a chip of the programmable logic controller.

9. An electronic device, comprising: comprise: at least one processor; and at least one memory connected with the processor, wherein: the memory stores program instructions executable by the processor, and the processor invoking the program instructions can execute the method of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Digital certificate implementation method and device based on symmetric algorithm, equipment and medium

    CN114448644A

  • Key issuing method, system and device, storage medium and program product

    CN119449316A