End-to-end data processing method and device

Through end-to-end data processing methods, a preset key generation protocol is used to generate public and private keys for exchanging shared keys, which solves the security risks in remote data transmission of the BMC system and achieves more secure data encryption transmission.

CN119583213BActive Publication Date: 2025-09-30BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510095016.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-09-30
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The existing remote data transmission of BMC system has the security risk of privacy data leakage due to malicious attacks by attackers. The current communication encryption technology is difficult to cope with the increasingly complex network attacks.

Method used

An end-to-end data processing method is adopted. By determining the preset key generation protocol, the public key and private key of the data sender and receiver are generated, and a shared key is generated based on the public key exchange to achieve data encryption transmission. Even if an attacker intercepts the public key, the shared key cannot be cracked, thereby improving data security.

Benefits of technology

It effectively ensures key security, improves the security of end-to-end data transmission, protects the security of private data, and prevents data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583213B_ABST
    Figure CN119583213B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide an end-to-end data processing method and device, the method comprising: determining a preset key generation protocol; determining a first private key and a first public key of a data sending end according to a first protocol; sending the first public key to a data receiving end, and receiving a second public key sent by the data receiving end, wherein the second public key is generated based on the second private key of the data receiving end; determining a first calculation coefficient corresponding to the first private key according to a second protocol, generating a shared key based on the first calculation coefficient and the second public key, and encrypting target data based on the shared key to obtain target encrypted data; sending the target encrypted data to a data receiving end, wherein the data receiving end is configured to generate a shared key based on the second private key and the first public key according to the second protocol. By exchanging public keys, each end can generate the same shared key based on the second protocol, thereby achieving end-to-end data encrypted transmission. The shared key cannot be cracked based on the public key alone, thereby ensuring data security.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of application number 202411538380.4, application date October 31, 2024, and invention name is “End-to-end data processing method and device”. Technical Field

[0002] The embodiments of this specification relate to the field of electronic communications technology, and in particular to an end-to-end data processing method and apparatus. Background Art

[0003] A BMC (Baseboard Management Controller) system is a management system that monitors servers or switches and provides a remote control interface. This system communicates with other hardware and software within the host through interfaces such as LPC or USB. It also provides query and control capabilities to remote operators via remote transmission interfaces such as the network. This allows administrators to remotely access the host to issue commands or perform various tasks, such as remote power control, hardware monitoring, and logging.

[0004] As BMC systems expand their capabilities, remote data transmission has greatly facilitated enterprise-level server and device management. However, this remote data transmission process poses a security risk of leaking private data due to malicious attacks. Current communication encryption technologies struggle to withstand increasingly sophisticated cyberattacks, leading to the urgent need for a more secure and reliable communication encryption method. Summary of the Invention

[0005] In view of this, embodiments of this specification provide an end-to-end data processing method, applied to a data sending end. One or more embodiments of this specification also relate to an end-to-end data processing method, applied to a data receiving end, an end-to-end data processing apparatus, configured at a data sending end, an end-to-end data processing apparatus, configured at a data receiving end, a computing device, a computer-readable storage medium, and a computer program product, to address technical deficiencies in the prior art.

[0006] According to a first aspect of an embodiment of this specification, an end-to-end data processing method is provided, which is applied to a data sending end and includes:

[0007] Determining a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key;

[0008] Determine a first private key and a first public key of a data sending end according to a first protocol;

[0009] Sending the first public key to the data receiving end, and receiving a second public key sent by the data receiving end, wherein the second public key is generated based on the second private key of the data receiving end, and the second public key and the second private key are determined according to the first protocol;

[0010] Determine, according to the second protocol, a first calculation coefficient corresponding to the first private key, generate a shared key based on the first calculation coefficient and the second public key, and encrypt the target data based on the shared key to obtain target encrypted data;

[0011] The target encrypted data is sent to a data receiving end, wherein the data receiving end is used to generate a shared key based on the second private key and the first public key according to the second protocol, decrypt the target encrypted data based on the shared key, and obtain the target data.

[0012] According to a second aspect of an embodiment of this specification, an end-to-end data processing method is provided, which is applied to a data receiving end and includes:

[0013] Determining a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key;

[0014] Determining a second private key and a second public key of the data receiving end according to the first protocol;

[0015] Sending the second public key to the data sending end, and receiving the first public key sent by the data sending end, wherein the first public key is generated based on the first private key of the data sending end, and the first public key and the first private key are determined according to the first protocol;

[0016] Determine, according to the second protocol, a second calculation coefficient corresponding to the second private key, and generate a shared key based on the second calculation coefficient and the first public key;

[0017] Receive target encrypted data sent by the data sending end, and decrypt the target encrypted data based on the shared key to obtain target data, wherein the target encrypted data is obtained by the data sending end generating a shared key based on the first private key and the second public key according to the second protocol, and encrypting the target data based on the shared key.

[0018] According to a third aspect of an embodiment of this specification, there is provided an end-to-end data processing device, configured at a data sending end, comprising:

[0019] A first acquisition module is configured to determine a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key;

[0020] A first determining module is configured to determine a first private key and a first public key of a data sending end according to a first protocol;

[0021] a first receiving module configured to send the first public key to a data receiving end, and receive a second public key sent by the data receiving end, wherein the second public key is generated based on a second private key of the data receiving end, and the second public key and the second private key are determined according to the first protocol;

[0022] an encryption module configured to determine, according to a second protocol, a first calculation coefficient corresponding to the first private key, generate a shared key based on the first calculation coefficient and the second public key, and encrypt target data based on the shared key to obtain target encrypted data;

[0023] The sending module is configured to send the target encrypted data to a data receiving end, wherein the data receiving end is used to generate a shared key based on the second private key and the first public key according to the second protocol, decrypt the target encrypted data based on the shared key, and obtain the target data.

[0024] According to a fourth aspect of the embodiments of this specification, there is provided an end-to-end data processing device, configured at a data receiving end, comprising:

[0025] A second acquisition module is configured to determine a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key;

[0026] a second determining module, configured to determine a second private key and a second public key of the data receiving end according to the first protocol;

[0027] a second receiving module configured to send the second public key to the data sending end, and receive the first public key sent by the data sending end, wherein the first public key is generated based on the first private key of the data sending end, and the first public key and the first private key are determined according to the first protocol;

[0028] a generation module configured to determine, according to a second protocol, a second calculation coefficient corresponding to the second private key, and generate a shared key according to the second calculation coefficient and the first public key;

[0029] The decryption module is configured to receive target encrypted data sent by the data sending end, and decrypt the target encrypted data based on the shared key to obtain target data, wherein the target encrypted data is obtained by the data sending end generating a shared key based on the first private key and the second public key according to the second protocol, and encrypting the target data based on the shared key.

[0030] According to a fifth aspect of the embodiments of this specification, there is provided a computing device, including:

[0031] memory and processor;

[0032] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned end-to-end data processing method are implemented.

[0033] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned end-to-end data processing method.

[0034] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned end-to-end data processing method when executed by a processor.

[0035] One embodiment of the present specification implements determining a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key; according to the first protocol, determining a first private key and a first public key of a data sending end; sending the first public key to a data receiving end, and receiving a second public key sent by the data receiving end, wherein the second public key is generated based on the second private key of the data receiving end, and the second public key and the second private key are determined according to the first protocol; according to the second protocol, determining a first calculation coefficient corresponding to the first private key, generating a shared key based on the first calculation coefficient and the second public key, and encrypting target data based on the shared key to obtain target encrypted data; sending the target encrypted data to the data receiving end, wherein the data receiving end is used to generate a shared key based on the second private key and the first public key according to the second protocol, and decrypt the target encrypted data based on the shared key to obtain target data.

[0036] In this way, by determining the first private key and the first public key of the data sending end according to the first protocol, the second public key of the data receiving end can be exchanged based on the first public key, so that the data sending end can generate a shared key based on the first private key and the second public key according to the second protocol, and the data receiving end can generate the same shared key based on the second private key and the first public key according to the second protocol, thereby realizing end-to-end data encryption transmission; and, since the public key is exchanged, even if the attacker intercepts the public key from the key exchange process, the shared key cannot be cracked based on the public key, which can effectively ensure the security of the key and thus improve the security of the encrypted data; encrypting the target data by the shared key can improve the security of the end-to-end data transmission process and ensure the security of privacy data. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is an architecture diagram of an end-to-end data processing system provided by one embodiment of this specification;

[0038] Figure 2This is a flow chart of an end-to-end data processing method provided by an embodiment of this specification, which is applied to a data sending end;

[0039] Figure 3a is a schematic diagram of determining a third point based on a slope provided by an embodiment of this specification;

[0040] Figure 3b This is a schematic diagram of determining a third point based on two points provided by an embodiment of this specification;

[0041] Figure 3c This is a schematic diagram of an infinite point provided by an embodiment of this specification;

[0042] Figure 4 This is a shared key encryption flow chart provided by one embodiment of this specification;

[0043] Figure 5 This is a key update flow chart provided by an embodiment of this specification;

[0044] Figure 6 This is a Hamming code encoding flow chart provided by one embodiment of this specification;

[0045] Figure 7 This is a message digest processing flow chart provided by one embodiment of this specification;

[0046] Figure 8 This is a flow chart of an end-to-end data processing method provided by an embodiment of this specification, the method being applied to a data receiving end;

[0047] Figure 9 This is a shared key decryption flow chart provided by one embodiment of this specification;

[0048] Figure 10 This is a data integrity check and data recovery flow chart provided by an embodiment of this specification;

[0049] Figure 11 This is a Hamming code error correction flow chart provided by one embodiment of this specification;

[0050] Figure 12 This is an architecture diagram of a BMC-client communication encryption and decryption system provided in one embodiment of this specification;

[0051] Figure 13 This is a flow chart of a data encryption and decryption process provided by an embodiment of this specification;

[0052] Figure 14 This is a schematic diagram of the structure of an end-to-end data processing device provided by one embodiment of this specification, wherein the device is configured at a data sending end;

[0053] Figure 15 This is a schematic diagram of the structure of an end-to-end data processing device provided by one embodiment of this specification, wherein the device is configured at a data receiving end;

[0054] Figure 16 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION

[0055] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0056] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0057] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0058] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0059] First, the terms involved in one or more embodiments of this specification are explained.

[0060] BMC (Baseboard Management Controller): An embedded management controller typically located on a server's motherboard. It monitors, manages, and remotely controls the server.

[0061] SSL (Secure Sockets Layer): An encryption protocol for network communications that provides encryption, authentication, and data integrity protection at the transport layer. The SSL protocol is not completely secure. The security of SSL encryption can be compromised if an SSL certificate is incorrectly issued or the security of the certificate authority itself is compromised.

[0062] TLS (Transport Layer Security) is a standard protocol for providing security in network communications. It is designed to protect the security of data transmission between clients (such as web browsers and mobile applications) and servers (such as web servers and API servers). The TLS protocol uses asymmetric encryption technology to securely exchange a symmetric key between the client and server. This symmetric key is used for subsequent data encryption and decryption processes.

[0063] ECC (Elliptic Curve Cryptography) protocol: This protocol provides an encryption algorithm based on mathematical operations on elliptic curves. The complexity and unpredictability of elliptic curves make cracking ECC encryption extremely difficult, enabling encrypted data transmission with higher security and computational efficiency through shorter key lengths.

[0064] Modular Multiplication Modulus: Because ECC encryption is performed over a finite field, modular multiplication modulus ensures that the result of the multiplication operation does not exceed the range of the finite field. Furthermore, defining a unified modular multiplication modulus over a finite field ensures that all operations follow the same rules, facilitating algorithm implementation and standardization. Given the complexity of the ECC algorithm, modular multiplication modulus can also significantly increase the difficulty of cracking the encryption, thereby improving encryption security.

[0065] AES-256-CBC encryption algorithm: This algorithm combines the Advanced Encryption Standard (AES) and Cipher Block Chaining (CBC) modes. AES is a symmetric encryption algorithm, and CBC mode is an operating mode used to process data in block ciphers, enhancing encryption security.

[0066] SHA-256(S): is a one-way hash function that can convert an input (message or data) of any length into an output of a fixed length (256 bits, or 32 bytes).

[0067] Hamming code: A linear debugging code widely used in data transmission and storage. By adding redundant bits (check bits) to the original data, it can detect and correct single-bit errors during data transmission or storage, thereby improving data transmission accuracy and reliability.

[0068] A BMC is a controller used to monitor and manage servers. It records basic server information (such as the server host name, IP address, model, manufacturer, production date, component production and technical information, chassis information, and motherboard information). It also monitors the health status of various server components (such as the CPU, memory, hard drive, fan, and chassis) in real time, including temperature and voltage. The BMC provides remote control and management capabilities, allowing clients to remotely control the server to perform operations such as power on / off, restart, maintenance, firmware updates, and system installation. It also supports remote viewing of server events and log information (such as hardware errors, operating system errors, and user operations), greatly facilitating administrators' work.

[0069] To ensure the security of data transmission during BMC remote communication, encryption protocols such as SSL or TLS are typically used to prevent data theft or tampering during transmission. However, in SSL or TLS communication, the client and BMC control end often authenticate using certificates. If an attacker can forge a valid certificate or use methods such as DNS spoofing to trick the client into trusting a forged certificate, a man-in-the-middle attack could be launched, posing a security risk that attackers could intercept, tamper with, or steal communication data. Therefore, current encrypted communication methods are unable to effectively address increasingly complex network attacks, and a more secure and reliable end-to-end encryption method is urgently needed.

[0070] Based on this, an embodiment of the present specification provides an end-to-end data processing method, which determines a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key; according to the first protocol, determines the first private key and the first public key of the data sending end; sends the first public key to the data receiving end, and receives the second public key sent by the data receiving end, wherein the second public key is generated based on the second private key of the data receiving end, and the second public key and the second private key are determined according to the first protocol; according to the second protocol, determines the first calculation coefficient corresponding to the first private key, generates a shared key based on the first calculation coefficient and the second public key, and encrypts the target data based on the shared key to obtain the target encrypted data; sends the target encrypted data to the data receiving end, wherein the data receiving end is used to generate a shared key based on the second private key and the first public key according to the second protocol, decrypts the target encrypted data based on the shared key, and obtains the target data.

[0071] In this way, by determining the first private key and the first public key of the data sending end according to the first protocol, the second public key of the data receiving end can be exchanged based on the first public key, so that the data sending end can generate a shared key based on the first private key and the second public key according to the second protocol, and the data receiving end can generate the same shared key based on the second private key and the first public key according to the second protocol, thereby realizing end-to-end data encryption transmission; and, since the public key is exchanged, even if the attacker intercepts the public key from the key exchange process, the shared key cannot be cracked based on the public key, which can effectively ensure the security of the key and thus improve the security of the encrypted data; encrypting the target data by the shared key can improve the security of the end-to-end data transmission process and ensure the security of privacy data.

[0072] This specification provides an end-to-end data processing method for use at a data transmitter. This specification also relates to an end-to-end data processing method for use at a data receiver, an end-to-end data processing apparatus configured at a data transmitter, an end-to-end data processing apparatus configured at a data receiver, a computing device, a computer-readable storage medium, and a computer program product, each of which is described in detail in the following embodiments.

[0073] See also Figure 1 , Figure 1 The data processing system 100 includes a data sending end 102 and a data receiving end 104 .

[0074] The data sending end 102 is configured to determine a first private key according to a preset key generation protocol; and generate a first public key based on the first private key.

[0075] The data receiving end 104 is configured to determine a second private key according to a preset key generation protocol; and generate a second public key based on the second private key.

[0076] The data sending end 102 is also used to exchange public keys with the data receiving end 104, send a first public key to the data receiving end 104, and receive a second public key sent by the data receiving end 104; generate a shared key based on the first private key and the second public key.

[0077] The data receiving end 104 is also used to exchange public keys with the data sending end 102, send the second public key to the data receiving end 104, and receive the first public key sent by the data receiving end 104; generate a shared key based on the second private key and the first public key.

[0078] In practical applications, the data transmitter 102 and the data receiver 104 can be either a BMC controller or a client. When the BMC controller transmits data to a client, the BMC controller acts as the data transmitter and the client acts as the data receiver. When the client transmits data to the BMC controller, the BMC controller acts as the data receiver and the client acts as the data transmitter. There can be one or more clients.

[0079] To ensure data security during transmission, the BMC controller can agree on an encryption key with each client before establishing a communication connection. The encryption keys between different clients and the BMC controller can be different. This allows encrypted data transmission during the communication connection, based on the agreed-upon encryption key.

[0080] In an optional embodiment of this specification, the BMC control terminal can send a communication connection establishment request to each client separately, and when the target client returns a response message, send a key generation instruction to the target client, where the target client is the client among the clients that agrees to establish a communication connection with the BMC control terminal, and the key generation instruction carries a preset key generation protocol. The preset key generation protocol can indicate the key generation method, specifically, it can specify the key generation algorithm. The key generation algorithm can include an algorithm for generating a private key and a public key, and can also include an algorithm for generating a shared key based on the private key and the public key.

[0081] Furthermore, the BMC control terminal can determine a first private key based on a preset key generation protocol, generate a first public key based on the first private key, and send the first public key to the target client. The target client can respond to the key generation instruction and generate a second private key based on the same preset key generation protocol, generate a second public key based on the second private key, and send the second public key to the BMC control terminal.

[0082] In another optional embodiment of the present specification, the client may send a communication connection establishment request to the BMC control end. The BMC control end may establish a communication connection with the client in response to the communication connection establishment request and send a key generation instruction to the client, wherein the key generation instruction carries a preset key generation protocol.

[0083] Alternatively, the client may send a key generation instruction carrying a preset key generation protocol to the BMC control terminal.

[0084] In actual applications, before the BMC control end establishes a communication connection with each client, the two communicating parties can agree on the same preset key generation protocol and generate a shared key between the two ends according to the preset key generation protocol, so as to perform data encryption transmission or decryption processing based on the shared key.

[0085] Furthermore, when the BMC control end and each client agree on the same shared key based on a preset key generation protocol and implement data encryption transmission based on the shared key, the old shared key can also be dynamically updated according to the key update mechanism, thereby avoiding the risk of data leakage caused by the key being cracked by an attacker.

[0086] In an optional embodiment of the present specification, the BMC control end may stop sending data packets to the client based on the key update mechanism, and send a key update instruction to the client.

[0087] In response to the key update instruction, the client stops sending data packets to the BMC control terminal, generates a new second private key and a new second public key based on the preset encryption protocol, and sends the new second public key to the BMC control terminal. The BMC control terminal can also generate a new first private key and a new first public key based on the preset encryption protocol and send the new first public key to the client. The client generates a new shared key based on the new second private key and the new first public key, and the BMC control terminal generates a new shared key based on the new first private key and the new second public key. Both parties conduct subsequent data communications based on the new shared key.

[0088] In another optional embodiment of the present specification, the client may stop sending data packets to the BMC control terminal based on the key update mechanism, and send a key update instruction to the BMC control terminal.

[0089] In response to the key update instruction, the BMC control end stops sending data packets to the client, generates a new first private key and a new first public key based on the preset encryption protocol, and sends the new first public key to the client. The client then generates a new second private key and a new second public key based on the preset encryption protocol and sends the new second public key to the client. The BMC control end generates a new shared key based on the new first private key and the new second public key, and the client generates a new shared key based on the new second private key and the new first public key. Both ends conduct subsequent data communications based on the new shared key.

[0090] Specifically, the key update mechanism can be used to specify the trigger conditions for updating the shared key between the two ends. The trigger conditions may include at least one of the following: communication time exceeding a preset threshold, number of attacks exceeding a preset threshold, or communication traffic exceeding a preset threshold. Alternatively, a multi-dimensional preset threshold may be determined based on a combination of multiple conditions, and the trigger condition may include a result calculated based on the multiple conditions exceeding the multi-dimensional preset threshold.

[0091] In this embodiment, the data transmitter and receiver each determine their corresponding private and public keys based on the same pre-set key generation protocol, exchange the public keys, and generate a shared key based on the exchanged public keys and each end's own private key, thereby achieving encrypted data transmission between the two ends. The data transmitter can encrypt data packets using the shared key before sending them. After receiving the encrypted data packets, the data receiver can decrypt them using the shared key to retrieve the data. Because only the public key is exchanged between the two ends, even if an attacker obtains the public key through a man-in-the-middle attack, they cannot decrypt the shared key based on the public key, thereby improving data security and making end-to-end communication more secure and reliable.

[0092] See also Figure 2 , Figure 2 A flow chart of an end-to-end data processing method provided according to an embodiment of the present specification is shown. The method is applied to a data sending end and specifically includes the following steps.

[0093] Step 202: Determine a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key.

[0094] In actual applications, in the process of data interaction between the two ends, in order to protect data security and avoid privacy data leakage, the same preset key generation protocol can be agreed upon before data transmission, so that key data can be generated at each end based on the preset key generation protocol.

[0095] According to an optional embodiment of the present specification, the data sending end may determine a preset key generation protocol.

[0096] Specifically, the preset key generation protocol can indicate a method for generating a public-private key pair and a shared key. The preset key generation protocol may include a first protocol for generating a private key and a public key and a second protocol for generating a shared key.

[0097] In an optional embodiment of this specification, determining the preset key generation protocol may include:

[0098] The data sending end determines the preset key generation protocol according to the preset encryption protocol.

[0099] In actual applications, the data sending end can determine the preset key generation protocol based on the preset encryption protocol, and send the preset key generation protocol to the data receiving end, so that the data receiving end can generate the public and private key pair of the data receiving end based on the same preset key generation protocol, and exchange the public key with the data sending end, thereby generating the same shared key at both ends based on its own private key and the exchanged public key.

[0100] Specifically, the preset encryption protocol may be an ECC protocol. The ECC protocol specifies a data encryption method based on an elliptic curve function, and can determine a set of complex and difficult-to-crack key generation methods based on the characteristics of the elliptic curve function.

[0101] During actual implementation, a first protocol for generating a private key and a public key, and a second protocol for generating a shared key may be determined according to a preset encryption protocol.

[0102] It should be noted that in order to ensure that the shared key generated between the two ends of data exchange is the same, the first protocol and the second protocol agreed upon based on the preset encryption protocol between the two ends need to be the same.

[0103] In another optional embodiment of the present specification, determining the preset key generation protocol may include:

[0104] The data sending end receives the preset key generation protocol sent by the data receiving end.

[0105] In actual applications, the data receiving end can determine the preset key generation protocol based on the preset encryption protocol, and then send the preset key generation protocol to the data sending end, so that the data sending end generates the public and private key pair of the data sending end based on the same preset key generation protocol, and exchanges the public key with the data receiving end, thereby generating the same shared key at both ends based on its own private key and the exchanged public key.

[0106] Step 204: Determine the first private key and the first public key of the data sending end according to the first protocol.

[0107] In actual applications, before the data sending end sends the data to be transmitted to the data receiving end, the first private key and the first public key of the data sending end can be determined according to the first protocol.

[0108] Specifically, the data transmitter can be understood as the sender of the data to be transmitted. The first private key can be understood as a private key determined by the data transmitter and stored at the data transmitter. The first public key can be understood as a public key determined by the data transmitter and sent to the data receiver for public key exchange with the data receiver.

[0109] The first protocol can indicate the generation method of the first private key and the first public key. The first protocol may include encryption parameter information determined based on the ECC protocol, such as parameter information of the elliptic function curve, initial coordinate points, password table length, modular multiplication modulus value and other information; the first protocol can also specify the generation algorithm of the private key and the public key.

[0110] In practical applications, based on encryption parameters and the algorithm for generating private and public keys, the public key corresponding to the private key can be generated after the private key is determined, thus obtaining a public-private key pair. The public key in this public-private key pair is used to exchange the public key with the other end. After the public key exchange, a shared key can be generated based on the local private key and the other end's public key.

[0111] In actual implementation, the data sender can be either the BMC controller or any client that establishes a communication connection with the BMC controller. When the BMC controller transmits data to the client, the BMC controller is the data sender; when the client transmits data to the BMC controller, the client is the data sender.

[0112] In an optional embodiment of the present specification, before the data sending end and the data receiving end establish a communication connection, the data sending end may send a key generation instruction carrying a preset key generation protocol to the data receiving end; or, the data receiving end may send a key generation instruction carrying a preset key generation protocol to the data sending end.

[0113] Furthermore, in the case where the data sending end and the data receiving end respectively generate a shared key based on the same preset encryption protocol, a communication connection is established between the data sending end and the data receiving end and data transmission is performed.

[0114] In another optional embodiment of the present specification, when a communication connection is established between the data sending end and the data receiving end, and there is no shared key that meets the security requirements between the data sending end and the data receiving end, the data sending end may send a key generation instruction carrying a preset encryption protocol to the data receiving end; or, the data receiving end may send a key generation instruction carrying a preset key generation protocol to the data sending end.

[0115] Furthermore, data transmission is performed when the data sending end and the data receiving end respectively generate shared keys that meet security requirements based on the same preset key generation protocol.

[0116] According to one or more optional embodiments of this specification, determining the first private key and the first public key of the data sending end according to the first protocol may include the following steps:

[0117] Obtain parameter information, initial coordinate points, and preset value range of the target elliptic function curve;

[0118] Determine a target integer within a preset value range as the first private key, wherein the target integer is any integer within the preset value range;

[0119] According to the parameter information and the initial coordinate point, a first coordinate point corresponding to the target integer on the target elliptic function curve is generated, and the first coordinate point is determined as the first public key.

[0120] In practical applications, based on the encryption parameter information and public-private key generation algorithm specified in the first protocol, a first private key and a first public key of the data sender can be generated.

[0121] Specifically, the encryption parameter information may include parameter information, initial coordinate points, and preset value ranges of the target elliptic function curve. The target elliptic function curve can be understood as an elliptic function curve determined based on the ECC protocol. The parameter information can be used to characterize the physical meaning of the target elliptic function curve; based on the parameter information, the function graph of the target elliptic function curve and the finite field corresponding to various calculation results calculated based on the target elliptic function curve can be determined. The parameter information may specifically include the linear term coefficient (a), constant term (b), modular multiplication modulus value (p), etc. of the target elliptic function curve. Among them, through the modular multiplication modulus value, the coordinate value of the point on the elliptic function curve obtained by calculation can be converted into an integer value through modular multiplication inverse element conversion, so that the calculated key data can be an integer, which is convenient for subsequent encryption based on the key data.

[0122] Optionally, the curve equation of the target elliptic function curve can be shown in the following formula (1).

[0123] Formula (1)

[0124] Specifically, the initial coordinate point can be understood as any integer coordinate point determined based on the target elliptic function curve. That is, the initial coordinate point is any integer point on the target elliptic function curve. Based on the initial coordinate point and parameter information, multiple integer coordinate points on the target elliptic function curve can be determined, thereby determining the corresponding code table and code table length of the target elliptic function curve.

[0125] The preset value range can be determined based on the length of the password table and can be understood as the integer value range of the private key, i.e., the value range corresponding to the private key. Optionally, the preset value range can include the entire password table or a portion of the password table, depending on the needs of the actual application.

[0126] In the actual implementation process, when the data sending end and the data receiving end unify the parameter information, initial coordinate points and preset value range of the target elliptic function curve, the data sending end and the data receiving end can generate different public-private key pairs based on the same target elliptic function curve (that is, the same parameter information), the same initial coordinate points and the same preset value range, and further generate the same shared key.

[0127] Optionally, the parameter information and initial coordinate points of the target elliptic function curve can be predefined according to actual needs. Based on the parameter information and initial coordinate points, a complete password table can be calculated and the length of the password table can be determined, thereby determining the preset value range.

[0128] The following is combined with Figure 3a-3c , an example is given to illustrate how to determine the preset value range. Figure 3a A schematic diagram of determining a third point based on a slope according to an embodiment of this specification is shown; Figure 3b A schematic diagram of determining a third point based on two points provided by an embodiment of this specification is shown; Figure 3c A schematic diagram of an infinity point provided by an embodiment of this specification is shown.

[0129] See also Figure 3a , the slope information corresponding to the initial coordinate point can be determined according to the parameter information, and based on the principle of determining the third point by the slope, the initial coordinate point (named point G) and point G are calculated, and the calculation result is inverted by modular multiplication to obtain the next integer coordinate point (named point 2G).

[0130] See also Figure 3b After determining point 2G, we can use the principle of two points determining the third point to calculate point 2G and point G, and inverse the calculation results through modular multiplication to obtain the next integer coordinate point (named point 3G). Further, after determining point 3G, we can continue to use the principle of two points determining the third point to calculate point 3G and point G, and inverse the calculation results through modular multiplication to obtain point 4G. Calculate point 4G and point G to obtain point 5G, and so on, until we obtain nG points (n is an integer).

[0131] See also Figure 3c , nG point can be understood as the first point where the result of n·G is infinite.

[0132] Based on the above process, the cryptographic sequence from G to nG can be calculated based on the target elliptic function curve's parameters (a, b, modulus p) and the initial coordinate point (G). From G to nG, the length of the cryptographic table can be determined, thereby determining the preset value range.

[0133] The following example uses p=101, a=0, b=17, and the G coordinate value is (4,9). The specific calculation method of the key sequence can refer to the following steps S1-S3:

[0134] S1: Define elliptic curve Specific parameters.

[0135] For example, set a = 0, b = 17, modulo p = 101; obtain the curve .

[0136] It should be noted that when using elliptic curves to calculate data, the third point can be found based on two points in the following two ways.

[0137] The first method is the doubling point formula (the coordinates of the two points are the same, both (x1, y1)). The specific calculation formulas can be found in the following formulas (2) to (4).

[0138] Formula (2)

[0139] Formula (3)

[0140] Formula (4)

[0141] The second method is point addition formula (the coordinates of the two points are different, one is (x1, y1) and the other is (x2, y2)). The specific calculation formula can be found in the following formulas (5) to (7).

[0142] Formula (5)

[0143] Formula (6)

[0144] Formula (7)

[0145] Specifically, λ is the slope. In the first method above, since there is only one point coordinate (x1, y1), λ is the slope of the tangent line calculated based on the function itself. In the second method above, there are two different point coordinates (x1, y1) and (x2, y2), and λ is the slope of the line equation connecting these two points, calculated based on these two point coordinates.

[0146] S2: Take a base point G(4,9) on the elliptic curve and calculate the 2G point based on G and G using the doubling point formula.

[0147] The specific calculation process is as follows:

[0148]

[0149]

[0150]

[0151] In this way, 2G points (44,19) can be obtained.

[0152] S3: Calculate 3G points by adding 2G and G.

[0153] The specific calculation process is as follows:

[0154]

[0155]

[0156]

[0157] In this way, 3G points (72,75) can be obtained.

[0158] Furthermore, 3G and G are calculated using point addition to obtain 4G, and 4G and G are calculated using point addition to obtain 5G... and so on, the password sequence shown in Table 1 below can be obtained.

[0159] It should be noted that Table 1 shows the key sequence obtained using relatively simple ECC curve parameters. In actual applications, more complex key data can be generated by optimizing the G point coordinates and the values ​​of a, b and the modulus p.

[0160] Table 1

[0161]

[0162] Optionally, according to the private key generation algorithm specified in the first protocol, when a preset value range is determined, the data sending end can select any integer within the preset value range as the first private key.

[0163] Furthermore, when the first private key is determined, the first public key can be obtained by performing modular multiplication on the first private key and the initial coordinate point according to the public key generation algorithm specified in the first protocol.

[0164] For example, assuming that the data sender determines the integer 5 as the first private key of the data sender, based on 5·G, the first public key 5G(90,91) of the data sender can be calculated.

[0165] It's important to note that when calculating the key data based on the parameter information and initial coordinates, the specific coordinate values ​​for 2G-nG can be calculated in real time by calling methods in the OpenSSL library. This real-time calculation, rather than pre-generating and reading the key table, avoids the memory usage and performance overhead associated with table storage and reading when n is large.

[0166] For example, the key data generation method based on the ECC protocol that can be called in the openssl library may include: #include<openssl / ec.h> 、#include<openssl / obj_mac.h> 、#include<openssl / bn.h> 、#include<openssl / ecdsa.h> wait.

[0167] By applying this embodiment, the data transmitter and receiver determine the same parameter information, initial coordinate point, and preset value range through the ECC protocol. Thus, the data transmitter can determine a first private key based on the preset value range and generate a first public key based on the first private key, the initial coordinate point, and the parameter information. The data receiver can also determine a second private key based on the preset value range and generate a second public key based on the second private key, the initial coordinate point, and the parameter information. This improves the efficiency of private and public key generation and enhances key security.

[0168] Furthermore, by optimizing the parameters (i.e., a, b, and modulus p), more complex key data can be generated. This makes it virtually impossible to determine the other party's private key using table reading, further improving the reliability of the encryption key and the security of the encrypted data.

[0169] Step 206: Send the first public key to the data receiving end, and receive the second public key sent by the data receiving end, wherein the second public key is generated based on the second private key of the data receiving end, and the second public key and the second private key are determined according to the first protocol.

[0170] In actual applications, the data sending end can send the first public key to the data receiving end, and receive the second public key sent by the data receiving end, so that the data sending end can generate a shared key based on the first private key and the second public key, and the data receiving end can generate a shared key based on the second private key and the first public key.

[0171] According to an optional embodiment of the present specification, the data sending end can send a public key exchange request to the data receiving end based on determining the first private key and generating the first public key based on the first private key. When the data receiving end sends a response message agreeing to the exchange, the data sending end sends the first public key to the data receiving end and receives the second public key sent by the data receiving end.

[0172] According to another optional embodiment of the present specification, the data sending end may also send the first public key to the data receiving end in response to the public key exchange request sent by the data receiving end, and receive the second public key sent by the data receiving end.

[0173] Optionally, the data transmitter may also include its security token in the first public key. The data receiver may verify the identity of the data transmitter based on the security token. If the verification is successful, the receiver may receive the first public key and send a second public key including the data receiver's security token to the data transmitter. The data transmitter may also verify the identity of the data receiver based on the security token and, if the verification is successful, receive the second public key.

[0174] Optionally, QKD (Quantum Key Distribution) technology can be used to achieve a higher level of key exchange security.

[0175] Specifically, QKD technology is an innovative approach that leverages the properties of quantum mechanics to ensure communication security. QKD enables communicating parties to generate and share a random, secure key for message encryption and decryption. QKD leverages the fundamental principles of quantum mechanics, particularly the non-cloning nature of quantum states and the interference-resistant nature of measurements, to ensure secure communication.

[0176] Optionally, the implementation method of QKD can be determined according to the needs of actual applications, and can mainly include a preparation and measurement-based method (BB84 protocol) and an entangled state-based method (E91 protocol).

[0177] The BB84 protocol uses four different quantum states to encode key information and detects eavesdropping by randomly selecting a measurement basis. The E91 protocol uses quantum entangled states to distribute keys and generates keys by measuring the states of entangled photons.

[0178] In the actual implementation process, a higher level of key exchange security can be achieved by integrating QKD technology on the BMC control end.

[0179] Step 208: According to the second protocol, determine the first calculation coefficient corresponding to the first private key, generate a shared key based on the first calculation coefficient and the second public key, and encrypt the target data based on the shared key to obtain target encrypted data.

[0180] In actual applications, when the data sending end determines the first private key and receives the second public key sent by the data receiving end, it can generate a shared key based on the first private key and the second public key according to the second protocol; and encrypt the target data based on the shared key to obtain the target encrypted data, thereby realizing encrypted transmission of data.

[0181] Specifically, the target data can be understood as the plaintext data to be transmitted, and the target encrypted data can be understood as the encrypted data obtained by encrypting the plaintext data using the shared key. The second protocol can specify an algorithm for generating the shared key. The two ends of the data exchange can generate the same shared key based on the same shared key generation algorithm.

[0182] The first calculation coefficient is determined according to the first private key, and the first calculation coefficient represents the number of calculations on the second public key.

[0183] According to an optional embodiment of the present specification, generating a shared key based on the first private key and the second public key according to the second protocol may include the following steps:

[0184] Determining a first calculation coefficient corresponding to the first private key;

[0185] A shared key is generated according to the first calculation coefficient and the second public key.

[0186] Specifically, the first calculation coefficient can be understood as the number of calculations of the second public key.

[0187] In actual applications, the calculation coefficient corresponding to the second public key can be determined based on the first private key, so that the first calculation coefficient can be calculated on the second public key multiple times according to the shared key generation algorithm specified in the second protocol to obtain the shared key.

[0188] Optionally, the first calculation coefficient is the first private key-1; the shared key generation algorithm may include a doubling formula and a point addition formula.

[0189] In actual implementation, when the data sending end generates a first private key and receives a second public key sent by the data receiving end, the first calculation coefficient can be determined to be the first private key minus 1; the first private key minus 1 calculation is performed on the exchanged second public key according to the shared key generation algorithm to obtain the shared key. Correspondingly, when the data receiving end generates a second private key and receives the first public key sent by the data sending end, the second calculation coefficient can be determined to be the second private key minus 1; the second private key minus 1 calculation is performed on the exchanged first public key according to the shared key generation algorithm to obtain the same shared key.

[0190] Illustratively, generating a shared key based on the first private key and the second public key may include:

[0191] Assuming the data sender determines an integer 5 in the preset value range 1-n as the data sender's first private key, then based on 5·G, the data sender's first public key 5G (90, 91) can be calculated. The data receiver determines an integer 6 in the preset value range 1-n as the data receiver's second private key. Based on 6·G, the data receiver's second public key 6G (71, 61) can be calculated. The data sender and the data receiver exchange the first public key 5G and the second public key 6G. Based on the first private key 5 and the second public key 6·G, the data sender can calculate the shared key 30G based on 30·G. The data receiver can also calculate the same shared key 30G based on 30·G, based on the second private key 6 and the first public key 5·G.

[0192] The following takes the process of generating a shared key based on the first private key and the second public key by the data sending end as an example to further illustrate the specific generation process of the shared key.

[0193] Continuing with the previous example, the data sender determines the first private key to be 5 and calculates the first public key 5G based on the first private key. The data receiver determines the second private key to be 6 and calculates the second public key 6G based on the second private key. After the two ends exchange public keys, the data sender calculates the shared key 30G based on the first private key 5 and the second public key 6G.

[0194] The specific calculation process is as follows:

[0195] The data sending end receives the second public key 6G, cumulatively 1 times;

[0196] Based on the first private key 5, the second public key 6G is multiplied by 5-1 times, that is, 4 times, to obtain the shared key 30G.

[0197] Specifically, the first calculation process is 6G times 6G, which gets 12G; the second calculation process is 12G plus 6G, which gets 18G; the third calculation process is 18G plus 6G, which gets 24G; and the fourth calculation process is 24G plus 6G, which gets 30G.

[0198] Correspondingly, the process of generating a shared key based on the second private key and the first public key at the data receiving end is similar to the above process.

[0199] The data receiving end determines that the second private key is 6, and calculates the first public key 6G based on the first private key; after the two ends exchange public keys, the data receiving end calculates the shared key 30G based on the second private key 6 and the first public key 5G.

[0200] The specific calculation process is as follows:

[0201] The data receiving end receives the first public key 5G, cumulatively 1 times;

[0202] Based on the second private key 6, the first public key 5G is multiplied by 6-1 times, that is, 5 times, to obtain the shared key 30G.

[0203] Specifically, the first calculation process is 5G times 5G to get 10G; the second calculation process is 10G plus 5G to get 15G; the third calculation process is 15G plus 5G to get 20G; the fourth calculation process is 20G plus 5G to get 25G; and the fifth calculation process is 25G plus 5G to get 30G.

[0204] That is, both ends perform m-1 calculations on the exchanged public key based on the private key coefficient m to obtain the same shared key.

[0205] Using this embodiment, the data transmitter and receiver can determine their respective public-private key pairs by agreeing on the same parameters (a, b, modulus value p), initial coordinate point (G), and preset value range (1-n). They can then generate the same shared key based on each end's private key and the exchanged public key. Due to the characteristics of the ECC protocol, even if an attacker obtains the public key, it is difficult to recover the corresponding private key from the public key, making it difficult to crack the shared key. This improves key security, thereby enhancing the security and reliability of data transmission. Furthermore, by using the OpenSSL library to calculate key data in real time, key calculation efficiency can be improved, thereby enhancing the efficiency of data encryption transmission.

[0206] According to one or more optional embodiments of the present specification, encrypting target data based on a shared key to obtain target encrypted data may include the following steps:

[0207] Determine the symmetric key corresponding to the initialization vector and the shared key;

[0208] The target data is encrypted according to the initial vector and the symmetric key to obtain the target encrypted data.

[0209] In an optional embodiment of the present specification, determining the symmetric key corresponding to the initial vector and the shared key may include:

[0210] Based on the preset encryption algorithm, calculate the symmetric key corresponding to the shared key.

[0211] Specifically, the preset encryption algorithm may be an AES-256-CBC encryption algorithm. The shared key may be understood as a target coordinate value of a target coordinate point on a target elliptic function curve.

[0212] Optionally, based on the AES-256-CBC encryption algorithm, the target coordinate value of the shared key can be hashed using the SHA-256(S) hash function, and the calculation result is mapped to an output of a fixed length (256 bits) to obtain a hash value with a length of 256 bits, and the 256-bit hash value is determined as the symmetric key corresponding to the shared key.

[0213] Optionally, the AES-256-CBC encryption algorithm may be called to determine a random initialization vector.

[0214] In practical applications, by determining the symmetric key corresponding to the initial vector and the shared key, the target data can be encrypted according to the initial vector and the symmetric key, realizing symmetric encryption between the data sender and the data receiver, and improving the data security of the encrypted data.

[0215] In an optional embodiment of the present specification, encrypting target data according to the initial vector and the symmetric key to obtain target encrypted data may include the following steps:

[0216] Split the target data into N data blocks, where N is ≥ 1 and is a positive integer;

[0217] Based on the initial vector, the first data block is XORed and the XOR result is encrypted using a symmetric key to obtain the first encrypted data block;

[0218] Based on the i-th encrypted data block, perform XOR processing on the i+1-th data block, and encrypt the XOR processing result using the symmetric key to obtain the i+1-th encrypted data block, where 1≤i≤N-1 is a positive integer;

[0219] According to the 1st to Nth encrypted data blocks, target encrypted data is obtained.

[0220] The following combined Figure 4 , further explains an encryption processing method provided by this embodiment. Specifically, Figure 4 A shared key encryption flow chart provided by an embodiment of this specification is shown.

[0221] Obtain the target data to be encrypted and the shared key S(x, y) of the data sender; generate a symmetric key K (256 bits) corresponding to the shared key S(x, y) based on SHA-256(S); call the AES-256-CBC encryption algorithm to generate a random initialization vector IV (128 bits); split the target data into data blocks [B1, …, BN], where there are N data blocks in total, where N is a positive integer greater than or equal to 1.

[0222] Perform an XOR operation (XOR, symbol ⊕) on data block B1 and the random initialization vector IV, and encrypt the XOR operation result using the symmetric key K to obtain encrypted data block C1; perform an XOR operation on data block B2 and the encrypted data block C1, and encrypt the XOR operation result using the symmetric key K to obtain encrypted data block C2; perform an XOR operation on data block B3 and the encrypted data block C2, and encrypt the XOR operation result using the symmetric key K to obtain encrypted data block C3; and so on, until performing an XOR operation on data block BN and the encrypted data block CN-1, and encrypting the XOR operation result using the symmetric key K to obtain encrypted data block CN.

[0223] The N encrypted data blocks C1 to CN and IV are grouped together to obtain target encrypted data. Specifically, the target encrypted data can be understood as the data in the data packet to be transmitted.

[0224] Furthermore, the AES-256-CBC encryption algorithm can be called to output 14 round keys (each round key is 128 bits). The round keys will perform byte substitution, row shift, column confusion and other operations on the data.

[0225] Optionally, before each XOR operation, the round key can be used to perform byte substitution, row shift, column confusion and other operations on the plaintext data block, and then the result processed by the round key is XORed with the IV, or the encrypted data block corresponding to the previous data block to obtain the XOR processing result.

[0226] Optionally, the specific implementation of AES encryption and decryption can be achieved by calling the underlying function of the openssl library. For example, the callable method includes: #include<openssl / conf.h> 、#include<openssl / evp.h> 、#include<openssl / err.h> 、#include<openssl / rand.h> wait.

[0227] By applying this embodiment, the target data is divided into N data blocks, and an XOR operation is performed on the encryption result of the previous data block with the next data block. This cycle is repeated until each data block is encrypted with a symmetric key based on the result of the XOR operation. This can further increase the complexity of the encryption process, thereby improving the security of the password and better protecting the security of private data.

[0228] In actual implementation, when the communication traffic between the two ends is large, frequent key updates will affect system performance and reduce communication efficiency. However, as time goes by, the security of fixed keys will gradually decrease, making it difficult to cope with more complex network attacks.

[0229] Based on this, an embodiment of this specification provides a dynamic key update mechanism, which can ensure data transmission efficiency while realizing dynamic key update, thereby taking into account both data security and transmission efficiency.

[0230] According to one or more optional embodiments of this specification, before determining the first private key and the first public key of the data sending end, the following steps may also be included:

[0231] Determine the current communication indicators between the data sending end and the data receiving end;

[0232] When the current communication indicator is lower than a preset update threshold, a key update instruction is generated, wherein the key update instruction is used to instruct the data sending end and the data receiving end to update the key.

[0233] Specifically, the current communication indicator can reflect the security level of the shared key used in the current transmission process. The preset update threshold can be understood as a security warning value for the shared key. If the current communication indicator falls below the preset update threshold, it indicates that the security level of the current shared key has fallen below the security warning value and the current shared key is no longer secure and needs to be updated.

[0234] Optionally, the preset update threshold may be determined according to requirements in actual applications.

[0235] Specifically, the key update instruction can be understood as an instruction instructing the data sending end and the data receiving end to update the key.

[0236] In actual implementation, the above update mechanism can be implemented by the data sending end or the data receiving end; that is, it can be executed by the BMC control end or the client end, or jointly by the BMC control end and the client end.

[0237] For example, when the update mechanism is executed by the BMC control terminal, the BMC control terminal can monitor the current communication indicators between the client and the BMC control terminal in real time. If the current communication indicators fall below a preset update threshold, the BMC control terminal stops transmitting data to the client and sends a key update instruction to the client. Based on the key update instruction, the BMC control terminal regenerates the first private key and the first public key. In response to the key update instruction, the client regenerates the second private key and the second public key. Based on the exchanged public key and their respective private keys, both terminals regenerate an updated shared key, and then perform subsequent data transmission based on the updated shared key.

[0238] By applying this embodiment, by determining the current communication indicators between the data sending end and the data receiving end, it is possible to judge the security level of the shared key currently used between the two ends based on the current communication indicators and the preset update threshold, so that the key can be updated in a timely manner when the security level is lower than the security warning value, and data security can be better improved on the basis of ensuring data transmission efficiency.

[0239] In an optional embodiment of the present specification, the current communication indicator may be determined based on a single-dimensional security indicator.

[0240] Specifically, single-dimensional security indicators may include time length, communication traffic volume, number of data anomalies, etc., among which time length can be understood as the cumulative length of time that the current shared key has not been updated, that is, the cumulative usage time of the current shared key; communication traffic volume can be understood as the total communication traffic between the BMC control end and the client within the cumulative usage time, or the average communication traffic; the number of data anomalies may include the number of times the communication link has been attacked, the number of times data transmission errors have occurred (such as data loss, data tampering), etc.

[0241] In practical applications, a preset update threshold can be set based on any single-dimensional security indicator, and the dynamic key update mechanism described above can be implemented based on the real-time monitored indicator and the preset update threshold. Alternatively, a composite indicator value can be calculated based on any two or more single-dimensional security indicators, and a preset update threshold corresponding to the composite indicator value can be pre-set.

[0242] Optionally, an AI-based intrusion detection system (IDS) can be integrated for real-time communication traffic analysis.

[0243] Specifically, IDS can monitor network or system activities in real time and detect and report any violations of security policies or security vulnerabilities. IDS can promptly detect and prevent potential attacks, improving network and system security.

[0244] IDS usually implements communication detection based on the following steps: Capturing data streams: capturing network traffic data; Analyzing data streams: deeply decoding and analyzing the captured data streams to extract and identify key information; Feature matching: comparing and matching data streams with known attack features to determine whether there are malicious attacks and threats; Issuing an alarm: when malicious attacks and threats are detected, an alarm is issued to the administrator so that the administrator can take timely measures.

[0245] In actual implementation, IDS can be integrated into the BMC control end to analyze and detect the communication traffic between the BMC control end and each client, thereby triggering a key update in the event of a security alert.

[0246] In another optional embodiment of the present specification, determining the current communication indicator between the data sending end and the data receiving end may include the following steps:

[0247] Obtain the cumulative usage time of the current shared key, the average communication flow between the data sender and the data receiver per unit time, and the number of communication anomalies within the cumulative usage time;

[0248] The current communication indicators are obtained based on the cumulative usage time, average communication traffic and number of communication anomalies.

[0249] Optionally, the cumulative usage time can be understood as the cumulative time (unit: min) from the last key update to the next key update, which can be determined based on the current time and the generation time of the current shared key; it can also be determined based on the current time and the sending time of the first data packet transmitted after encryption based on the current shared key.

[0250] Optionally, the unit time can be determined according to actual needs, and can usually be 1 minute.

[0251] Optionally, the number of communication anomalies can be determined based on the number of attacks, the number of data errors, etc. within the accumulated usage time.

[0252] In the actual implementation process, the current communication index is obtained based on the cumulative usage time, average communication traffic and number of communication anomalies, which can be seen in the following formula (8).

[0253] Formula (8)

[0254] Specifically, B(t) is the average communication traffic per unit time (in megabytes (M)); t (in minutes) is the cumulative usage duration; n is the number of communication anomalies within the cumulative usage duration; and T is the calculated current communication indicator. K1, K2, and K3 are the impact factors of the three dimensions on the preset update threshold. K1 is the impact factor of the current node's average communication traffic on the preset update threshold, K2 is the impact factor of the cumulative usage duration on the preset update threshold, and K3 is the impact factor of the number of communication anomalies on the preset update threshold.

[0255] Optionally, the three influencing factors K1, K2, and K3 can all be initially set to 1. Whenever a data anomaly occurs, it can be equivalent to 60 minutes of additional accumulated time, and the effect of the data anomaly is directly linked to the accumulated time.

[0256] In actual implementation, when the current communication indicator of the communication channel between the data sending end and the data receiving end is less than the preset update threshold, the key update can be triggered immediately, and the other end of the communication channel connection can be notified to also update the key.

[0257] For example, when the BMC control end monitors that the current communication indicator T of the dedicated channel of the target client is less than a preset update threshold, the BMC control end may understand to update the current shared key and notify the client corresponding to the dedicated channel to also update the shared key.

[0258] In an optional embodiment of this specification, the preset update threshold can be calculated based on the impact factor being 1, the average communication flow between the two ends being 1M / min, and the cumulative usage time being 1440 minutes (24 hours). The result is 1 / 1440. That is, the preset update threshold can be set to 1 / 1440.

[0259] It should be noted that in different projects, developers can set parameters according to actual conditions, thereby calculating different preset update thresholds.

[0260] See also Figure 5 , Figure 5 A key update flow chart provided by an embodiment of this specification is shown.

[0261] Initially, the BMC defines initial public and private keys and notifies each client 1 through N to determine their initial public and private keys. After the BMC and each client have exchanged public keys, the BMC calculates and obtains initial shared keys S1, S2, SN, and N, between the BMC and client 1, S2, and SN, respectively.

[0262] The BMC monitors the current communication indicators T1 to TN between each client, determines T that is less than a preset update threshold, and notifies the corresponding client to update the key when T is less than the preset update threshold.

[0263] This embodiment determines a preset update threshold based on influencing factors from three dimensions and calculates the current communication metrics during communication between the two ends in real time. This allows for a comprehensive assessment of the security of the current shared key based on communication volume, cumulative duration, and number of exceptions. When the value falls below the preset update threshold, a key update can be triggered promptly, thereby improving key security. Furthermore, the security of private data can be guaranteed while balancing data transmission efficiency.

[0264] In practical applications, the network environment during data transmission may interfere with the integrity of the data, resulting in data loss or corruption. In order to improve the data's anti-interference ability, automatic error correction can also be achieved based on an anti-interference coding mechanism.

[0265] According to one or more optional embodiments of the present specification, before encrypting the target data based on the shared key and obtaining the target encrypted data, the following steps may also be included:

[0266] Identify key data in the target data;

[0267] determining at least one check bit of the key data based on the data bits of the key data;

[0268] At least one check digit is inserted into the key data, and a check digit value of each check digit is generated to obtain updated target data.

[0269] It should be noted that the coding method used by the anti-interference coding mechanism can be determined according to the needs of actual applications. One or more embodiments of this specification are based on the Hamming code coding method to further explain the implementation of the anti-interference coding mechanism.

[0270] Specifically, key data can be understood as privacy data or important information in target data.

[0271] For example, key data may include account information, user personal data, and the like.

[0272] In an optional embodiment of the present specification, the target data as a whole may be encoded with Hamming code, or the encrypted data after encryption may be encoded with Hamming code as a whole.

[0273] In another optional embodiment of the present specification, in order to improve data transmission efficiency, Hamming code encoding may be performed only on key data in the target data, thereby avoiding loss or damage of the key data.

[0274] Optionally, the key data in the target data may be determined based on the type information of each data item in the target data.

[0275] Optionally, determining at least one check bit of the key data based on the data bits of the key data may include:

[0276] Determine the first value and first position corresponding to the data bit of the key data;

[0277] The second bit value and the second position of the check bit are determined according to the first bit value and the first position.

[0278] Specifically, the first bit value can be understood as the bit value of the data bit of the key data. For example, if the key data includes n bits, the first bit value is n. The first position can be understood as the position of the data bit.

[0279] The second digit value can be understood as the check digit value of the key data. Continuing with the above example, based on the first digit n, the second digit value can be further determined. The second position can be understood as the position of the check digit.

[0280] Optionally, the second digit value may be determined based on the first digit value. The specific calculation method may be referred to the following formula (9).

[0281] Formula (9)

[0282] Wherein, k is the second digit value and n is the first digit value.

[0283] Optionally, the second position can be determined based on the first position. Typically, the check bit can be inserted into the power-of-two exponential position of the data (such as the 1st bit, the 2nd bit, the 4th bit, etc.).

[0284] Optionally, inserting at least one check digit into the key data and generating a check digit value for each check digit to obtain updated target data may include:

[0285] Insert the second digit value and the check digit into the second position of the key data to obtain the intermediate key data;

[0286] Calculate the check value corresponding to each check digit, and add the check value to the second position to obtain the updated key data;

[0287] Based on the updated key data, updated target data is obtained.

[0288] See also Figure 6 , Figure 6 A Hamming code encoding flow chart provided by an embodiment of this specification is shown.

[0289] At the beginning of encoding, the key data to be encoded is obtained; the data bits (n bits) of the key data are input; the required check bits (k bits) are calculated based on the data bits. The calculation formula can be found in the above formula (9); the check bit position is determined (usually a power of 2 position); and a codeword containing the check bit and the data bits is generated. Optionally, during the codeword generation process, the check bit position is usually filled with 0, and the remaining positions are filled with data bits.

[0290] For a codeword composed of data bits and check bits, each check bit value is calculated. Optionally, each check bit value can be calculated by performing a parity check on the data bits at a specific position in the codeword. Specifically, the check bit p i The corresponding check bit value is obtained by performing a parity check on all data bits including the i-th bit in the position number.

[0291] Furthermore, the check bit is inserted into the corresponding position and the encoded data with the Hamming code is output.

[0292] By applying this embodiment, by inserting a Hamming code with a check bit value into the key data, forward error correction of the data can be implemented through the Hamming code. During the data transmission or storage process, single-bit errors can be accurately detected and corrected, thereby improving the reliability of the data transmission process and enhancing the anti-interference capability during the data transmission process.

[0293] In an optional embodiment of the present specification, a higher level anti-interference coding technology may be used to further improve the reliability of data transmission. The higher level anti-interference coding technology may include LDPC (Low-Density Parity-Check Code) code.

[0294] Specifically, LDPC codes are linear block codes that detect and correct errors during transmission by introducing the concept of a parity check matrix. The parity check matrix of an LDPC code has a low density, meaning that most of the elements in the matrix are zero, with only a few non-zero elements.

[0295] During the encoding process, the information bit vector is multiplied by the LDPC code's check matrix through matrix multiplication to obtain the codeword. During the decoding process, the sparse characteristics of LDPC codes are utilized through the BP algorithm, the sum-product algorithm, etc., and the received noisy signal is gradually corrected through iterative operations.

[0296] In actual implementation, the excellent error correction performance of LDPC codes can further enhance the anti-interference capability and data reliability during data transmission. Furthermore, the low-complexity decoding algorithm of LDPC codes can further improve system efficiency, thereby enhancing overall system performance.

[0297] Step 210: Send the target encrypted data to the data receiving end, wherein the data receiving end is used to generate a shared key based on the second private key and the first public key according to the second protocol, decrypt the target encrypted data based on the shared key, and obtain the target data.

[0298] In actual applications, the data receiving end determines the second private key and the second public key corresponding to the data receiving end based on the same preset encryption protocol as the data sending end, sends the second public key to the data sending end and receives the first public key sent by the data sending end; and generates a shared key corresponding to the data receiving end based on the second private key and the first public key.

[0299] It's important to note that, due to the specificities of the ECC protocol, while the data sender generates a shared key based on the first private key and the second public key, and the data receiver generates a shared key based on the second private key and the first public key, as long as both parties agree on the same target elliptic function curve (i.e., identical a, b, and p), the same initial coordinate point (i.e., identical G), and the same preset value range (i.e., identical cipher table length), the data sender and the data receiver can generate the same shared key. This allows the data sender to symmetric encrypt the target data using the shared key, and the data receiver to symmetric decrypt the target encrypted data using the shared key.

[0300] In actual applications, data may be lost or damaged due to the influence of the network environment during transmission. In order to verify whether there are any errors in the data, the data integrity of the target encrypted data can also be verified when the data receiving end receives the target encrypted data.

[0301] An embodiment of the present specification provides a data integrity verification mechanism. Before a data sending end sends data, summary information can be generated for the plaintext target data and the ciphertext target encrypted data respectively, and attached to the data packet and sent to the data receiving end; the data receiving end can calculate the summary information for the received target encrypted data and the target data obtained after decryption respectively, thereby realizing data integrity verification.

[0302] Furthermore, if data incompleteness is detected, the anti-interference coding mechanism provided in the above embodiment can be used to correct data errors. If the plaintext data after error correction still fails the integrity check, the received data packet can be discarded and the data sender can be requested to resend the target data in the data packet.

[0303] According to one or more optional embodiments of the present specification, after encrypting the target data based on the shared key and obtaining the target encrypted data, the following steps may also be included:

[0304] Determine first summary information corresponding to the target data, and generate second summary information corresponding to the target encrypted data;

[0305] Send the target encrypted data to the data receiving end, including:

[0306] The target encrypted data, the first summary information, and the second summary information are sent to a data receiving end, wherein the second summary information is used to verify the data integrity of the target encrypted data, and the first summary information is used to verify the data integrity of the target data after error correction based on the check bit value.

[0307] In an optional embodiment of the present specification, determining the first summary information corresponding to the target data may include: obtaining first summary information pre-generated for the target data.

[0308] In another optional embodiment of the present specification, determining the first summary information corresponding to the target data may also include: generating the first summary information for the target data.

[0309] Specifically, the first summary information is a message digest corresponding to the target data, and the second summary information is a message digest corresponding to the target encrypted data.

[0310] Specifically, the target encrypted data can be understood as a combination of encrypted data blocks [C1, ..., CN] obtained by encryption with a shared key, wherein each encrypted data block can be encoded with a Hamming code for key data bits before encryption.

[0311] Optionally, the method for generating the summary information may include: generating a message digest by using a hash function.

[0312] Specifically, the hash function may include MD5, SHA series, etc. Figure 7 , taking the hash function SHA-256 as an example, the specific implementation process of the data integrity verification mechanism is further explained.

[0313] See also Figure 7 , Figure 7 A message digest processing flow chart provided by an embodiment of this specification is shown.

[0314] At the beginning, obtain the plaintext data B carrying the Hamming code and the encrypted data block C composed of the ciphertext block [C1,...,CN]. Among them, the Hamming code is the code carried by the key data in the plaintext data.

[0315] Use the SHA-256 hash function to calculate the hash values ​​corresponding to B and C respectively, and obtain the first digest information Hash1 corresponding to B and the second digest information Hash2 corresponding to C.

[0316] The data sender and the data receiver can agree on the storage location of the hash value, which can be a fixed location or a dynamically changing location.

[0317] By appending Hash1 and Hash2 to the agreed positions of the data packet respectively, a data packet containing the ciphertext block C, Hash1 and Hash2 can be sent.

[0318] By applying this embodiment, by determining the first summary information corresponding to the target data and generating the second summary information corresponding to the target encrypted data, the target encrypted data, the first summary information, and the second summary information can be sent together to the data receiving end; the data receiving end can verify the data integrity of the ciphertext data based on the second summary information. When the check values ​​are inconsistent, data error correction can be performed on the decrypted plaintext data using the Hamming code, and the data consistency of the plaintext data can be verified based on the first summary information, thereby realizing the verification of data consistency and integrity, which can improve the quality of data transmission and ensure data accuracy.

[0319] See also Figure 8 , Figure 8 A flow chart of an end-to-end data processing method provided according to an embodiment of the present specification is shown. The method is applied to a data receiving end and specifically includes the following steps.

[0320] Step 802: Determine a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key.

[0321] Step 804: Determine the second private key and the second public key of the data receiving end according to the first protocol.

[0322] Step 806: Send the second public key to the data sending end, and receive the first public key sent by the data sending end, wherein the first public key is generated based on the first private key of the data sending end, and the first public key and the first private key are determined according to the first protocol.

[0323] Step 808: According to the second protocol, determine the second calculation coefficient corresponding to the second private key, and generate a shared key based on the second calculation coefficient and the first public key.

[0324] Specifically, the second calculation coefficient is determined according to the second private key, and the second calculation coefficient represents the number of calculations on the first public key.

[0325] It should be noted that the specific implementation of steps 802 to 808 is the same as that of the above-mentioned steps 202 to 208. The specific implementation of steps 802 to 808 can be found in steps 202 to 208, and will not be described in detail in the embodiments of this specification.

[0326] Step 810: Receive target encrypted data sent by the data sending end, and decrypt the target encrypted data based on the shared key to obtain target data, wherein the target encrypted data is obtained by the data sending end generating a shared key based on the first private key and the second public key according to the second protocol, and encrypting the target data based on the shared key.

[0327] In actual applications, the data receiving end can receive the target encrypted data sent by the data sending end, and decrypt the target encrypted data based on the shared key to obtain the target data.

[0328] By applying this embodiment, by determining the second private key and the second public key of the data receiving end, the first public key of the data sending end can be exchanged based on the second public key, thereby generating a shared key between the two ends based on the second private key and the first public key. Since the public key is exchanged, even if the public key is obtained by an attacker, the attacker cannot crack the shared key based on the public key, thereby ensuring the security of the target encrypted data during the data transmission process; by decrypting the target encrypted data through the shared key, the encrypted data can be decrypted to obtain the plaintext data, thereby obtaining the target data while ensuring the security of the privacy data.

[0329] In an optional embodiment of the present specification, the target encrypted data may include an encrypted data block [C1, ..., CN] and an initial vector; decrypting the target encrypted data based on the shared key to obtain the target data may include:

[0330] Determine the symmetric key corresponding to the initialization vector and the shared key;

[0331] The target encrypted data is decrypted according to the initial vector and the symmetric key to obtain the target data.

[0332] Optionally, the initialization vector may be obtained from a data packet corresponding to the target encrypted data.

[0333] Furthermore, decrypting the target encrypted data according to the initial vector and the symmetric key to obtain the target data may include:

[0334] Obtain N encrypted data blocks, where N ≥ 1 and is a positive integer;

[0335] Decrypt the first encrypted data block using the symmetric key to obtain the first decrypted data block, and perform XOR processing on the first decrypted data block based on the initial vector to obtain the first plaintext data block;

[0336] Decrypt the jth encrypted data block using the symmetric key to obtain the jth decrypted data block, and perform XOR processing on the jth decrypted data block based on the j-1th plaintext data block to obtain the jth plaintext data block, where 1≤j≤N and j is a positive integer.

[0337] The following combined Figure 9 , further explains the process of shared key decryption. Figure 9 A shared key decryption flow chart provided by an embodiment of this specification is shown.

[0338] Initially, the package data of the ciphertext block and the initial vector IV is obtained, and the ciphertext block [C1, ..., CN] and IV are extracted, where there are N ciphertext blocks in total, and N is a positive integer greater than or equal to 1.

[0339] Determine the shared key S(x, y) at the data receiver. Generate a 256-bit symmetric key K corresponding to the shared key S(x, y) based on SHA-256(S). Call the AES-256-CBC decryption algorithm to decrypt the ciphertext block C1 using the symmetric key K to obtain the decrypted data. Perform an XOR operation (XOR, symbol ⊕) on the decrypted data with the initialization vector IV to obtain the plaintext block B1.

[0340] Call the AES-256-CBC decryption algorithm and decrypt ciphertext block C2 using the symmetric key K to obtain the decrypted data. This decrypted data is then XORed (XORed with the symbol ⊕) with plaintext block B1 to obtain plaintext block B2. This continues until the decrypted data corresponding to ciphertext block CN is XORed with plaintext block CN-1 to obtain plaintext block BN.

[0341] Assemble the plaintext blocks [B1,…,BN] to get the original data.

[0342] Optionally, the specific method of AES decryption can be implemented by calling the underlying function of the OpenSSL library.

[0343] In another optional embodiment of the present specification, the target encrypted data may include an encrypted data block [C1, ..., CN], an initial vector, first digest information, and second digest information; and before decrypting the target encrypted data based on the shared key, the following may also be included:

[0344] Calculating third summary information corresponding to the entire encrypted data block;

[0345] determining whether the third summary information is the same as the second summary information;

[0346] If they are the same, the target encrypted data is decrypted based on the shared key to obtain the target data;

[0347] If they are different, the target encrypted data is decrypted based on the shared key to obtain the plaintext data, and data error correction is performed based on the check bit value in the plaintext data.

[0348] Furthermore, after performing data error correction according to the check bit value in the plaintext data, the following steps may also be included:

[0349] Calculating fourth summary information corresponding to the error-corrected plaintext data;

[0350] determining whether the fourth summary information is the same as the first summary information;

[0351] If yes, the corrected plaintext data is determined as the target data;

[0352] If not, discard the data.

[0353] Optionally, in the case of discarding the current data, a data acquisition request for the target data may be sent to the data sending end.

[0354] The following combined Figure 10 , further explains the data integrity verification process and the data recovery process. Figure 10 A data integrity check and data recovery flow chart provided by an embodiment of this specification is shown.

[0355] Initially, the data receiver receives a data packet sent by the data transmitter over the communication link. It extracts the ciphertext block C, Hash1, and Hash2 from the data packet. Hash1 is the hash value generated by hashing the entire plaintext data after inserting the Hamming code and the corresponding Hamming code. Hash2 is the hash value generated by hashing the entire encrypted ciphertext data block.

[0356] The data receiving end recalculates the hash value of the entire ciphertext data block in the received data packet to obtain Hash3, and determines whether Hash3 is the same as Hash2.

[0357] If they are the same, it means that the data is complete and subsequent data processing can continue.

[0358] If they are different, it means that the data is incomplete and may be abnormal, distorted or tampered with.

[0359] If the data is incomplete, the AES-256-CBC algorithm is used to decrypt ciphertext block C and obtain the decrypted data. The Hamming code error correction logic is used to correct the decrypted data and the hash value Hash4 is recalculated for the corrected data. The Hash4 is then checked to see if it is the same as Hash1.

[0360] If they are the same, it means that the data recovery is successful and you can continue with subsequent data processing.

[0361] If they are different, it means that the data cannot be successfully recovered. The data can be discarded and the data sender is notified to resend the data.

[0362] See also Figure 11 , Figure 11 A Hamming code error correction flow chart provided by an embodiment of this specification is shown.

[0363] Initially, the data with the Hamming code is obtained, the check digit in the data is recalculated, and the recalculated check digit is compared with the received check digit to see if the check digit value is the same.

[0364] If there is no difference, it means that the data is error-free and the correct data bits can be output to obtain the original data.

[0365] If there is a discrepancy, it means that the data was lost or damaged during transmission and needs to be corrected using Hamming code.

[0366] If there is a discrepancy, the error location is determined by checking the difference between the check bits. The error bit is flipped to correct the single-bit error. Once the error correction is complete, the correct data bit is output.

[0367] It should be noted that the error-corrected data can be further verified by calculating a hash value to determine whether the data is the same as the original data, thereby ensuring data consistency.

[0368] The following combined Figure 12-13 , taking the application of the end-to-end data processing method provided in this specification in the end-to-end communication based on the BMC control terminal as an example, the data processing method is further explained. Figure 12 The diagram shows an architecture diagram of a BMC-client communication encryption and decryption system provided by an embodiment of the present specification. Figure 13 A flowchart of a data encryption and decryption process provided by an embodiment of this specification is shown.

[0369] See also Figure 12 The communication encryption and decryption system includes a BMC control terminal and a client. The BMC control terminal and the client transmit data through a pre-established communication link. The BMC control terminal can act as a data transmitter to send data to the client, or as a data receiver to receive data sent by the client.

[0370] Before establishing a communication connection between the BMC control end and the client, the parameter information, initial coordinate points and preset value range of the target elliptic function curve can be agreed upon based on the ECC protocol, so as to generate the same shared key S on both ends through public key exchange.

[0371] When the BMC, acting as the data transmitter, sends data to the client, it identifies key data and encodes it using Hamming code, adding error correction. Based on the shared key S, it uses a symmetric encryption algorithm to generate ciphertext from the data containing the Hamming code. The BMC generates digests for both the original data and the ciphertext, appends the digest to the ciphertext, and sends the packet containing both to the client.

[0372] The client receives the data packet, extracts the encrypted ciphertext and digest information, recalculates the hash value corresponding to the encrypted ciphertext, and performs a data integrity check using the hash value corresponding to the encrypted ciphertext in the data packet. If the check passes, the client decrypts the data using the shared key S, directly obtaining the original data. If the check fails, the client decrypts the data using the shared key S, performs data error correction using Hamming code, and recalculates the hash value of the corrected data. A data consistency check is performed using the hash value corresponding to the plaintext data in the data packet. If the check passes, the corrected data is identified as the original data; otherwise, the received data is discarded. If the data is discarded, the client can send a request to the BMC control terminal to retrieve the data packet.

[0373] When the client, acting as the data transmitter, sends data to the BMC controller, it identifies key data and encodes it using Hamming code to add error correction. Based on the shared key S, the client uses a symmetric encryption algorithm to generate ciphertext from the data containing the Hamming code. The client generates a digest for both the original data and the ciphertext, appends the digest to the ciphertext, and sends the packet containing both the ciphertext and digest to the BMC controller.

[0374] The BMC control terminal receives the data packet, extracts the encrypted ciphertext and digest information, recalculates the hash value corresponding to the encrypted ciphertext, and performs a data integrity check using the hash value corresponding to the encrypted ciphertext in the data packet. If the check passes, the original data can be directly obtained after decryption using the shared key S. If the check fails, the data is decrypted using the shared key S, corrected using Hamming code, and the hash value is recalculated for the corrected data. A data consistency check is performed using the hash value corresponding to the plaintext data in the data packet. If the check passes, the corrected data is determined to be the original data; if the check fails, the received data is discarded. If the data is discarded, the BMC control terminal can send a request to the client to retrieve the data packet.

[0375] See also Figure 13 The data encryption process is applied to the data sending end A, specifically including:

[0376] The data transmitter A obtains the original data M, determines the important data in the original data M, and adds a Hamming code (E) to the important data to obtain the encoded data (M, E).

[0377] At the same time, the data transmitter A can generate a temporary key pair (private key k_a, public key K_A) based on the ECC protocol agreed upon with the data receiver B. The shared key S is calculated based on the private key k_a and the public key K_B sent by the data receiver.

[0378] It should be noted that the specific method for generating the temporary key pair can refer to the specific implementation of step 202 above.

[0379] The data sender A generates the corresponding symmetric encryption key K based on the shared key S, and encrypts the encoded data (M, E) based on the symmetric encryption key K to obtain the ciphertext C.

[0380] It should be noted that the specific implementation of symmetric encryption can refer to the specific implementation of step 206 above.

[0381] For the original data M and the ciphertext C, digest information H1 corresponding to the original data M and digest information H2 corresponding to the ciphertext C can be generated respectively.

[0382] The data sending end A can send the temporary public key K_A and the ciphertext C, H1, and H2 to the data receiving end B through the communication link between the data sending end A and the data receiving end B.

[0383] The data decryption process is applied to the data receiving end B, and specifically includes:

[0384] Data receiver B receives ciphertext C, H1, H2, and the temporary public key K_A and performs integrity verification using a hash function.

[0385] Specifically, the data receiving end B recalculates the digest information H3 corresponding to the ciphertext C and verifies whether H3 is the same as H2.

[0386] Data receiver B calculates the shared key S based on its temporary private key K_b and the data sender's temporary public key K_A. It generates the symmetric decryption key K based on the shared key S. It decrypts the ciphertext C using the symmetric decryption key K to obtain the encoded data (M, E) using the Hamming code.

[0387] When H3 and H2 are the same, the data bits in the encoded data (M, E) can be directly output to obtain the original data M.

[0388] When H3 and H2 are different, the Hamming code error correction logic is called to determine the error position in the encoded data, flip the data bit at that position, correct the single-bit error, and obtain the recovered plaintext data.

[0389] Calculate the digest H4 of the recovered plaintext data and determine whether H4 is identical to H1. If so, data recovery is successful, and the recovered plaintext data is the original data M. If not, data recovery fails, the transmitted data is discarded, and a request is sent to the data sender to retrieve the data.

[0390] By applying this embodiment, the data transmitter and receiver determine the same key generation rules through the ECC protocol. This allows them to generate temporary key pairs on their respective ends and, based on the exchanged public keys, generate the same shared key. Due to the unique nature of ECC, the key length is shorter but the security is higher, thereby improving key generation efficiency and protecting private data. By inserting a Hamming code with a check bit value into the critical data, forward error correction (FEC) can be implemented using the Hamming code. During data transmission or storage, single-bit errors can be accurately detected and corrected, thereby improving the reliability of data transmission and enhancing the anti-interference capability of data transmission.

[0391] In addition, by generating digest information for the original data and ciphertext data separately, and sending both the ciphertext data and the two digest information to the data receiving end, data integrity verification can be achieved during data transmission. The data receiving end can verify the integrity of the ciphertext data. If it is incomplete, it uses Hamming code error correction logic to correct key data errors. It can also regenerate and verify the summary information of the corrected plaintext data, thereby verifying whether the corrected data has been correctly restored. This double hash value verification can ensure data accuracy and improve data transmission reliability.

[0392] Corresponding to the above method embodiment, this specification also provides an end-to-end data processing device embodiment, Figure 14 FIG1 shows a schematic diagram of the structure of an end-to-end data processing device provided by an embodiment of this specification, wherein the device is configured at the data sending end. Figure 14 As shown, the device includes:

[0393] The first acquisition module 1402 is configured to determine a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key.

[0394] The first determining module 1404 is configured to determine the first private key and the first public key of the data sending end according to the first protocol.

[0395] The first receiving module 1406 is configured to send the first public key to the data receiving end and receive the second public key sent by the data receiving end, wherein the second public key is generated based on the second private key of the data receiving end, and the second public key and the second private key are determined according to the first protocol.

[0396] Encryption module 1408: configured to determine the first calculation coefficient corresponding to the first private key according to the second protocol, generate a shared key according to the first calculation coefficient and the second public key, and encrypt the target data based on the shared key to obtain target encrypted data.

[0397] Sending module 1410: configured to send the target encrypted data to the data receiving end, wherein the data receiving end is used to generate a shared key based on the second private key and the first public key according to the second protocol, decrypt the target encrypted data based on the shared key, and obtain the target data.

[0398] Optionally, the first determining module 1404 is further configured to:

[0399] Obtain parameter information, initial coordinate points, and preset value range of the target elliptic function curve;

[0400] Determine a target integer within a preset value range as the first private key, wherein the target integer is any integer within the preset value range;

[0401] According to the parameter information and the initial coordinate point, a first coordinate point corresponding to the target integer on the target elliptic function curve is generated, and the first coordinate point is determined as the first public key.

[0402] Optionally, the encryption module 1408 is further configured to:

[0403] Determine the symmetric key corresponding to the initialization vector and the shared key;

[0404] The target data is encrypted according to the initial vector and the symmetric key to obtain the target encrypted data.

[0405] Optionally, the encryption module 1408 is further configured to:

[0406] Split the target data into N data blocks, where N is ≥ 1 and is a positive integer;

[0407] Based on the initial vector, the first data block is XORed and the XOR result is encrypted using a symmetric key to obtain the first encrypted data block;

[0408] Based on the i-th encrypted data block, perform XOR processing on the i+1-th data block, and encrypt the XOR processing result using the symmetric key to obtain the i+1-th encrypted data block, where 1≤i≤N-1 is a positive integer;

[0409] According to the 1st to Nth encrypted data blocks, target encrypted data is obtained.

[0410] Optionally, the data processing device further includes an update module configured to:

[0411] Determine the current communication indicators between the data sending end and the data receiving end;

[0412] When the current communication indicator is lower than a preset update threshold, a key update instruction is generated, wherein the key update instruction is used to instruct the data sending end and the data receiving end to update the key.

[0413] Optionally, the update module is further configured to:

[0414] Obtain the cumulative usage time of the current shared key, the average communication flow between the data sender and the data receiver per unit time, and the number of communication anomalies within the cumulative usage time;

[0415] The current communication indicators are obtained based on the cumulative usage time, average communication traffic and number of communication anomalies.

[0416] Optionally, the data processing device further includes a verification module configured to:

[0417] Identify key data in the target data;

[0418] determining at least one check bit of the key data based on the data bits of the key data;

[0419] At least one check digit is inserted into the key data, and a check digit value of each check digit is generated to obtain updated target data.

[0420] Optionally, the sending module 1410 is further configured to:

[0421] Determine first summary information corresponding to the target data, and generate second summary information corresponding to the target encrypted data;

[0422] The target encrypted data, the first summary information, and the second summary information are sent to a data receiving end, wherein the second summary information is used to verify the data integrity of the target encrypted data, and the first summary information is used to verify the data integrity of the target data after error correction based on the check bit value.

[0423] By applying this embodiment, by determining the first private key and the first public key of the data sending end according to the first protocol, the second public key of the data receiving end can be exchanged based on the first public key, so that the data sending end can generate a shared key based on the first private key and the second public key according to the second protocol, and the data receiving end can generate the same shared key based on the second private key and the first public key according to the second protocol, thereby realizing end-to-end data encryption transmission; and, since the public key is exchanged, even if the attacker intercepts the public key from the key exchange process, the shared key cannot be cracked based on the public key, which can effectively ensure the security of the key and thus improve the security of the encrypted data; encrypting the target data by the shared key can improve the security of the end-to-end data transmission process and ensure the security of privacy data.

[0424] The above is a schematic diagram of a data processing device configured at a data transmitting end according to this embodiment. It should be noted that the technical solution of the data processing device configured at the data transmitting end and the technical solution of the data processing method applied to the data transmitting end share the same concept. For details not described in detail in the technical solution of the data processing device configured at the data transmitting end, please refer to the description of the technical solution of the data processing method applied to the data transmitting end.

[0425] Corresponding to the above method embodiment, this specification also provides an end-to-end data processing device embodiment, Figure 15 FIG1 shows a schematic diagram of the structure of an end-to-end data processing device provided by an embodiment of this specification, wherein the device is configured at the data receiving end. Figure 15 As shown, the device includes:

[0426] The second acquisition module 1502 is configured to determine a preset key generation protocol, wherein the preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key.

[0427] The second determining module 1504 is configured to determine the second private key and the second public key of the data receiving end according to the first protocol.

[0428] The second receiving module 1506 is configured to send the second public key to the data sending end and receive the first public key sent by the data sending end, wherein the first public key is generated based on the first private key of the data sending end, and the first public key and the first private key are determined according to the first protocol.

[0429] The generation module 1508 is configured to determine a second calculation coefficient corresponding to the second private key according to the second protocol, and generate a shared key according to the second calculation coefficient and the first public key.

[0430] Decryption module 1510: configured to receive target encrypted data sent by the data sending end, and decrypt the target encrypted data based on the shared key to obtain target data, wherein the target encrypted data is obtained by the data sending end generating a shared key based on the first private key and the second public key according to the second protocol, and encrypting the target data based on the shared key.

[0431] By applying this embodiment, by determining the second private key and the second public key of the data receiving end, the first public key of the data sending end can be exchanged based on the second public key, thereby generating a shared key between the two ends based on the second private key and the first public key. Since the public key is exchanged, even if the public key is obtained by an attacker, the attacker cannot crack the shared key based on the public key, thereby ensuring the security of the target encrypted data during the data transmission process; by decrypting the target encrypted data through the shared key, the encrypted data can be decrypted to obtain the plaintext data, thereby obtaining the target data while ensuring the security of the privacy data.

[0432] The above is a schematic diagram of a data processing device configured at a data receiving end according to this embodiment. It should be noted that the technical solution of the data processing device configured at the data receiving end and the technical solution of the data processing method applied to the data receiving end are based on the same concept. For details not described in detail in the technical solution of the data processing device configured at the data receiving end, please refer to the description of the technical solution of the data processing method applied to the data receiving end.

[0433] Figure 16 16 shows a block diagram of a computing device 1600 according to one embodiment of the present disclosure. Components of the computing device 1600 include, but are not limited to, a memory 1610 and a processor 1620. The processor 1620 is connected to the memory 1610 via a bus 1630, and a database 1650 is used to store data.

[0434] Computing device 1600 also includes an access device 1640 that enables computing device 1600 to communicate via one or more networks 1660. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. Access device 1640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, or a near field communication (NFC) interface.

[0435] In one embodiment of the present specification, the above components of the computing device 1600 and Figure 16 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 16The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.

[0436] Computing device 1600 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1600 can also be a mobile or stationary server.

[0437] The processor 1620 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned end-to-end data processing method.

[0438] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-mentioned end-to-end data processing method are based on the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-mentioned end-to-end data processing method.

[0439] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned end-to-end data processing method.

[0440] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above-mentioned end-to-end data processing method are based on the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-mentioned end-to-end data processing method.

[0441] An embodiment of the present specification further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned end-to-end data processing method when executed by a processor.

[0442] The above is an illustrative embodiment of a computer program product. It should be noted that the technical solution of this computer program product and the technical solution of the aforementioned end-to-end data processing method share the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the aforementioned end-to-end data processing method.

[0443] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0444] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium may be appropriately increased or decreased based on the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0445] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0446] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0447] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. An end-to-end data processing method, characterized in that: Applied to the data sending end, including: Obtaining the accumulated usage time of the current shared key, the average communication flow between the data sending end and the data receiving end per unit time, and the number of communication anomalies within the accumulated usage time; Obtaining a current communication indicator based on the accumulated usage time, the average communication flow, and the number of communication anomalies; When the current communication indicator is lower than a preset update threshold, determining a preset key generation protocol, and determining a first private key of the data sending end, a second public key of the data receiving end, and a first calculation coefficient corresponding to the first private key according to the preset key generation protocol; generating a shared key based on the first calculation coefficient and the second public key, and encrypting target data based on the shared key to obtain target encrypted data, wherein the first calculation coefficient represents the number of calculations performed on the second public key, and the first calculation coefficient is the value of the first private key minus 1; The target encrypted data is sent to the data receiving end, wherein the data receiving end is used to determine the second private key of the data receiving end and the first public key of the data sending end according to the preset key generation protocol, and generate the shared key based on the second private key and the first public key, and decrypt the target encrypted data based on the shared key to obtain the target data.

2. The method according to claim 1, characterized in that The preset key generation protocol includes a first protocol for generating a private key and a public key and a second protocol for generating a shared key; The determining, according to the preset key generation protocol, the first private key of the data sending end, the second public key of the data receiving end, and the first calculation coefficient corresponding to the first private key includes: Determining a first private key and a first public key of the data sending end according to the first protocol; Sending the first public key to a data receiving end, and receiving a second public key sent by the data receiving end, wherein the second public key is generated based on a second private key of the data receiving end, and the second public key and the second private key are determined according to the first protocol; According to the second protocol, a first calculation coefficient corresponding to the first private key is determined.

3. The method according to claim 2, characterized in that Determining the first private key and the first public key of the data sending end according to the first protocol includes: Obtain parameter information, initial coordinate points, and preset value range of the target elliptic function curve; Determine a target integer within the preset value range as the first private key, wherein the target integer is any integer within the preset value range; A first coordinate point corresponding to the target integer on the target elliptic function curve is generated according to the parameter information and the initial coordinate point, and the first coordinate point is determined as the first public key.

4. The method according to claim 1, wherein Encrypting the target data based on the shared key to obtain target encrypted data includes: Determine an initialization vector and a symmetric key corresponding to the shared key; The target data is encrypted according to the initial vector and the symmetric key to obtain target encrypted data.

5. The method according to claim 4, characterized in that The step of encrypting the target data according to the initial vector and the symmetric key to obtain target encrypted data includes: Splitting the target data to obtain N data blocks, where N is greater than or equal to 1 and is a positive integer; Based on the initial vector, performing an XOR process on the first data block, and encrypting the XOR process result using the symmetric key to obtain a first encrypted data block; Based on the i-th encrypted data block, perform XOR processing on the i+1-th data block, and encrypt the XOR processing result using the symmetric key to obtain the i+1-th encrypted data block, where 1≤i≤N-1 is a positive integer; According to the 1st to Nth encrypted data blocks, target encrypted data is obtained.

6. The method according to any one of claims 1 to 5, characterized in that Before encrypting the target data based on the shared key to obtain the target encrypted data, the method further includes: determining key data in the target data; determining at least one check bit of the key data based on the data bits of the key data; The at least one check bit is inserted into the key data, and a check bit value of each check bit is generated to obtain updated target data.

7. The method according to claim 6, characterized in that After encrypting the target data based on the shared key to obtain the target encrypted data, the method further includes: Determining first digest information corresponding to the target data, and generating second digest information corresponding to the target encrypted data; The sending of the target encrypted data to the data receiving end includes: The target encrypted data, the first summary information, and the second summary information are sent to the data receiving end, wherein the second summary information is used to verify the data integrity of the target encrypted data, and the first summary information is used to verify the data integrity of the target data after error correction based on the check bit value.

8. An end-to-end data processing method, characterized in that: Applied to the data receiving end, including: Obtaining the accumulated usage time of the current shared key, the average communication flow between the data sending end and the data receiving end per unit time, and the number of communication anomalies within the accumulated usage time; Obtaining a current communication indicator based on the accumulated usage time, the average communication flow, and the number of communication anomalies; When the current communication indicator is lower than a preset update threshold, determining a preset key generation protocol, and determining a second private key of the data receiving end, a first public key of the data sending end, and a second calculation coefficient corresponding to the second private key according to the preset key generation protocol; Generate a shared key based on the second calculation coefficient and the first public key, wherein the second calculation coefficient represents the number of calculations of the first public key, and the second calculation coefficient is the value of the second private key minus 1; Receive the target encrypted data sent by the data sending end, and decrypt the target encrypted data based on the shared key to obtain the target data, wherein the target encrypted data is obtained by the data sending end determining the first private key of the data sending end and the second public key of the data receiving end according to the preset key generation protocol, generating the shared key based on the first private key and the second public key, and encrypting the target data based on the shared key.

9. An end-to-end data processing device, characterized in that: Configured on the data sending end, including: The first updating module is configured to obtain the cumulative usage time of the current shared key, the average communication flow rate between the data sending end and the data receiving end per unit time, and the number of communication anomalies within the cumulative usage time; and obtain the current communication indicator based on the cumulative usage time, the average communication flow rate, and the number of communication anomalies; A first acquisition module is configured to determine a preset key generation protocol when the current communication indicator is lower than a preset update threshold, and determine a first private key of the data sending end, a second public key of the data receiving end, and a first calculation coefficient corresponding to the first private key according to the preset key generation protocol; an encryption module configured to generate a shared key based on the first calculation coefficient and the second public key, and encrypt target data based on the shared key to obtain target encrypted data, wherein the first calculation coefficient represents the number of calculations performed on the second public key, and the first calculation coefficient is the value of the first private key minus 1; A sending module is configured to send the target encrypted data to the data receiving end, wherein the data receiving end is used to determine the second private key of the data receiving end and the first public key of the data sending end according to the preset key generation protocol, and generate the shared key based on the second private key and the first public key, decrypt the target encrypted data based on the shared key, and obtain the target data.

10. An end-to-end data processing device, characterized in that: Configured at the data receiving end, including: The second updating module is configured to obtain the cumulative usage time of the current shared key, the average communication flow rate between the data sending end and the data receiving end per unit time, and the number of communication anomalies within the cumulative usage time; and obtain the current communication index based on the cumulative usage time, the average communication flow rate, and the number of communication anomalies; A second acquisition module is configured to determine a preset key generation protocol when the current communication indicator is lower than a preset update threshold, and determine the second private key of the data receiving end, the first public key of the data sending end, and a second calculation coefficient corresponding to the second private key according to the preset key generation protocol; a generating module configured to generate a shared key based on the second calculation coefficient and the first public key, wherein the second calculation coefficient represents the number of calculations of the first public key, and the second calculation coefficient is the value of the second private key minus 1; The decryption module is configured to receive the target encrypted data sent by the data sending end, and decrypt the target encrypted data based on the shared key to obtain the target data, wherein the target encrypted data is obtained by the data sending end determining the first private key of the data sending end and the second public key of the data receiving end according to the preset key generation protocol, generating the shared key based on the first private key and the second public key, and encrypting the target data based on the shared key.

11. A computing device, characterized in that include: memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the end-to-end data processing method according to any one of claims 1 to 8 are implemented.

12. A computer-readable storage medium, characterized in that It stores a computer program / instruction, which, when executed by a processor, implements the steps of the end-to-end data processing method according to any one of claims 1 to 8.

13. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the end-to-end data processing method according to any one of claims 1 to 8.