Data processing method and system based on DPU network card, electronic device and storage medium
By acquiring and decomposing initial plaintext and ciphertext data on the DPU network card to determine the target encryption rules, the problems of data leakage and inaccurate verification in the DPU network card encryption and decryption system are solved, achieving higher data encryption security and reduced CPU load.
Patent Information
- Application Number
- CN202510400255.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-04-01
AI Technical Summary
In high-speed data transmission environments, encryption and decryption systems based on DPU network cards suffer from data leakage risks and inaccurate verification task processing. Existing methods cannot process verification tasks in real time and accurately during high-speed data streams.
The DPU network card acquires initial plaintext and ciphertext data, performs calculations to determine the target encryption rule, and transmits it back to the DPU network card for decryption. This reduces CPU load and improves the security and reliability of data encryption by directly comparing plaintext and ciphertext data to calculate the encryption rule.
It effectively improves the security and reliability of data encryption, reduces CPU load, and enhances data processing efficiency and system performance.
Smart Images

Figure CN120151068B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of encryption and decryption technology, and in particular to a data processing method, system, electronic device and storage medium based on a DPU network card. Background Technology
[0002] Data encryption is a common method for protecting data security. However, during data transmission, if data leakage or encryption algorithm leakage occurs, the security of the encryption method may be threatened. Currently, there are encryption and decryption based on DPU cards, which can directly handle complex data calculation tasks such as encryption and decryption at the network interface card layer. However, in high-speed data transmission environments, data leakage or inability to process verification tasks in real time and accurately can still occur. Summary of the Invention
[0003] Therefore, it is necessary to provide a data processing method, system, electronic device, and storage medium based on a DPU network card to address the aforementioned technical problems.
[0004] In a first aspect, embodiments of this application provide a data processing method based on a DPU network card, applied to a central processing unit (CPU) of a data processing system. The data processing system includes a CPU and a DPU network card. The data processing method based on the DPU network card includes: acquiring multiple segments of initial plaintext data and multiple segments of initial ciphertext data. The multiple segments of initial ciphertext data are data received by the DPU network card that has been pre-encrypted according to the same encryption rule. The multiple segments of initial plaintext data and the multiple segments of initial ciphertext data correspond one-to-one.
[0005] Each initial plaintext data segment and its corresponding initial ciphertext data are processed to obtain multiple sets of processing results;
[0006] Based on the multiple sets of solution results, the target encryption rule is determined;
[0007] The target encryption rule is transmitted to the DPU network card so that the DPU network card can decrypt the received ciphertext data to be decrypted according to the target encryption rule.
[0008] As an optional implementation, in the first aspect of the embodiments of this application, the step of solving each initial plaintext data segment and the corresponding initial ciphertext data to obtain multiple sets of solution results includes:
[0009] The first initial ciphertext data is decrypted using the first encryption rule to obtain the first decrypted plaintext data corresponding to the first initial ciphertext data, wherein the first initial ciphertext data is any one of the multiple segments of initial ciphertext data;
[0010] If the first solved plaintext data is the same as the first initial plaintext data, then the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is determined to be the first encryption rule, and the first initial plaintext data is the plaintext data corresponding to the first initial ciphertext data among the multiple initial plaintext data segments.
[0011] As an optional implementation, in a first aspect of the embodiments of this application, after obtaining the first decoded plaintext data corresponding to the first initial ciphertext data, the method further includes:
[0012] If the first solved plaintext data is different from the first initial plaintext data, the first initial ciphertext data is solved using the second encryption rule to obtain the second solved plaintext data corresponding to the first initial ciphertext data. The second encryption rule and the first encryption rule are different encryption rules.
[0013] If the second solved plaintext data is the same as the first initial plaintext data, then the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is determined to be the second encryption rule;
[0014] If the second solved plaintext data is different from the first initial plaintext data, the above steps are repeated using other encryption rules until the solution results corresponding to the first initial ciphertext data and the first initial plaintext data are determined.
[0015] As an optional implementation, in a first aspect of the embodiments of this application, the step of decrypting the first initial ciphertext data using a first encryption rule to obtain the first decrypted plaintext data corresponding to the first initial ciphertext data includes:
[0016] The first initial ciphertext data is divided into multiple byte segments according to a preset number of bytes.
[0017] Based on the size relationship between bytes in each byte data segment, each byte data segment is processed to obtain the first processed plaintext data corresponding to the first initial ciphertext data.
[0018] As an optional implementation, in a first aspect of the embodiments of this application, the step of decomposing each byte data segment according to the size relationship between bytes in each byte data segment to obtain the first decomposed plaintext data corresponding to the first initial ciphertext data includes:
[0019] Determine the size relationship between the first byte and the second byte in the target byte data segment, wherein the target byte data segment is any one of the plurality of byte data segments;
[0020] If the first byte is greater than the second byte, the target byte data segment is solved according to the first correspondence relationship to obtain the first solved plaintext data corresponding to the first initial ciphertext data;
[0021] If the first byte is less than or equal to the second byte, then the target byte data segment is decoded according to the second correspondence to obtain the first decoded plaintext data corresponding to the first initial ciphertext data.
[0022] As an optional implementation, in a first aspect of the embodiments of this application, determining the target encryption rule based on the multiple sets of solution results includes:
[0023] If the multiple sets of solution results are found to be the same, then the encryption rule corresponding to the multiple sets of solution results is determined as the target encryption rule;
[0024] If the frequency of the third encryption rule in the encryption rules corresponding to the multiple sets of solution results is greater than a preset proportion, then the third encryption rule is determined to be the target encryption rule.
[0025] As an optional implementation, in a first aspect of this application, the step of determining the third encryption rule as the target encryption rule if the frequency of a third encryption rule appearing in the encryption rules corresponding to the multiple sets of solution results exceeds a preset proportion includes:
[0026] If it is detected that the frequency of the third encryption rule in the encryption rules corresponding to the multiple sets of solution results is greater than the preset ratio, and the frequency of other encryption rules is less than or equal to the preset ratio, then the third encryption rule is determined to be the target encryption rule.
[0027] The method further includes:
[0028] If it is detected that the frequency of all encryption rules in the encryption rules corresponding to the multiple sets of solution results is less than or equal to the preset ratio, then other plaintext data and other ciphertext data are obtained and re-solved.
[0029] Secondly, embodiments of this application provide a data processing system, the data processing system comprising: a CPU and a DPU network card, the data processing system comprising:
[0030] The acquisition module is used to acquire multiple segments of initial plaintext data and multiple segments of initial ciphertext data. The multiple segments of initial ciphertext data are data received by the DPU network card after the multiple segments of initial plaintext data have been encrypted in advance according to the same encryption rule. The multiple segments of initial plaintext data and the multiple segments of initial ciphertext data correspond one-to-one.
[0031] The processing module is used to decompose each initial plaintext data and its corresponding initial ciphertext data to obtain multiple sets of decomposition results;
[0032] The processing module is further configured to determine the target encryption rule based on the multiple sets of solution results;
[0033] The processing module is further configured to transmit the target encryption rule to the DPU network card, so that the DPU network card can decrypt the received ciphertext data to be decrypted according to the target encryption rule.
[0034] As an optional implementation, in the second aspect of the embodiments of this application, the processing module is specifically used to decrypt the first initial ciphertext data through a first encryption rule to obtain the first decrypted plaintext data corresponding to the first initial ciphertext data, wherein the first initial ciphertext data is any one of the multiple segments of initial ciphertext data;
[0035] The processing module is specifically configured to determine, if the first calculated plaintext data is the same as the first initial plaintext data, that the first initial ciphertext data and the calculation result corresponding to the first initial plaintext data are the first encryption rule, wherein the first initial plaintext data is the plaintext data corresponding to the first initial ciphertext data among the multiple initial plaintext data segments.
[0036] As an optional implementation, in a second aspect of the embodiments of this application, the processing module is further configured to, if the first calculated plaintext data is different from the first initial plaintext data, calculate the first initial ciphertext data using a second encryption rule to obtain the second calculated plaintext data corresponding to the first initial ciphertext data, wherein the second encryption rule and the first encryption rule are different encryption rules;
[0037] The processing module is further configured to determine the first initial ciphertext data and the solution result corresponding to the first initial plaintext data as the second encryption rule if the second calculated plaintext data is the same as the first initial plaintext data.
[0038] The processing module is further configured to repeat the above steps using other encryption rules if the second solved plaintext data is different from the first initial plaintext data, until the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is determined.
[0039] As an optional implementation, in a second aspect of the embodiments of this application, the processing module is specifically used to divide the first initial ciphertext data according to a preset number of bytes to obtain multiple byte data segments;
[0040] The processing module is specifically used to perform calculations on each byte data segment according to the size relationship between bytes in each byte data segment to obtain the first calculated plaintext data corresponding to the first initial ciphertext data.
[0041] As an optional implementation, in a second aspect of the embodiments of this application, the processing module is specifically used to determine the size relationship between the first byte and the second byte in the target byte data segment, wherein the target byte data segment is any one of the plurality of byte data segments;
[0042] The processing module is specifically used to, if the first byte is greater than the second byte, to perform a solution on the target byte data segment according to the first correspondence relationship to obtain the first solution plaintext data corresponding to the first initial ciphertext data;
[0043] The processing module is specifically used to, if the first byte is less than or equal to the second byte, to perform a solution on the target byte data segment according to the second correspondence relationship to obtain the first solved plaintext data corresponding to the first initial ciphertext data.
[0044] As an optional implementation, in a second aspect of the embodiments of this application, the processing module is specifically used to determine the encryption rule corresponding to the multiple sets of solution results as the target encryption rule if the multiple sets of solution results are detected to be the same.
[0045] The processing module is specifically used to determine the third encryption rule as the target encryption rule if the frequency of the third encryption rule in the encryption rules corresponding to the multiple sets of solution results is greater than a preset proportion.
[0046] As an optional implementation, in a second aspect of the embodiments of this application, the processing module is specifically used to determine the third encryption rule as the target encryption rule if it is detected that the frequency of the third encryption rule in the encryption rules corresponding to the multiple sets of solution results is greater than the preset ratio, and the frequency of other encryption rules is less than or equal to the preset ratio.
[0047] The processing module is further configured to, if it is detected that the frequency of all encryption rules in the encryption rules corresponding to the multiple sets of solution results is less than or equal to the preset ratio, obtain other plaintext data and other ciphertext data for re-solution.
[0048] Thirdly, embodiments of this application provide an electronic device equipped with a data processing system, the data processing system including a CPU and a DPU network card, the electronic device comprising:
[0049] Memory containing executable program code;
[0050] A processor coupled to the memory;
[0051] The processor calls the executable program code stored in the memory to execute the data processing method based on the DPU network card in the first aspect of the embodiments of this application.
[0052] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that causes a computer to execute the data processing method based on a DPU network card as described in the first aspect of this application. The computer-readable storage medium includes ROM / RAM, a magnetic disk, or an optical disk, etc.
[0053] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform some or all of the steps of any of the methods of the first aspect.
[0054] Sixthly, embodiments of this application provide an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer performs some or all of the steps of any of the methods of the first aspect.
[0055] Compared with the prior art, the embodiments of this application have the following beneficial effects:
[0056] This application provides a data processing method, system, electronic device, and storage medium based on a DPU network card. Applied to a central processing unit (CPU) of a data processing system, the data processing system includes a CPU and a DPU network card. The system acquires multiple segments of initial plaintext data and multiple segments of initial ciphertext data. The multiple segments of initial ciphertext data are data received by the DPU network card that has been pre-encrypted according to the same encryption rule, with each segment of initial plaintext data corresponding to the previous one. Each segment of initial plaintext data and its corresponding initial ciphertext data is decrypted to obtain multiple sets of decryption results. Based on the multiple sets of decryption results, a target encryption rule is determined. The target encryption rule is transmitted to the DPU network card, enabling the DPU network card to decrypt the received ciphertext data to be decrypted according to the target encryption rule. In this scheme, data transmission between the DPU network card and the CPU is added, allowing the encryption and decryption processes to be implemented within the DPU network card, reducing the CPU load. Furthermore, there is no need for transmission of encryption rules between devices; the corresponding encryption rule can be directly calculated by comparing the plaintext and ciphertext data, effectively improving the security and reliability of data encryption. Attached Figure Description
[0057] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0058] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a flowchart illustrating a data processing method based on a DPU network card provided in an embodiment of this application. Figure 1 ;
[0060] Figure 2 This application provides a schematic diagram of a system architecture for a data processing method based on a DPU network card. Figure 1 ;
[0061] Figure 3 This application provides a schematic diagram of a system architecture for a data processing method based on a DPU network card. Figure 2 ;
[0062] Figure 4 This is a flowchart illustrating a data processing method based on a DPU network card provided in an embodiment of this application. Figure 2 ;
[0063] Figure 5 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application;
[0064] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0065] To better understand the above-mentioned objectives, features, and advantages of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features of this application can be combined with each other. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0066] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, rather than to describe a specific order of objects.
[0067] The terms “comprising” and “having”, and any variations thereof, in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0068] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0069] Data encryption is a common method for protecting data security. During data transmission, to ensure security, data is pre-encrypted using agreed-upon encryption rules before being sent to the receiving end. The receiving device then decrypts the encrypted data according to the pre-agreed rules. However, in certain situations, such as data leakage or the encryption algorithm being cracked, the security of encryption methods may be compromised. Currently, some verification systems and methods exist for data encryption methods, but their accuracy and reliability need improvement.
[0070] With the increasing demand for data processing, traditional central processing units (CPUs) and general-purpose network interface cards (NICs) are struggling to handle large-scale concurrent data, especially in encryption and decryption tasks, which can lead to performance bottlenecks. To address this challenge, data processing unit (DPU) NICs have emerged as a widely used technology.
[0071] A Data Processing Unit (DPU) is a hardware device specifically designed for data processing and accelerated computing. Compared to traditional CPUs and Graphics Processing Units (GPUs), DPUs offer higher performance and efficiency in areas such as data processing and machine learning. Structurally, a DPU typically includes components such as a processor core, a memory controller, and a network interface. The processor core is the core component of the DPU, responsible for executing data processing tasks; the memory controller manages the DPU's memory resources, ensuring efficient data read and write operations; and the network interface handles data transmission between the DPU and external networks.
[0072] The DPU network card not only has network data transmission capabilities, but also integrates programmable computing resources. It can directly handle complex data computing tasks such as encryption and decryption at the network card layer, thereby significantly reducing the CPU load and improving data processing efficiency.
[0073] DPU network interface cards (NICs), through hardware accelerators and dedicated data processing engines, can perform multiple tasks including encryption, decryption, and data transmission. This avoids the large-scale data transfer between the NIC and the main processor, effectively reducing latency and improving system security and performance. However, despite the significant improvement in data processing efficiency, existing DPU-based encryption and decryption systems still face challenges in verifying the accuracy and reliability of the verification system. Existing verification methods may exhibit false positives or false negatives when processing high-speed data streams, especially when determining the correctness of the decryption method. This makes it difficult for current verification systems to handle verification tasks accurately and in real-time in high-speed data stream environments.
[0074] To address some or all of the aforementioned technical problems, this application provides a data processing method, system, electronic device, and storage medium based on a DPU network card. The data processing system is applied to a central processing unit (CPU) and includes a CPU and a DPU network card. The system acquires multiple segments of initial plaintext data and multiple segments of initial ciphertext data. The multiple segments of initial ciphertext data are data received by the DPU network card that has been pre-encrypted according to the same encryption rule, with each segment of initial plaintext data corresponding to the other. The system performs decomposition on each segment of initial plaintext data and its corresponding initial ciphertext data to obtain multiple sets of decomposition results. Based on the multiple sets of decomposition results, a target encryption rule is determined. The target encryption rule is transmitted to the DPU network card, enabling the DPU network card to decrypt the received ciphertext data to be decrypted according to the target encryption rule. This solution adds data transmission between the DPU network card and the CPU, allowing the encryption and decryption processes to be implemented within the DPU network card, reducing the CPU load. In addition, there is no need to transmit encryption rules between devices; the corresponding encryption rules can be calculated directly by comparing plaintext and ciphertext data, effectively improving the security and reliability of data encryption.
[0075] like Figure 1 As shown, Figure 1 The flowchart illustrates a data processing method based on a DPU network interface card (NIC) provided in this application embodiment. The execution entity of this method is the CPU of a data processing system. The data processing system may include a CPU and a DPU NIC, and data transmission can occur between the CPU and the DPU NIC. The method may include the following steps:
[0076] 101. Obtain multiple segments of initial plaintext data and multiple segments of initial ciphertext data.
[0077] In this embodiment, the multiple initial plaintext data segments are sent directly from the CPU on the other side, while the multiple initial ciphertext data segments are data received by the DPU network card that has been pre-encrypted according to the same encryption rule. That is, as shown... Figure 2 As shown, in the peer device, the peer DPU network card encrypts multiple segments of initial plaintext data to obtain multiple segments of initial ciphertext data. Then, the peer DPU network card transmits the multiple segments of initial ciphertext data to the DPU network card of the data processing system. The DPU network card then sends the multiple segments of initial ciphertext data to the CPU. The peer CPU transmits the multiple segments of initial plaintext data to the CPU of the data processing system.
[0078] In some embodiments, during data transmission, the byte order of the data follows the Big-endian pattern, meaning the most significant byte comes first, followed by the least significant byte.
[0079] It should be noted that encrypting a piece of plaintext data results in a piece of ciphertext data. In other words, there is a one-to-one correspondence between multiple initial plaintext data segments and multiple initial ciphertext data segments.
[0080] 102. Solve each initial plaintext data segment and its corresponding initial ciphertext data to obtain multiple sets of solution results.
[0081] In this embodiment of the application, after obtaining multiple segments of initial plaintext data and multiple segments of initial ciphertext data, each segment of initial plaintext data and the corresponding initial ciphertext data can be compared, that is, encryption rule calculation can be performed to obtain the calculation result corresponding to each set of plaintext data and ciphertext data. The calculation result can indicate the encryption rule corresponding to the set of plaintext data and ciphertext data.
[0082] 103. Based on multiple sets of solution results, determine the target encryption rule.
[0083] In the embodiments of this application, after each set of plaintext data and ciphertext data is processed, the processing results of each set can be analyzed. Since each set of processing results actually indicates the encryption rule corresponding to that set of plaintext data and ciphertext data, it can also be understood as determining the final encryption rule based on the encryption rule corresponding to each set of data.
[0084] In some embodiments, since multiple initial ciphertext data segments are obtained by encrypting multiple initial plaintext data segments according to the same encryption rule, ideally, the encryption rule indicated by multiple sets of decomposition results should be the same. However, in real-world scenarios, various factors may cause some bytes in the ciphertext data to change, or other encryption rules may be used to achieve the same encryption and decryption results. This can lead to different encryption rules indicated by multiple sets of decomposition results. Therefore, the final target encryption rule can be determined based on the frequency of occurrence of various encryption rules in multiple sets of decomposition results.
[0085] 104. Transmit the target encryption rule to the DPU network card so that the DPU network card can decrypt the received ciphertext data to be decrypted according to the target encryption rule.
[0086] In this embodiment of the application, after the CPU determines the final target encryption rule, it can transmit the target encryption rule to the DPU network card. In this way, after the DPU network card receives the ciphertext data to be decrypted sent by other devices, it can directly decrypt the ciphertext data to be decrypted using the target encryption rule.
[0087] In some embodiments, such as Figure 2 As shown, during the rule-solving phase, the CPU can send the solved target encryption rule to the DPU network card, such as... Figure 3 As shown, in the actual encryption and decryption stage, the DPU network card of the data processing system can receive ciphertext data sent by the DPU of other devices. Then, the decryption module can decrypt the ciphertext data according to the target encryption rules to obtain structured plaintext data, which is then sent to the CPU of the data processing system.
[0088] In some embodiments, the scheme provided in this application is actually a process of calculating and applying encryption rules. That is, the data processing system of the executing entity only receives plaintext data and ciphertext data, and does not know the specific encryption rules. Therefore, in order to encrypt plaintext data and decrypt ciphertext data in the future, the data processing system can actively calculate the encryption rules.
[0089] The encryption process between plaintext and ciphertext data received by the data processing system is actually performed between the CPU and DPU network card of other devices, such as... Figure 2As shown, the CPU of the other device generates a set of encryption rules and sends them to the encryption module of the DPU network card of the other device for subsequent data encryption operations. In addition, the CPU of the other device can generate specific plaintext data, which is the multiple segments of initial plaintext data received by the data processing system. At the same time, the CPU of the other device will also send the generated specific plaintext data to the encryption module of the DPU network card of the other device, so that the DPU network card of the other device can use the sent encryption rules to encrypt the sent plaintext data in the encryption module, and send the encrypted ciphertext data to the DPU network card of the data processing system, which is the multiple segments of initial ciphertext data received by the data processing system.
[0090] In some embodiments, the update frequency of the encryption rules can be defined by the system itself. For example, during the first data transmission of the day, i.e., before the first data transmission of the day, the system will generate and issue new encryption rules. That is, before each data transmission, the data processing system will first receive multiple segments of initial plaintext data and multiple segments of initial ciphertext data, and calculate the corresponding target encryption rule according to the method provided in the embodiments of this application. The target decryption rule can be understood as the encryption rule for all data transmitted that day. During the day, plaintext data received by the data processing system can be encrypted according to the target decryption rule, and ciphertext data received can be decrypted according to the target decryption rule.
[0091] This application provides a data processing method based on a DPU network card, applied to the central processing unit (CPU) of a data processing system. The data processing system includes a CPU and a DPU network card. The method acquires multiple segments of initial plaintext data and multiple segments of initial ciphertext data. The multiple segments of initial ciphertext data are data received by the DPU network card that has been pre-encrypted according to the same encryption rule, with each segment of initial plaintext data corresponding to the previous one. Each segment of initial plaintext data and its corresponding initial ciphertext data is processed to obtain multiple sets of processing results. Based on these results, a target encryption rule is determined. The target encryption rule is then transmitted to the DPU network card, enabling the DPU network card to decrypt the received ciphertext data to be decrypted according to the target encryption rule. This solution adds data transmission between the DPU network card and the CPU, allowing the encryption and decryption processes to be implemented within the DPU network card, reducing the CPU load. Furthermore, there is no need for transmission of encryption rules between devices; the corresponding encryption rule can be directly calculated by comparing the plaintext and ciphertext data, effectively improving the security and reliability of data encryption.
[0092] like Figure 4 As shown, Figure 4 A flowchart of a data processing method based on a DPU network card provided in this application embodiment is included. The method may further include the following steps:
[0093] 401. Obtain multiple segments of initial plaintext data and multiple segments of initial ciphertext data.
[0094] In this embodiment, the description of step 401 is the same as the detailed description of step 101 in the above embodiments, and will not be repeated in this embodiment.
[0095] 402. Decrypt the first initial ciphertext data using the first encryption rule to obtain the first decrypted plaintext data corresponding to the first initial ciphertext data.
[0096] In this embodiment of the application, the first initial ciphertext data is any one of multiple initial ciphertext data. That is, the same steps are used to decrypt each initial ciphertext data. First, the first initial ciphertext data is decrypted according to the first encryption rule. The first encryption rule can be the default encryption rule, so as to obtain the first decrypted plaintext data after decryption according to the first encryption rule.
[0097] In some embodiments, the first initial ciphertext data is decrypted using a first encryption rule to obtain the first decrypted plaintext data corresponding to the first initial ciphertext data. Specifically, this may include: dividing the first initial ciphertext data into multiple byte data segments according to a preset number of bytes; and decrypting each byte data segment according to the size relationship between bytes in each byte data segment to obtain the first decrypted plaintext data corresponding to the first initial ciphertext data.
[0098] It should be noted that a set of plaintext data or a set of ciphertext data contains a large number of bytes. Therefore, in order to facilitate encryption and decryption calculations, the bytes can be divided. That is, the first initial ciphertext data can be divided according to a preset number of bytes to obtain multiple byte data segments. Then, the same decomposition operation can be performed on each byte data segment to obtain the first decomposition plaintext data corresponding to the first initial ciphertext data.
[0099] The preset number of bytes can be set each time data is transmitted, such as 4 bytes or 8 bytes per data segment. However, it is necessary to ensure that the preset number of bytes is the same each time a data segment is encrypted or decrypted. That is to say, each decryption is either 4 bytes, 8 bytes, or other numbers of bytes per data segment, and there will be no situation where 4 bytes, 8 bytes, or other numbers of bytes are mixed.
[0100] In some embodiments, each byte data segment is decoded according to the size relationship between bytes in each byte data segment to obtain the first decoded plaintext data corresponding to the first initial ciphertext data. Specifically, this may include: determining the size relationship between the first byte and the second byte in the target byte data segment; if the first byte is greater than the second byte, the target byte data segment is decoded according to the first correspondence to obtain the first decoded plaintext data corresponding to the first initial ciphertext data; if the first byte is less than or equal to the second byte, the target byte data segment is decoded according to the second correspondence to obtain the first decoded plaintext data corresponding to the first initial ciphertext data.
[0101] It should be noted that the target byte data segment can be any one of multiple byte data segments, and each byte data segment is processed in the same way. First, the size relationship between the first byte and the second byte in the target byte data segment is checked. The correspondence between the first byte being greater than the second byte and the first byte being less than or equal to the second byte are different.
[0102] In some embodiments, the first correspondence may include: if the first byte of the ciphertext data is greater than the second byte, then the first byte of the plaintext data is equal to the first byte of the ciphertext data, the second byte of the plaintext data is equal to the second byte of the ciphertext data, the third byte of the plaintext data is equal to the third byte of the ciphertext data XORed with the fourth byte, and the fourth byte of the plaintext data is equal to the fourth byte of the ciphertext data.
[0103] For example, assuming the ciphertext data is 9876, since the first byte 9 is greater than the second byte 8, then the first byte of the plaintext data is equal to 9, the second byte of the plaintext data is equal to 8, the third byte of the plaintext data is equal to 7 XOR 6, and the fourth byte of the plaintext data is equal to 6.
[0104] In some embodiments, the second correspondence may include: if the first byte of the ciphertext data is less than or equal to the second byte, then the first byte of the plaintext data is equal to the first byte of the ciphertext data, the second byte of the plaintext data is equal to the second byte of the ciphertext data, the third byte of the plaintext data is equal to the third byte of the ciphertext data, and the fourth byte of the plaintext data is equal to the third byte of the ciphertext data XORed with the fourth byte.
[0105] For example, assuming the ciphertext data is 3579, since the first byte 3 is less than the second byte 5, then the first byte of the plaintext data is equal to 3, the second byte of the plaintext data is equal to 5, the third byte of the plaintext data is equal to 7, and the fourth byte of the plaintext data is equal to 7 XOR 9.
[0106] The XOR operation is a binary operation that outputs true (1) only if the two input bit values are different; otherwise, it outputs false (0), meaning "0 if they are the same, 1 if they are different". The XOR operation is usually represented by the symbol "⊕", while in programming languages, "^" is commonly used as the XOR operator.
[0107] In other words, if the first byte of the ciphertext is greater than the second byte, and the third and fourth bytes of the ciphertext are the same, then the third byte of the plaintext is equal to 0; if the third and fourth bytes of the ciphertext are different, then the third byte of the plaintext is equal to 1. If the first byte of the ciphertext is less than or equal to the second byte, and the third and fourth bytes of the ciphertext are the same, then the fourth byte of the plaintext is equal to 0; if the third and fourth bytes of the ciphertext are different, then the fourth byte of the plaintext is equal to 1.
[0108] 403. If the first solved plaintext data is the same as the first initial plaintext data, then the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is determined to be the first encryption rule.
[0109] In this embodiment, the first initial plaintext data is the plaintext data corresponding to the first initial ciphertext data among multiple initial plaintext data segments. If the first decoded plaintext data is the same as the first initial plaintext data, then it can be concluded that the encryption rule used when encrypting the first initial plaintext data in advance is the first encryption rule. Therefore, it can be determined that the decoding result corresponding to the first initial ciphertext data and the first initial plaintext data is the first encryption rule, and this decoding result can indicate the encryption rule between the first initial ciphertext data and the first initial plaintext data.
[0110] 404. If the first solved plaintext data is different from the first initial plaintext data, then the first initial ciphertext data is solved using the second encryption rule to obtain the second solved plaintext data corresponding to the first initial ciphertext data.
[0111] In this embodiment of the application, if the first decrypted plaintext data is different from the first initial plaintext data, it means that the encryption rule used when encrypting the first initial plaintext data in advance is not the first encryption rule. Then, the first initial ciphertext data can be decrypted by the second encryption rule to obtain the second decrypted plaintext data after being decrypted according to the second encryption rule.
[0112] It should be noted that the second encryption rule is different from the first encryption rule. That is, after determining that decryption is not performed according to the first encryption rule, decryption is performed according to other encryption rules, and the decrypted plaintext data is then compared with the initial plaintext data.
[0113] 405. If the second solved plaintext data is the same as the first initial plaintext data, then the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is determined to be the second encryption rule.
[0114] In this embodiment of the application, if it is detected that the second decrypted plaintext data after being decrypted using the second encryption rule is the same as the first initial plaintext data, then it can be concluded that the encryption rule used when encrypting the first initial plaintext data in advance is the second encryption rule. Therefore, it can be determined that the decryption result corresponding to the first initial ciphertext data and the first initial plaintext data is the second encryption rule.
[0115] 406. If the second solved plaintext data is different from the first initial plaintext data, repeat the above steps using other encryption rules until the solution results corresponding to the first initial ciphertext data and the first initial plaintext data are determined.
[0116] In this embodiment of the application, if the second calculated plaintext data is different from the first initial plaintext data, it means that the encryption rule used when encrypting the first initial plaintext data in advance is not the second encryption rule. Then, the first initial ciphertext data can continue to be calculated using other encryption rules, and it is determined again whether the calculated plaintext data is the same as the first initial plaintext data. The above steps are repeated until it is detected that the plaintext data decrypted according to a certain encryption rule is the same as the first initial plaintext data, thereby obtaining the final calculation result corresponding to the first initial ciphertext data and the first initial plaintext data.
[0117] 407. If multiple sets of solution results are detected to be identical, the encryption rules corresponding to the multiple sets of solution results shall be determined as the target encryption rule.
[0118] In the embodiments of this application, if multiple sets of solution results are the same, that is, the encryption rules used between each set of initial ciphertext data and the corresponding initial plaintext data are the same, then the same encryption rule can be determined as the target encryption rule.
[0119] 408. If the frequency of the third encryption rule in the encryption rules corresponding to multiple sets of solution results is greater than the preset proportion, then the third encryption rule is determined to be the target encryption rule.
[0120] In this embodiment of the application, in real-world scenarios, data transmission may result in errors or omissions due to network or device issues. Furthermore, multiple encryption rules may correspond to the same encryption / decryption results. In other words, among the encryption rules corresponding to multiple sets of decryption results, multiple encryption rules may appear. Therefore, the frequency and occurrence of each encryption rule can be statistically analyzed. If a third encryption rule exists and its frequency exceeds a preset ratio (which can be set to a large value), it means that most initial plaintext data and corresponding initial ciphertext data are encrypted according to this third encryption rule. In this case, the third encryption rule can be identified as the target encryption rule. Any other plaintext data or ciphertext data that is not encrypted / decrypted according to this third encryption rule can be considered an anomaly.
[0121] In some embodiments, if it is detected that the frequency of the third encryption rule in the encryption rules corresponding to multiple sets of solution results is greater than a preset proportion, and the frequency of other encryption rules is less than or equal to the preset proportion, then the third encryption rule is determined to be the target encryption rule.
[0122] It should be noted that if the bytes of multiple sets of initial plaintext and ciphertext data are relatively short, there may be more than one encryption rule among these sets. In other words, many sets of initial plaintext and ciphertext data may be encrypted and decrypted using multiple encryption rules. Therefore, when calculating the results, multiple encryption rules may appear to have frequencies exceeding a preset proportion. Further, if only one encryption rule is detected to have a frequency exceeding the preset proportion, that encryption rule is determined to be the target encryption rule. That is, only if the frequency of the third encryption rule exceeds the preset proportion, and the frequencies of other encryption rules are less than or equal to the preset proportion, is the third encryption rule considered the target encryption rule.
[0123] In some embodiments, if it is detected that the frequency of all encryption rules in the encryption rules corresponding to multiple sets of solution results is less than or equal to a preset ratio, then other plaintext data and other ciphertext data are obtained and re-solved.
[0124] It should be noted that if the encryption rules calculated from multiple sets of initial plaintext data and corresponding initial ciphertext data are mostly different, that is, if the frequency of all encryption rules is less than or equal to the preset ratio, then it can be said that these multiple sets of initial plaintext data and corresponding initial ciphertext data cannot be calculated at present. In this case, the multiple sets of initial plaintext data and corresponding initial ciphertext data will be temporarily cached, and new plaintext data and ciphertext data will be repeatedly obtained for calculation.
[0125] 409. Transmit the target encryption rule to the DPU network card so that the DPU network card can decrypt the received ciphertext data to be decrypted according to the target encryption rule.
[0126] In this embodiment, the description of step 409 is the same as the detailed description of step 104 in the above embodiments, and will not be repeated in this embodiment.
[0127] This application provides a data processing method based on a DPU network card, which increases data transmission between the DPU network card and the CPU. The encryption and decryption process can be transferred to the DPU network card, reducing the CPU load. In addition, there is no need to transmit encryption rules between devices. The corresponding encryption rules can be calculated directly by comparing plaintext data and ciphertext data, which effectively improves the security and reliability of data encryption. Furthermore, multiple sets of data are used for multiple verifications to ensure the accuracy of the encryption rules.
[0128] like Figure 5 As shown in the figure, this application embodiment provides a data processing system, which includes a CPU and a DPU network card. The data processing system may include:
[0129] The acquisition module 501 is used to acquire multiple segments of initial plaintext data and multiple segments of initial ciphertext data. The multiple segments of initial ciphertext data are data received by the DPU network card after the multiple segments of initial plaintext data have been encrypted in advance according to the same encryption rule. The multiple segments of initial plaintext data and the multiple segments of initial ciphertext data correspond one-to-one.
[0130] Processing module 502 is used to decompose each initial plaintext data and the corresponding initial ciphertext data to obtain multiple sets of decomposition results;
[0131] The processing module 502 is also used to determine the target encryption rule based on multiple sets of solution results;
[0132] The processing module 502 is also used to transmit the target encryption rule to the DPU network card, so that the DPU network card can decrypt the received ciphertext data to be decrypted according to the target encryption rule.
[0133] In some embodiments, the processing module 502 is specifically used to decrypt the first initial ciphertext data according to the first encryption rule to obtain the first decrypted plaintext data corresponding to the first initial ciphertext data, wherein the first initial ciphertext data is any one of multiple initial ciphertext data segments;
[0134] The processing module 502 is specifically used to determine the first initial ciphertext data and the solution result corresponding to the first initial plaintext data as the first encryption rule if the first calculated plaintext data is the same as the first initial plaintext data. The first initial plaintext data is the plaintext data corresponding to the first initial ciphertext data among multiple initial plaintext data segments.
[0135] In some embodiments, the processing module 502 is further configured to, if the first calculated plaintext data is different from the first initial plaintext data, calculate the first initial ciphertext data using the second encryption rule to obtain the second calculated plaintext data corresponding to the first initial ciphertext data, wherein the second encryption rule and the first encryption rule are different encryption rules;
[0136] The processing module 502 is further configured to determine the first initial ciphertext data and the solution result corresponding to the first initial plaintext data as the second encryption rule if the second solved plaintext data is the same as the first initial plaintext data;
[0137] The processing module 502 is further configured to repeat the above steps using other encryption rules if the second solved plaintext data is different from the first initial plaintext data, until the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is determined.
[0138] In some embodiments, the processing module 502 is specifically used to divide the first initial ciphertext data according to a preset number of bytes to obtain multiple byte data segments;
[0139] The processing module 502 is specifically used to perform calculations on each byte data segment according to the size relationship between bytes in each byte data segment to obtain the first calculated plaintext data corresponding to the first initial ciphertext data.
[0140] In some embodiments, the processing module 502 is specifically used to determine the size relationship between the first byte and the second byte in the target byte data segment, wherein the target byte data segment is any one of a plurality of byte data segments;
[0141] The processing module 502 is specifically used to, if the first byte is greater than the second byte, decompile the target byte data segment according to the first correspondence relationship to obtain the first decomputed plaintext data corresponding to the first initial ciphertext data;
[0142] The processing module 502 is specifically used to decode the target byte data segment according to the second correspondence if the first byte is less than or equal to the second byte, so as to obtain the first decoded plaintext data corresponding to the first initial ciphertext data.
[0143] In some embodiments, the processing module 502 is specifically used to determine the encryption rule corresponding to the multiple sets of solution results as the target encryption rule if multiple sets of solution results are detected to be the same.
[0144] The processing module 502 is specifically used to determine the third encryption rule as the target encryption rule if the frequency of the third encryption rule in the encryption rules corresponding to multiple sets of solution results is greater than a preset proportion.
[0145] In some embodiments, the processing module 502 is specifically used to determine the third encryption rule as the target encryption rule if it is detected that the frequency of the third encryption rule in the encryption rules corresponding to multiple sets of solution results is greater than a preset ratio, and the frequency of other encryption rules is less than or equal to the preset ratio.
[0146] The processing module 502 is also used to obtain other plaintext data and other ciphertext data for recalculation if it is detected that the frequency of all encryption rules in the encryption rules corresponding to the multiple sets of solution results is less than or equal to a preset ratio.
[0147] In this embodiment, each module can implement the data processing method based on the DPU network card provided in the above method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0148] like Figure 6 As shown in the embodiments of this application, an electronic device is also provided. This electronic device is configured with a data processing system, which includes a CPU and a DPU network card. The electronic device may include:
[0149] Memory 601 storing executable program code;
[0150] Processor 602 coupled to memory 601;
[0151] In this process, the processor 602 calls the executable program code stored in the memory 601 to execute the data processing method based on the DPU network card executed by the electronic device in the above method embodiments.
[0152] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the data processing method based on the DPU network card in the above method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0153] This application also provides a computer program product, which stores a computer program. When the computer program is executed by a processor, it implements the various processes of the data processing method based on the DPU network card in the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0154] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0155] It should be understood, in the several embodiments provided in this application, that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0156] In this application, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0157] In this application, memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0158] In this application, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, including permanent and non-permanent, removable and non-removable storage media. The storage medium can implement information storage by any method or technology, and the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), other types of random access memory (RAM), read-only memory (ROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information that can be accessed by a computing device. As defined in this document, computer-readable media do not include transient media, such as modulated data signals and carrier waves.
[0159] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0160] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application. The above-mentioned multiple embodiments are not necessarily multiple independent embodiments; they are divided into multiple embodiments only to highlight different technical features in different embodiments. Those skilled in the art should understand that the above-mentioned multiple embodiments can also be combined arbitrarily.
[0161] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0162] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0163] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0164] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-accessible memory. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests to cause a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments of this application.
[0165] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method based on a data processing unit (DPU) network card, characterized in that, A central processing unit (CPU) applied to a data processing system, the data processing system comprising: a CPU and a DPU network card, the method comprising: obtaining a plurality of initial plaintext data and a plurality of initial ciphertext data, the plurality of initial ciphertext data being data obtained by encrypting the plurality of initial plaintext data according to the same encryption rule by the DPU network card, the plurality of initial plaintext data and the plurality of initial ciphertext data corresponding one-to-one; solving the plurality of initial plaintext data and the corresponding initial ciphertext data to obtain a plurality of solution results; the solving the plurality of initial plaintext data and the corresponding initial ciphertext data to obtain a plurality of solution results, comprising: solving the encryption rule for each initial plaintext data and the corresponding initial ciphertext data to obtain a solution result corresponding to each initial plaintext data and initial ciphertext data, the solution result being used to indicate the encryption rule corresponding to the initial plaintext data and the initial ciphertext data; determining a target encryption rule according to the plurality of solution results; transmitting the target encryption rule to the DPU network card, so that the DPU network card decrypts the received ciphertext data to be decrypted according to the target encryption rule.
2. The method of claim 1, wherein, the solving the plurality of initial plaintext data and the corresponding initial ciphertext data to obtain a plurality of solution results, comprising: solving the first initial ciphertext data by a first encryption rule to obtain first solution plaintext data corresponding to the first initial ciphertext data, the first initial ciphertext data being any one of the plurality of initial ciphertext data; if the first solution plaintext data is the same as the first initial plaintext data, determining that the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is the first encryption rule, the first initial plaintext data being the plaintext data corresponding to the first initial ciphertext data in the plurality of initial plaintext data.
3. The method of claim 2, wherein, after obtaining the first solution plaintext data corresponding to the first initial ciphertext data, the method further comprising: if the first solution plaintext data is different from the first initial plaintext data, solving the first initial ciphertext data by a second encryption rule to obtain second solution plaintext data corresponding to the first initial ciphertext data, the second encryption rule being different from the first encryption rule; if the second solution plaintext data is the same as the first initial plaintext data, determining that the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is the second encryption rule; if the second solution plaintext data is different from the first initial plaintext data, repeating the above steps by other encryption rules until the solution result corresponding to the first initial ciphertext data and the first initial plaintext data is determined.
4. The method of claim 2, wherein, the solving the first initial ciphertext data by the first encryption rule to obtain the first solution plaintext data corresponding to the first initial ciphertext data, comprising: dividing the first initial ciphertext data into a plurality of byte data segments according to a preset byte number; According to the size relationship between the bytes in each byte data segment, the first initial ciphertext data is calculated to obtain the first calculated plaintext data corresponding to the first initial ciphertext data.
5. The method of claim 4, wherein, According to the size relationship between the bytes in each byte data segment, the first initial ciphertext data is calculated to obtain the first calculated plaintext data corresponding to the first initial ciphertext data. Determine the size relationship between the first byte and the second byte in the target byte data segment, the target byte data segment being any one of the plurality of byte data segments; If the first byte is greater than the second byte, the target byte data segment is calculated according to the first corresponding relationship to obtain the first calculated plaintext data corresponding to the first initial ciphertext data; If the first byte is less than or equal to the second byte, the target byte data segment is calculated according to the second corresponding relationship to obtain the first calculated plaintext data corresponding to the first initial ciphertext data.
6. The method of claim 1, wherein, According to the plurality of calculation results, the target encryption rule is determined. If it is detected that the plurality of calculation results are the same, the encryption rule corresponding to the plurality of calculation results is determined as the target encryption rule. If it is detected that the frequency of the third encryption rule in the encryption rules corresponding to the plurality of calculation results is greater than a preset proportion, the third encryption rule is determined as the target encryption rule.
7. The method of claim 6, wherein, If it is detected that the frequency of the third encryption rule in the encryption rules corresponding to the plurality of calculation results is greater than the preset proportion, and the frequency of other encryption rules is less than or equal to the preset proportion, the third encryption rule is determined as the target encryption rule. The method further comprises: If it is detected that the frequency of all encryption rules existing in the encryption rules corresponding to the plurality of calculation results is less than or equal to the preset proportion, other plaintext data and other ciphertext data are recalculated. The data processing system comprises a CPU and a DPU network card, and the data processing system comprises:
8. A data processing system, characterized by An acquisition module is configured to acquire a plurality of initial plaintext data and a plurality of initial ciphertext data, the plurality of initial ciphertext data being data that the DPU network card receives after pre-encrypting the plurality of initial plaintext data according to the same encryption rule, the plurality of initial plaintext data and the plurality of initial ciphertext data corresponding one-to-one; A processing module is configured to calculate the plurality of initial plaintext data and the corresponding initial ciphertext data to obtain a plurality of calculation results. The processing module is further configured to determine a target encryption rule according to the plurality of calculation results. The processing module is further configured to transmit the target encryption rule to the DPU network card, so that the DPU network card decrypts received to-be-decrypted ciphertext data according to the target encryption rule. The processing module is specifically configured to perform encryption rule solving on each piece of initial plaintext data and corresponding initial ciphertext data to obtain a solving result corresponding to each group of initial plaintext data and initial ciphertext data, the solving result being used to indicate an encryption rule corresponding to the group of initial plaintext data and initial ciphertext data.
9. An electronic device, comprising: The electronic device is configured with a data processing system, and the data processing system comprises a CPU and a DPU network card. A memory storing executable program codes; and a processor coupled with the memory; The processor invokes the executable program codes stored in the memory, and is configured to execute the data processing method based on the data processing unit (DPU) network card.
10. A computer-readable storage medium, characterized in that, Comprise: The computer readable storage medium stores computer instructions, and the computer instructions are executed by the processor to implement the data processing method based on the data processing unit (DPU) network card.
Citation Information
Patent Citations
Random encryption method needing to adopt exhaustion method for deciphering
CN103095452A
Information configuration method and device, equipment and storage medium
CN117811787A