CN113688414A - Data processing method, system, storage medium and equipment - Google Patents

Data processing method, system, storage medium and equipment Download PDF

Info

Publication number
CN113688414A
CN113688414A CN202111239412.7A CN202111239412A CN113688414A CN 113688414 A CN113688414 A CN 113688414A CN 202111239412 A CN202111239412 A CN 202111239412A CN 113688414 A CN113688414 A CN 113688414A
Authority
CN
China
Prior art keywords
key
round
processing
control information
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111239412.7A
Other languages
Chinese (zh)
Inventor
贺佳
余洪斌
沈欣舞
郭明明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111239412.7A priority Critical patent/CN113688414A/en
Publication of CN113688414A publication Critical patent/CN113688414A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a data processing method, a system, a storage medium and a device, wherein the method comprises the following steps: constructing a plurality of table entries, acquiring first data information and first control information of a first task to be processed, performing round key expansion on a first key in the first control information, storing the first round key obtained by expansion into a specified table entry in the plurality of table entries, and processing the first data information by using the first round key; responding to the completion of the processing of the first data information, acquiring second data information and second control information of a second task to be processed, and judging whether a second key in the second control information is the same as the first key; and in response to the second key being the same as the first key, processing the second data information using the first round key in the specified entry. Under the condition that the second key is the same as the first key, the invention avoids performing round key expansion on the second key, saves the time of round key expansion and improves the encryption and decryption processing efficiency of data.

Description

Data processing method, system, storage medium and equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, system, storage medium, and device.
Background
SM4 (original name SMs 4.0) is a block cipher standard adopted by the government of the people's republic of china and was issued by the national cipher authority in 2012. The SM4 is mainly used for data encryption, and its algorithm is an open grouping algorithm. The packet length of the algorithm is 128 bits and the key length is 128 bits. Both the encryption algorithm and the key expansion algorithm adopt 32-round nonlinear iteration structures. The decryption algorithm has the same structure as the encryption algorithm, but the use sequence of the round keys is opposite, and the decryption round keys are the reverse sequence of the encryption round keys. The round keys of the encryption algorithm or the decryption algorithm are generated by the encryption key or the decryption key respectively through a key expansion algorithm.
The traditional encryption and decryption method has the following two schemes:
the first scheme is as follows: and after the key is obtained, carrying out key expansion by using a key expansion algorithm, and after 32 rounds of key expansion are completed, reading data to encrypt and decrypt the data.
Scheme II: after the key and the encryption and decryption marks are read, if the encryption is carried out, the plaintext is directly read for encryption without waiting for the completion of 32 rounds of key expansion. If the data is decrypted, the data can be read for decryption by waiting for 32 rounds of key expansion.
The above two schemes have overhead of 32 clock cycles when decryption is performed, and when decryption is performed by multiple threads in the server, the keys of the same thread are the same in most cases, and the keys of different threads are different. However, when different threads are repeatedly and alternately input to the encryption module, the key is continuously changed, so that round key expansion is required to be performed each time during decryption, and if the ciphertext data of one thread is small each time, the round key expansion frequently affects the performance of encryption and decryption, and particularly affects the performance of decryption greatly.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a data processing method, system, storage medium and device, so as to solve the problem in the prior art that the encryption and decryption performance is affected due to low efficiency when data is encrypted and decrypted.
Based on the above purpose, the present invention provides a data processing method, comprising the following steps:
constructing a plurality of table entries, acquiring first data information and first control information of a first task to be processed, performing round key expansion on a first key in the first control information, storing the first round key obtained by expansion into a specified table entry in the plurality of table entries, and processing the first data information by using the first round key;
responding to the completion of the processing of the first data information, acquiring second data information and second control information of a second task to be processed, and judging whether a second key in the second control information is the same as the first key; and
and in response to the second key being the same as the first key, processing the second data information using the first round key in the specified entry.
In some embodiments, the method further comprises:
performing round key expansion on the second key in response to that the second key is different from the first key to obtain an expanded second round key, and judging whether a plurality of entries in the plurality of entries do not store the round key;
and responding to the plurality of entries which do not store the round key, storing the second round key into one of the plurality of entries, and processing the second data information by using the second round key.
In some embodiments, the method further comprises:
and responding to the fact that the plurality of entries have the stored round key, searching one entry from the plurality of entries according to a preset rule, deleting the round key in the searched entry, storing the second round key in the searched entry, and processing the second data information by using the second round key.
In some embodiments, the method further comprises:
in response to acquiring the first control information, it is confirmed that the processing flag in the first control information is the encryption flag or the decryption flag.
In some embodiments, processing the first data information using the first round key comprises:
in response to the processing mark in the first control information being an encryption mark, performing encryption processing on the first data information by using the first round key; or
And in response to the processing mark in the first control information being the decryption mark, performing decryption processing on the first data information by using the first round key.
In some embodiments, determining whether the second key in the second control information is the same as the first key comprises:
confirming that the processing mark in the second control information is an encryption mark or a decryption mark;
responding to the processing mark in the second control information as an encryption mark, and judging whether the encryption key in the second control information is the same as the first key or not; or
And responding to the processing mark in the second control information as a decryption mark, and judging whether the decryption key in the second control information is the same as the first key.
In some embodiments, the method further comprises:
and in response to the second data information being processed by the first round key in the specified entry, setting a key expansion module ready for round key expansion of the second key to a dormant state.
In another aspect of the present invention, there is also provided a data processing system, including:
the first data processing module is configured to construct a plurality of table entries, acquire first data information and first control information of a first task to be processed, perform round key expansion on a first key in the first control information, store the first round key obtained by expansion into a specified table entry in the plurality of table entries, and process the first data information by using the first round key;
the judging module is configured to respond to the completion of the processing of the first data information, acquire second data information and second control information of a second task to be processed, and judge whether a second key in the second control information is the same as the first key; and
and the second data processing module is used for responding to the second key and the first key, and processing the second data information by using the first round key in the specified table entry.
In yet another aspect of the present invention, a computer-readable storage medium is also provided, storing computer program instructions, which when executed by a processor, implement the above-described method.
In yet another aspect of the present invention, a computer device is further provided, which includes a memory and a processor, the memory storing a computer program, which when executed by the processor performs the above method.
The invention has at least the following beneficial technical effects:
the invention stores the expanded round key by using the table entry, and directly reads the round key in the appointed table entry to carry out data encryption and decryption processing under the condition that the second key is the same as the first key, thereby avoiding carrying out round key expansion on the second key, saving the time required by round key expansion, further improving the encryption and decryption processing efficiency of the data and improving the performance of the encryption and decryption module.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a schematic diagram of a data processing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an encryption/decryption scheme according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data processing system provided in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of a computer-readable storage medium for implementing a data processing method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of a computer device for executing the data processing method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two non-identical entities with the same name or different parameters, and it is understood that "first" and "second" are only used for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements does not include all of the other steps or elements inherent in the list.
In view of the above object, a first aspect of the embodiments of the present invention proposes an embodiment of a data processing method. Fig. 1 is a schematic diagram illustrating an embodiment of a data processing method provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
step S10, constructing a plurality of table entries, acquiring first data information and first control information of a first task to be processed, performing round key expansion on a first key in the first control information, storing the first round key obtained by expansion into a specified table entry in the plurality of table entries, and processing the first data information by using the first round key;
step S20, responding to the completion of the processing of the first data information, acquiring second data information and second control information of a second task to be processed, and judging whether a second key in the second control information is the same as the first key;
step S30, in response to the second key being the same as the first key, processes the second data information using the first round key in the specified entry.
The embodiment of the invention stores the expanded round key by using the table entry, directly reads the round key in the appointed table entry to carry out data encryption and decryption processing under the condition that the second key is the same as the first key, avoids carrying out round key expansion on the second key, saves the time required by round key expansion, further improves the data encryption and decryption processing efficiency and improves the performance of the encryption and decryption module.
In some embodiments, the method further comprises: performing round key expansion on the second key in response to that the second key is different from the first key to obtain a second round key, and judging whether a plurality of entries in the plurality of entries do not store the round key; and responding to the plurality of entries which do not store the round key, storing the second round key into one of the plurality of entries, and processing the second data information by using the second round key.
In this embodiment, if one of the entries does not store the round key and the remaining entries store the round keys, the second round key is directly stored in the entry. And if more than one table entry in the plurality of table entries does not store the round key, saving the second round key into one table entry which does not store the round key.
In some embodiments, the method further comprises: and responding to the fact that the plurality of entries have the stored round key, searching one entry from the plurality of entries according to a preset rule, deleting the round key in the searched entry, storing the second round key in the searched entry, and processing the second data information by using the second round key.
In this embodiment, if all the entries have the stored round key and there is no idle entry, one entry is searched from the multiple entries according to a preset rule, which may specifically be to search for an entry that has the longest time to retain the round key from the multiple entries, that is, the currently retained round key in the entry has been stored in the entry for a long time.
In some embodiments, the method further comprises: in response to acquiring the first control information, it is confirmed that the processing flag in the first control information is the encryption flag or the decryption flag.
In some embodiments, processing the first data information using the first round key comprises: in response to the processing mark in the first control information being an encryption mark, performing encryption processing on the first data information by using the first round key; or in response to the processing mark in the first control information being the decryption mark, performing decryption processing on the first data information by using the first round key.
In the above embodiment, the first control information has a processing flag in addition to the key, and it can be known whether the corresponding data information needs to be encrypted or decrypted according to the processing flag; if the processing mark is an encryption mark, encrypting the data information; and if the processing mark is a decryption mark, decrypting the data information.
In some embodiments, determining whether the second key in the second control information is the same as the first key comprises: confirming that the processing mark in the second control information is an encryption mark or a decryption mark; responding to the processing mark in the second control information as an encryption mark, and judging whether the encryption key in the second control information is the same as the first key or not; or responding to the processing mark in the second control information as a decryption mark, and judging whether the decryption key in the second control information is the same as the first key.
In this embodiment, the second control information also has a key and a processing flag, and it can also be known whether the corresponding data information needs to be encrypted or decrypted according to the processing flag; if the processing mark is an encryption mark, the corresponding second key is an encryption key; and if the processing mark is a decryption mark, the corresponding second key is a decryption key. In this embodiment, since the round key is obtained by subjecting the key (128-bit character string) to a key expansion algorithm, the key corresponds to the initial key value with respect to the round key. The encryption algorithm is the same as the decryption algorithm, only the use sequence of the round keys is opposite, and the decryption round keys are the reverse sequence of the encryption round keys, so that the corresponding round keys after key expansion can be stored in the table entries no matter whether the data information needs to be encrypted or decrypted, and the difference lies in that the sequence of reading the round keys from the table entries is opposite when the round keys are used for encrypting and decrypting the data information.
In some embodiments, the method further comprises: and in response to the second data information being processed by the first round key in the specified entry, setting a key expansion module ready for round key expansion of the second key to a dormant state.
If the data processing method of this embodiment is implemented by using a hardware structure, when the second data information is encrypted and decrypted by using the first round key in the specified entry, the key expansion module that is prepared to perform round key expansion on the second key may be set to a sleep state, so as to reduce power consumption.
Fig. 2 is a schematic diagram illustrating an encryption/decryption scheme provided according to an embodiment of the present invention. As shown in fig. 2, the data processing method according to an exemplary embodiment of the present invention is as follows:
1) constructing two table entry tables 0 and 1 for storing the expanded round keys respectively;
2) reading related control information, data length data _ length of encryption and decryption, encryption and decryption flag encdec _ flag and key from fifo (first in first out, buffer space of one type of cache data in hardware) during encryption and decryption;
3) judging whether the encryption mode or the decryption mode is according to the mode of an encryption/decryption flag encdec _ flag, wherein encdec _ flag = 0 represents the encryption mode, and encdec _ flag = 1 represents the decryption mode;
4) when the first task to be processed is encrypted and decrypted, if the first task to be processed is in an encryption mode, round key expansion is carried out, the expanded round key is stored in a table0, and the read plaintext plain text (namely the first data information) is encrypted while the round key is expanded (the encryption mode uses an expanded round key sequence mode); if the round key is in the decryption mode, round key expansion is carried out, the expanded round key is stored in table0, and the read ciphertext text (namely the first data information) is decrypted after the round key expansion is finished (the decryption mode uses an expanded round key reverse order mode, namely the first round decryption uses RK31 and the last round decryption uses RK 0);
5) when a second task to be processed is encrypted and decrypted, if the input key is consistent with the key of the first task, the round key stored in table0 is directly used for encrypting and decrypting the data information of the second task to be processed, at this time, the round key expansion circuit is disabled, so that the key expansion module circuit is in a dormant state, and the power consumption of the encryption and decryption module is saved; if the input key is not consistent with the key of the first task, storing the expanded round key in a table 1;
6) when the third task to be processed is encrypted and decrypted, whether the input key is consistent with the key of the first task and the key of the second task or not is judged; if the key is consistent with the key of the first task, the round key in table0 is taken for direct encryption and decryption; if the key is consistent with the key of the second task, the round key in table1 is taken for direct encryption and decryption, and the key expansion module circuit is put to sleep; if the key of the first task is inconsistent (and the key of the first task is consistent with the key of the second task), performing key expansion, and refreshing the expanded round key to a table 1; if the key of the first task is inconsistent with the key of the second task (and the key of the first task is inconsistent with the key of the second task), performing key expansion, refreshing the expanded round key to a table0 with a longer round key retention time, and simultaneously performing encryption and decryption processing on data information of a third task to be processed;
7) when the fourth task to be processed is encrypted and decrypted, whether the input key is consistent with the initial key value (namely the key) corresponding to the round key stored in the table0 and the table1 is judged; if the initial key value corresponding to the table0 is consistent, directly taking the round key in the table0 for data encryption and decryption; if the initial key value corresponding to the table1 is consistent, directly taking the round key in the table1 to encrypt and decrypt data, and simultaneously sleeping the key expansion module circuit; if the round keys are inconsistent and the data of the third task are encrypted and decrypted, the round keys in the table0 are refreshed, and the expanded round keys are refreshed into the table1 in the current round; if the round key in the table0 is not refreshed during the data encryption and decryption of the third task, the round key expanded by the task is refreshed into the table0, and the data information of the fourth task to be processed is encrypted and decrypted;
8) when data of a plurality of tasks are continuously encrypted and decrypted, updating round keys in a table0 and a table1 and encrypting and decrypting processing of data information are carried out according to the mechanisms of the steps 6) and 7), namely if an input key initial value is different from the initial values of the round keys in the table0 and the table1, the table with the longest round key retention time is replaced, and data encrypting and decrypting processing is carried out.
In a second aspect of the embodiments of the present invention, a data processing system is also provided. FIG. 3 is a schematic diagram illustrating an embodiment of a data processing system provided by the present invention. As shown in fig. 3, a data processing system includes:
the first data processing module 10 is configured to construct a plurality of entries, acquire first data information and first control information of a first task to be processed, perform round key expansion on a first key in the first control information, store the first round key obtained through the round key expansion into a specified entry in the plurality of entries, and process the first data information by using the first round key;
the judging module 20 is configured to, in response to completion of processing the first data information, acquire second data information and second control information of a second to-be-processed task, and judge whether a second key in the second control information is the same as the first key; and
and the second data processing module 30 is configured to process the second data information by using the first round key in the specified entry in response to the second key being the same as the first key.
In some embodiments, the system further includes a storage determining module configured to perform round key expansion on the second key in response to that the second key is different from the first key, to obtain a second round key, and determine whether a plurality of entries in the plurality of entries do not store the round key; and responding to the plurality of entries which do not store the round key, storing the second round key into one of the plurality of entries, and processing the second data information by using the second round key.
In some embodiments, the system further includes a searching module configured to, in response to that all of the plurality of entries have the stored round key, search one entry from the plurality of entries according to a preset rule, delete the round key in the searched entry, store the second round key in the searched entry, and process the second data information using the second round key.
In some embodiments, the system further comprises a marker confirmation module configured to confirm whether the processing marker in the first control information is the encryption marker or the decryption marker in response to obtaining the first control information.
In some embodiments, the first data processing module 10 includes an encryption/decryption processing module configured to encrypt the first data information with the first round key in response to the processing flag in the first control information being an encryption flag; or in response to the processing mark in the first control information being the decryption mark, performing decryption processing on the first data information by using the first round key.
In some embodiments, the determining module 20 includes an encryption/decryption determining module configured to confirm that the processing flag in the second control information is the encryption flag or the decryption flag; responding to the processing mark in the second control information as an encryption mark, and judging whether the encryption key in the second control information is the same as the first key or not; or responding to the processing mark in the second control information as a decryption mark, and judging whether the decryption key in the second control information is the same as the first key.
In some embodiments, the system further includes a hibernation setting module configured to set, in response to processing the second data information with the first round key in the specified entry, a key expansion module that prepares to round-key expand the second key to a hibernation state.
In a third aspect of the embodiment of the present invention, a computer-readable storage medium is further provided, and fig. 4 is a schematic diagram illustrating a computer-readable storage medium implementing a data processing method according to an embodiment of the present invention. As shown in fig. 4, the computer-readable storage medium 3 stores computer program instructions 31. The computer program instructions 31, when executed by a processor, implement the method of any of the embodiments described above.
It is to be understood that all embodiments, features and advantages set forth above with respect to the data processing method according to the invention apply equally, without conflict with one another, to the data processing system and to the storage medium according to the invention.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer device, including a memory 402 and a processor 401 as shown in fig. 5, where the memory 402 stores therein a computer program, and the computer program implements the method of any one of the above embodiments when executed by the processor 401.
Fig. 5 is a schematic diagram of a hardware structure of an embodiment of a computer device for executing a data processing method according to the present invention. Taking the computer device shown in fig. 5 as an example, the computer device includes a processor 401 and a memory 402, and may further include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected by a bus or other means, and fig. 5 illustrates an example of a connection by a bus. The input device 403 may receive input numeric or character information and generate key signal inputs relating to user settings and function control of the data processing system. The output device 404 may include a display device such as a display screen.
The memory 402, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the data processing method in the embodiments of the present application. The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of a data processing method, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications of the server and data processing, i.e., a data processing method implementing the above-described method embodiments, by executing nonvolatile software programs, instructions, and modules stored in the memory 402.
Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A data processing method, characterized by comprising the steps of:
constructing a plurality of table entries, acquiring first data information and first control information of a first task to be processed, performing round key expansion on a first key in the first control information, storing the first round key obtained by expansion into a specified table entry in the plurality of table entries, and processing the first data information by using the first round key;
responding to the completion of the processing of the first data information, acquiring second data information and second control information of a second task to be processed, and judging whether a second key in the second control information is the same as the first key; and
and responding to the second key being the same as the first key, and processing the second data information by using the first round key in the specified table entry.
2. The method of claim 1, further comprising:
responding to the second key different from the first key, performing round key expansion on the second key to obtain a second round key, and judging whether a plurality of entries in the plurality of entries do not store the round key;
and responding to the plurality of entries not storing the round key, storing the second round key into one of the plurality of entries, and processing the second data information by using the second round key.
3. The method of claim 2, further comprising:
responding to the fact that the plurality of entries all have stored round keys, searching one entry from the plurality of entries according to a preset rule, deleting the round keys in the searched entry, storing the second round keys in the searched entry, and processing the second data information by using the second round keys.
4. The method of claim 1, further comprising:
and in response to acquiring the first control information, confirming that the processing mark in the first control information is an encryption mark or a decryption mark.
5. The method of claim 4, wherein processing the first data information using the first round key comprises:
in response to the processing flag in the first control information being the encryption flag, performing encryption processing on the first data information by using the first round key; or
And in response to the processing mark in the first control information being the decryption mark, performing decryption processing on the first data information by using the first round key.
6. The method of claim 4, wherein determining whether the second key in the second control information is the same as the first key comprises:
confirming that the processing flag in the second control information is the encryption flag or the decryption flag;
responding to the processing mark in the second control information to be the encryption mark, and judging whether an encryption key in the second control information is the same as the first key or not; or
And responding to the processing mark in the second control information as the decryption mark, and judging whether the decryption key in the second control information is the same as the first key.
7. The method of claim 1, further comprising:
and in response to the second data information being processed by the first round key in the specified entry, setting a key expansion module ready for round key expansion of the second key to a dormant state.
8. A data processing system, comprising:
the first data processing module is configured to construct a plurality of entries, acquire first data information and first control information of a first task to be processed, perform round key expansion on a first key in the first control information, store the first round key obtained by the round key expansion into a specified entry in the plurality of entries, and process the first data information by using the first round key;
the judging module is configured to respond to the completion of the processing of the first data information, acquire second data information and second control information of a second task to be processed, and judge whether a second key in the second control information is the same as the first key; and
and the second data processing module is configured to respond to the second key being the same as the first key, and process the second data information by using the first round key in the specified entry.
9. A computer-readable storage medium, characterized in that computer program instructions are stored which, when executed by a processor, implement the method according to any one of claims 1-7.
10. A computer device comprising a memory and a processor, characterized in that the memory has stored therein a computer program which, when executed by the processor, performs the method according to any one of claims 1-7.
CN202111239412.7A 2021-10-25 2021-10-25 Data processing method, system, storage medium and equipment Pending CN113688414A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111239412.7A CN113688414A (en) 2021-10-25 2021-10-25 Data processing method, system, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111239412.7A CN113688414A (en) 2021-10-25 2021-10-25 Data processing method, system, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN113688414A true CN113688414A (en) 2021-11-23

Family

ID=78587785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111239412.7A Pending CN113688414A (en) 2021-10-25 2021-10-25 Data processing method, system, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113688414A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478392A (en) * 2009-01-19 2009-07-08 山东大学 Apparatus for implementing 128 bit cipher key length AES algorithm by VLSI
CN102624520A (en) * 2012-05-02 2012-08-01 西安电子科技大学 192 bit key expansion system and method based on AES (Advanced Encryption Standard)
CN102647272A (en) * 2012-05-02 2012-08-22 西安电子科技大学 Expansion system and method for 256-bit keys
CN110311771A (en) * 2018-03-20 2019-10-08 北京松果电子有限公司 SM4 encipher-decipher method and circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478392A (en) * 2009-01-19 2009-07-08 山东大学 Apparatus for implementing 128 bit cipher key length AES algorithm by VLSI
CN102624520A (en) * 2012-05-02 2012-08-01 西安电子科技大学 192 bit key expansion system and method based on AES (Advanced Encryption Standard)
CN102647272A (en) * 2012-05-02 2012-08-22 西安电子科技大学 Expansion system and method for 256-bit keys
CN110311771A (en) * 2018-03-20 2019-10-08 北京松果电子有限公司 SM4 encipher-decipher method and circuit

Similar Documents

Publication Publication Date Title
US9553722B2 (en) Generating a key based on a combination of keys
WO2021129557A1 (en) File encryption method and related apparatus
TWI729709B (en) Data preprocessing method, ciphertext data acquisition method, device and electronic equipment
US10742400B2 (en) Datastream block encryption
WO2020125527A1 (en) Data compression method, apparatus, computer device and storage medium
CN112527835A (en) Authentication request processing method and device based on cache and related equipment
CN112134686A (en) AES hardware implementation method based on reconfigurable computing, computer equipment and readable storage medium for operating AES hardware implementation method
CN108990055A (en) A kind of secret protection circuit of bluetooth equipment
CN113688414A (en) Data processing method, system, storage medium and equipment
CN106533657B (en) SM3 hash encryption system
CN116894273B (en) File encryption method, decryption method, equipment and medium based on exclusive or sum remainder
JP2016525836A (en) Apparatus and method for rekeying for use in a block cipher algorithm
CN103338107A (en) A secret key generation method and a secret key generation apparatus
JP4863279B2 (en) Memory system and memory access method
CN111767553A (en) Data encryption and decryption method, MCU, electronic equipment and readable storage medium
CN111352993A (en) Cross-platform data synchronization method and device and electronic equipment
US20220131684A1 (en) Hash algorithm method, hash algorithm circuit, and electronic device
CN111104648A (en) Software processing method and device, application program and electronic equipment
EP3832945A1 (en) System and method for protecting memory encryption against template attacks
CN110362773B (en) Cross-domain communication method, device, computer equipment and storage medium
CN113221173A (en) Ciphertext processing method, device, equipment and storage medium
CN105528548A (en) Method for encoding and automatically decoding codes in chip OutNvMem in batches
CN111199596A (en) Intelligent door lock control method, device and system
US20180278412A1 (en) Storage device hash production
CN113127034B (en) BMC-based board card updating method, system, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211123