Data protection device and method, data decryption device and method, equipment and medium
By combining key generation, data encryption and integrity protection modules in the data protection device, using obfuscated parameter information and scrambling keys, the problem of insufficient data integrity and correctness protection in the prior art is solved, and efficient data integrity protection is achieved.
Patent Information
- Application Number
- CN202411957484.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-08
AI Technical Summary
Existing encryption protection measures mainly focus on protecting data confidentiality, and the protection of data integrity and correctness is insufficient, and cannot effectively resist physical attacks and data tampering.
A data protection device including a key generation module, a data encryption module and an integrity protection module is adopted. The device generates a key based on obfuscating parameter information, encrypts the data, and generates an integrity check code through the scrambling key to ensure the integrity of the data.
It realizes efficient and low collision integrity protection for data, reduces latency, improves the system's ability to fight attacks, and further protects the integrity and correctness of data.
Smart Images

Figure CN119783171A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to a data protection device and method, a data decryption device and method, an electronic device, and a non-transitory computer-readable storage medium. Background Art
[0002] With the rapid development and widespread popularization of information technology, data security has gradually attracted attention. In order to prevent relevant data from being illegally accessed or leaked, for example, plaintext data can be converted into encrypted ciphertext, which effectively enhances the confidentiality of data. However, the continuous innovation of technology has also spawned more physical attack methods against encrypted data. As the attack methods continue to evolve, they pose an increasingly severe threat to the security of encrypted data. Summary of the invention
[0003] At least one embodiment of the present disclosure provides a data protection device, the data protection device comprising a key generation module, a data encryption module and an integrity protection module. The key generation module is configured to generate a first key according to obfuscation parameter information in response to a write request corresponding to a first data plaintext; the data encryption module is configured to generate a first data ciphertext according to the first key and the first data plaintext; and the integrity protection module is configured to generate an integrity check code for the first data ciphertext according to the scrambling key.
[0004] For example, in the data protection device provided by an embodiment of the present disclosure, the data encryption module is also configured to generate a time identifier corresponding to the first data ciphertext based on the first key and the first data plaintext, wherein the time identifier is used to identify the time consistency between the data encryption module and the integrity protection module.
[0005] For example, in the data protection device provided in an embodiment of the present disclosure, the key generation module is also configured to generate enable bit information; and the integrity protection module is also configured to generate the integrity check code for the first data ciphertext according to the scrambling key in response to the enable operation of the enable bit information, otherwise the integrity check code is assigned an invalid value.
[0006] For example, in a data protection device provided in an embodiment of the present disclosure, the data protection device further includes an obfuscation scrambling module. The obfuscation scrambling module is configured to obtain the scrambling key according to the first key and the command address information included in the write request; wherein the integrity protection module is further configured to generate corresponding summary information as the integrity check code according to the first data ciphertext and the scrambling key.
[0007] For example, in a data protection device provided in an embodiment of the present disclosure, the data protection device further includes an error correction code generation module. The error correction code generation module is configured to generate an error correction code corresponding to the first data ciphertext and the integrity check code.
[0008] For example, in a data protection device provided in an embodiment of the present disclosure, the data protection device further includes a key queue. The key queue is configured to store a plurality of obfuscated scrambling keys corresponding to a plurality of operators, and a plurality of enable bit information corresponding to the plurality of operators, wherein a first operator among the plurality of operators issues the write request.
[0009] For example, in a data protection device provided in an embodiment of the present disclosure, the data protection device further includes an obfuscation parameter buffer. The obfuscation parameter buffer is configured to determine the obfuscation parameter information according to parameter information of an operator sending the first data plaintext.
[0010] For example, in a data protection device provided in an embodiment of the present disclosure, the obfuscation parameter buffer stores multiple alternative obfuscation parameter information corresponding to multiple operators; the obfuscation parameter buffer is also configured to select obfuscation parameter information from the multiple alternative obfuscation parameter information based on the parameter information of the operator who sends the first data plaintext.
[0011] At least one embodiment of the present disclosure provides a data decryption device, the data decryption device comprising a key generation module, an integrity protection module and a data decryption module. The key generation module is configured to generate a first key according to obfuscation parameter information in response to a read request corresponding to a first data ciphertext; the integrity protection module is configured to generate decryption verification operation information according to an integrity check code and a scrambling key corresponding to the first data ciphertext; and the data decryption module is configured to perform a decryption operation on the first data ciphertext according to the first key to generate a first data plaintext, or terminate the decryption operation in response to the decryption verification operation information.
[0012] For example, in the data decryption device provided by an embodiment of the present disclosure, the key generation module is also configured to generate enable bit information; and the integrity protection module is also configured to generate an expected value of the integrity check code according to the scrambling key in response to the enable operation of the enable bit information, otherwise assign the expected value of the integrity check code to an invalid value, and generate the decryption verification operation information according to the integrity check code and the expected value of the integrity check code.
[0013] For example, in a data decryption device provided in an embodiment of the present disclosure, the data decryption device further includes an obfuscation scrambling module. The obfuscation scrambling module is configured to obtain the scrambling key according to the first key and the command address information included in the read request; wherein the integrity protection module is further configured to generate corresponding summary information as the expected value of the integrity check code according to the scrambling key and the first data ciphertext.
[0014] For example, in the data decryption device provided by an embodiment of the present disclosure, the integrity protection module is further configured to generate first decryption verification operation information in response to the integrity check code and the expected value of the integrity check code not matching, and to generate second decryption verification operation information in response to the integrity check code and the expected value of the integrity check code matching, wherein the first decryption verification operation information is used to indicate the termination of the decryption operation, and the second decryption verification operation information is used to indicate the start of the decryption operation.
[0015] For example, in a data decryption device provided in an embodiment of the present disclosure, the data decryption device further includes an error correction code verification module. The error correction code verification module is configured to perform an error correction operation on the first data ciphertext and the integrity check code according to an error correction check code corresponding to the first data ciphertext and the integrity check code.
[0016] For example, in the data decryption device provided by an embodiment of the present disclosure, the error correction code verification module is also configured to generate first decryption verification operation information in response to the presence of errors in the first data ciphertext and the integrity check code but the errors cannot be corrected, wherein the first decryption verification operation information is used to indicate the termination of the decryption operation.
[0017] For example, in the data decryption device provided by an embodiment of the present disclosure, the error correction code verification module is also configured to generate a time identifier corresponding to the first data ciphertext, wherein the time identifier is used to identify the time consistency between the data decryption module and the integrity protection module.
[0018] For example, in a data decryption device provided in an embodiment of the present disclosure, the data decryption device further includes a key queue. The key queue is configured to store a plurality of obfuscated scrambling keys corresponding to a plurality of operators, and a plurality of enable bit information corresponding to the plurality of operators, wherein a first operator among the plurality of operators issues the read request.
[0019] At least one embodiment of the present disclosure provides a data protection method, which includes: in response to a write request corresponding to a first data plaintext, generating a first key according to obfuscation parameter information; generating a first data ciphertext according to the first key and the first data plaintext; and generating an integrity check code for the first data ciphertext according to the scrambling key.
[0020] At least one embodiment of the present disclosure provides a data decryption method, which includes: in response to a read request corresponding to a first data ciphertext, generating a first key according to obfuscation parameter information; generating decryption verification operation information according to an integrity check code and an scrambling key corresponding to the first data ciphertext; and in response to the decryption verification operation information, performing a decryption operation on the first data ciphertext according to the first key to generate a first data plaintext, or terminating the decryption operation.
[0021] At least one embodiment of the present disclosure provides an electronic device, which includes the data protection device provided by any embodiment of the present disclosure and / or the data decryption device provided by any embodiment of the present disclosure.
[0022] At least one embodiment of the present disclosure provides an electronic device, comprising: a processor and a memory, wherein the memory stores at least one computer program, and when the at least one computer program is executed by the processor, the data protection method provided by any embodiment of the present disclosure and / or the data decryption method provided by any embodiment of the present disclosure is implemented.
[0023] At least one embodiment of the present disclosure provides a non-transitory computer-readable storage medium for non-temporarily storing computer-readable instructions. When the computer-readable instructions are executed by a computer, the data protection method provided by any embodiment of the present disclosure and / or the data decryption method provided by any embodiment of the present disclosure are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure.
[0025] Figure 1 A schematic block diagram of a data protection device provided by at least one embodiment of the present disclosure is shown;
[0026] Figure 2 A schematic block diagram of another data protection device provided by at least one embodiment of the present disclosure is shown;
[0027] Figure 3 A schematic block diagram of a data decryption device provided by at least one embodiment of the present disclosure is shown;
[0028] Figure 4 A schematic block diagram of another data decryption device provided by at least one embodiment of the present disclosure is shown;
[0029] Figure 5 A schematic block diagram of an application of a data protection device provided by at least one embodiment of the present disclosure is shown;
[0030] Figure 6 A schematic block diagram of an application of a data decryption device provided by at least one embodiment of the present disclosure is shown;
[0031] Figure 7 A flow chart of a data protection method provided by at least one embodiment of the present disclosure is shown;
[0032] Figure 8 A flow chart of a data decryption method provided by at least one embodiment of the present disclosure is shown;
[0033] Fig. 9 A schematic block diagram of an electronic device provided by at least one embodiment of the present disclosure is shown;
[0034] Fig.10 A schematic block diagram showing another electronic device provided by at least one embodiment of the present disclosure; and
[0035] Fig.11 A schematic diagram of a computer-readable storage medium provided by at least one embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0037] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not indicate quantity restrictions, but indicate that there is at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0038] With the rapid development of information technology, the amount of data stored and processed in computer systems continues to rise, which not only puts higher requirements on data security, but also intensifies the challenges associated with it. Especially in today's digital age, data security issues have become the focus of social attention. As an important part of the computer system, the security of memory directly affects the stability and reliability of the entire system.
[0039] Physical attacks on memory systems, such as side-channel attacks, cold boot attacks, or direct memory access attacks (DMA attacks), can bypass some system protection mechanisms and directly operate on physical memory, causing sensitive data to be leaked or maliciously tampered with. Such attacks pose a serious threat to the security of information systems, so it is crucial to develop effective encryption and decryption solutions to protect the integrity and correctness of memory data.
[0040] To address such security challenges, encryption protection measures can be integrated at the hardware level. For example, for memory using DRAM (Dynamic Random Access Memory, dynamic random access memory) (hereinafter referred to as "DRAM"), confidentiality protection functions can be added to DRAM. Specifically, an encryption module can be integrated on the write path of the memory controller to encrypt the data to be written to DRAM and store the encrypted data (i.e., ciphertext) in the memory; on the read path, a corresponding decryption module can be configured. When reading data from DRAM, the decryption module can first decrypt the ciphertext and then transmit the plaintext to the CPU for subsequent data processing. In this way, the confidentiality of the data can be guaranteed to a certain extent to prevent unauthorized access.
[0041] However, the inventors of the present disclosure have noticed that although the above-mentioned encryption protection measures can enhance the security of data to a certain extent, they mainly focus on protecting the confidentiality of data, and the protection of data integrity and correctness is insufficient. For example, although encryption can prevent unauthorized parties from reading original data, it cannot detect or prevent the tampering of data ciphertext in memory, and it cannot detect and correct data errors caused by physical defects or transmission. It does not have the ability to verify data integrity, nor can it identify data tampering behaviors that are beyond its error correction range. Therefore, in the face of increasingly complex attack methods, there are still obvious limitations in improving the protection of data integrity and correctness, and it cannot meet the demand for high security.
[0042] Embodiments of the present disclosure provide a data protection device and method, a data decryption device and method, an electronic device, and a non-transitory computer-readable storage medium.
[0043] The data protection device includes a key generation module, a data encryption module and an integrity protection module; the key generation module is configured to generate a first key according to obfuscation parameter information in response to a write request corresponding to a first data plaintext; the data encryption module is configured to generate a first data ciphertext according to the first key and the first data plaintext; and the integrity protection module is configured to generate an integrity check code for the first data ciphertext according to the scrambling key.
[0044] The data decryption device includes a key generation module, an integrity protection module and a data decryption module; the key generation module is configured to generate a first key according to obfuscation parameter information in response to a read request corresponding to a first data ciphertext; the integrity protection module is configured to generate decryption verification operation information according to an integrity check code and an scrambling key corresponding to the first data ciphertext; and the data decryption module is configured to perform a decryption operation on the first data ciphertext according to the first key to generate a first data plaintext, or terminate the decryption operation in response to the decryption verification operation information.
[0045] The data protection device and the data decryption device can realize high-efficiency and low-collision data integrity protection, and can also reduce delays, improve the system's ability to resist attacks, and further protect the integrity and correctness of data.
[0046] Figure 1 A schematic block diagram of a data protection device provided by at least one embodiment of the present disclosure is shown.
[0047] like Figure 1 As shown, the data protection device 100 includes a key generation module 110 , a data encryption module 120 and an integrity protection module 130 .
[0048] The key generation module 110 is configured to generate a first key in response to a write request corresponding to the first data plaintext and according to the obfuscation parameter information.
[0049] The data encryption module 120 is configured to generate a first data ciphertext according to the first key and the first data plaintext. The first data ciphertext corresponds to the result obtained by encrypting the first data plaintext, and is transmitted downstream for storage or transmission, for example.
[0050] The integrity protection module 130 is configured to generate an integrity check code for the first data ciphertext according to the scrambling key.
[0051] In the embodiment of the present disclosure, the first data plaintext is an object that needs to be encrypted.
[0052] For example, the write request corresponding to the first data plaintext may be issued by a first operator among multiple operators.
[0053] For example, the multiple operators may include different devices or equipment from the upstream processing devices of the data protection device 100, such as a processor, a direct memory access (DMA) controller, an I / O device, etc., and the embodiments of the present disclosure are not limited to this. The first operator may be, for example, any operator among the multiple operators, and the embodiments of the present disclosure are not limited to this.
[0054] For example, the type of obfuscation parameter information may include parameters such as a random number, an output of a key derivation function (KDF), an address hash value, or a data offset. The embodiments of the present disclosure do not limit the type of obfuscation parameter information.
[0055] For example, when receiving a write request corresponding to the first data plaintext, the key generation module 110 may be configured to perform encryption processing on the obfuscation parameter information to generate a first key.
[0056] For example, when the processing device upstream of the data protection device 100 issues a data write request and prepares to write the first data in plain text to the memory or send it to other destinations, the key generation module 110 starts working. The key generation module 110 can obtain obfuscation parameter information and use the obfuscation parameter information to calculate and generate a first key through one or more encryption algorithms (such as obfuscation functions, hash functions, pseudo-random number generators, etc., which are not limited in the embodiments of the present disclosure).
[0057] For example, the obfuscation parameter information may correspond to the processing device that issues the write data request.
[0058] For example, the key generation module 110 may be configured to provide the generated first key to the data encryption module 120 for subsequent processing.
[0059] For example, the data encryption module 120 may be configured to encrypt the first data plaintext using the first key provided by the key generation module 110 to generate a corresponding first data ciphertext.
[0060] For example, the data encryption module 120 receives the first data plaintext to be encrypted and the first key from the key generation module 110 from the upstream. The data encryption module 120 can then use one or more encryption algorithms to encrypt the first data plaintext according to the first key to generate a first data ciphertext, which is an encrypted form of the original first data plaintext. The first data ciphertext can be transmitted to the downstream for storage and / or sent to the next processing stage in subsequent steps.
[0061] Here, the one or more encryption algorithms may include, for example, symmetric encryption algorithms (such as AES, DES, SM4, etc.), asymmetric encryption algorithms (such as RSA, SM2, etc.) or other encryption algorithms, etc., and the embodiments of the present disclosure are not limited to this.
[0062] For example, the integrity protection module 130 may be configured to generate a corresponding integrity check code for the first data ciphertext to prevent the first data ciphertext from being tampered with during storage or transmission.
[0063] For example, the scrambling key may be another set of keys independent of the first key, or may be derived from the first key, thereby providing an additional verification mechanism so that illegal modification of the first data ciphertext can be detected.
[0064] For example, the integrity protection module 130 may receive the first data ciphertext provided by the data encryption module 120, and the integrity protection module 130 may also obtain a scrambling key for generating an integrity check code, and then the integrity protection module 130 may use the scrambling key to calculate a corresponding integrity check code for the first data ciphertext through one or more operation methods, and the integrity check code has sufficient anti-collision performance. Here, the one or more operation methods may include, for example, a hash function (such as SHA-256, SHA-3, SM3, etc.), MAC (Message Authentication Code, message authentication code) or other digest algorithms that can be used to generate summary information.
[0065] For example, the generated integrity check code may be stored or transmitted together with the first data ciphertext, so that integrity verification may be performed when the first data ciphertext is read or received.
[0066] For example, the integrity protection module 130 may output a data packet including the first data ciphertext and its corresponding integrity check code for storage or transmission to other corresponding destinations.
[0067] In at least one embodiment of the present disclosure, the randomness and security of the first key are improved through the key generation module 110, the encryption protection of the first data plaintext is implemented through the data encryption module 120, and an additional integrity verification mechanism is provided for the encrypted data through the integrity protection module 130. The data protection device 100 can not only improve the confidentiality of the data, but also further provide integrity protection for the data, thereby effectively resisting potential security threats.
[0068] In some embodiments of the present disclosure, the key generation module 110 may be further configured to generate a first key according to the obfuscation parameter information and the second key.
[0069] For example, the key generation module 110 may be configured to integrate the obfuscation parameter information and the second key to generate the first key.
[0070] For example, the key generation module 110 may integrate the obfuscation parameter information and the second key by concatenating the two, performing a predetermined mathematical operation, passing the two as input parameters to a key derivation function, or performing a predetermined obfuscation operation, etc. The embodiments of the present disclosure are not limited to this.
[0071] For example, the second key may be a public key, which is not limited in the embodiments of the present disclosure.
[0072] In the data protection device of at least one embodiment of the present disclosure, the first key is generated by obfuscating parameter information and the second key, which provides higher security and flexibility for data encryption, further improves the complexity of the first key, and increases the difficulty for attackers to crack encrypted data.
[0073] In some embodiments of the present disclosure, the data encryption module 120 may also be configured to generate a time stamp corresponding to the first data ciphertext based on the first key and the first data plaintext.
[0074] For example, the time identifier may be used to identify the time consistency between the data encryption module 120 and the integrity protection module 130 .
[0075] For example, a timestamp can provide a time reference so that in subsequent data processing, it can be verified whether data encryption and integrity protection operations occur at the same time point or within a reasonable time range, thereby helping to detect attempts to bypass security mechanisms by manipulating timestamps.
[0076] For example, the data encryption module 120 can obtain the current time from a system clock source (such as RTC, Real-Time Clock, etc.).
[0077] For another example, a time synchronization protocol (such as Network Time Protocol (NTP) or other similar time synchronization schemes) may be used to ensure time consistency between different nodes in the system.
[0078] For example, the data encryption module 120 can use the current time, the first key, and the first data plaintext as input parameters to generate a corresponding time identifier. The combination of these input parameters can improve the uniqueness and unpredictability of the time identifier and increase the difficulty of forgery.
[0079] For example, the data encryption module 120 may use one or more of the aforementioned encryption algorithms, taking the current time, the first key, and the first data plaintext as input parameters, to generate a corresponding time identifier.
[0080] For example, the data encryption module 120 may also use a hash function (such as SHA-256, SHA-3, etc.) to generate a fixed-length, collision-resistant time identifier. For example, the above input parameter may be converted into a compact hash value as the corresponding time identifier using a hash function.
[0081] For example, the time identifier may be an accurate timestamp, a serial number, or another unique time mark, etc., which is not limited in the embodiments of the present disclosure.
[0082] For example, the data encryption module 120 may encapsulate the generated time stamp together with the first data ciphertext to form a corresponding data packet, which may then be passed to the integrity protection module 130 or sent to a corresponding destination.
[0083] For example, after receiving the time identifier, the integrity protection module 130 can obtain the current time from the clock source corresponding to the integrity protection module 130 itself, and compare it with the received time identifier. If the difference between the two is within a preset tolerance range (for example, a few milliseconds or a few seconds), it can be considered that the time consistency has been verified; otherwise, it may mean that the first data ciphertext has been tampered with or delayed during transmission, and further detection or processing is required.
[0084] In the data protection device of at least one embodiment of the present disclosure, by introducing a time identifier, the data protection device 100 not only enhances the confidentiality and integrity protection of the data, but also provides security protection in the time dimension, further improving the reliability and credibility of the entire data processing flow.
[0085] In some embodiments of the present disclosure, the key generation module 110 may also be configured to generate enable bit information. The integrity protection module 130 may also be configured to generate an integrity check code for the first data ciphertext according to the scrambling key in response to the enable operation of the enable bit information, otherwise the integrity check code is assigned an invalid value.
[0086] For example, the enable bit information can be used to indicate whether a corresponding integrity check code needs to be generated for the first data ciphertext. Thus, it can be flexibly determined whether to perform integrity protection operations according to different application scenarios or security policies. For example, in some cases, it may not be necessary to perform complete integrity protection on all data. For example, for some non-sensitive data or temporary data, the generation of integrity check codes can be disabled to reduce computing overhead and storage requirements.
[0087] For example, the enable bit information can also be used to respond to emergency situations. For example, when a potential security threat is detected, the integrity protection function can be quickly enabled to protect the security of critical data.
[0088] For example, the key generation module 110 may determine whether to generate the enable bit information according to the security policy of the system or other preset configuration conditions.
[0089] For example, when the preset configuration condition corresponding to the processing device upstream of the data protection device 100 that sends the first data plaintext indicates that the data sent by the processing device needs to be integrity protected, the key generation module 110 can generate corresponding enable bit information (for example, set to 1) and pass it to the subsequent module; otherwise, the enable bit information will be set to an invalid value (for example, 0).
[0090] For example, the generated enable bit information may be provided by the key generation module 110 to the integrity protection module 130 .
[0091] For example, the enable bit information may be recorded in the data sequence of the obfuscation parameter information. Exemplarily, the enable bit information may be recorded in the high bit or a specific bit of the obfuscation parameter information data sequence, which is not limited in the embodiments of the present disclosure.
[0092] For example, after receiving the corresponding enable bit information, the integrity protection module 130 can determine whether to generate an integrity check code based on the enable bit information. Specifically:
[0093] For example, if the enable bit information is 1, it indicates that integrity protection needs to be enabled; if the enable bit information is 0, it indicates that no integrity check code needs to be generated. It should be noted that in the embodiments of the present disclosure, assigning the enable information to 1 or 0 is only an exemplary description, and the embodiments of the present disclosure do not limit the specific representation of the enable information.
[0094] For example, if the enable bit information is 1, the integrity protection module 130 can generate a corresponding integrity check code for the first data ciphertext according to the scrambling key. The process of the integrity protection module 130 generating the corresponding integrity check code can refer to the relevant description of the aforementioned embodiment, which will not be repeated here.
[0095] For example, if the enable bit information is 0, the integrity protection module 130 may not perform the integrity check code generation operation, and may assign the integrity check code to a predefined invalid value (for example, all zeros or a specific error code). This invalid value can be identified as a sign that integrity protection is not enabled in the subsequent verification process.
[0096] For example, an integrity check code containing an invalid value may also be output, but the user or system should be aware that the data corresponding to the integrity check code has not been integrity protected or does not need to be integrity protected temporarily.
[0097] In at least one embodiment of the present disclosure, by introducing enable bit information, the system can dynamically adjust the enabled state of integrity protection according to actual conditions, which can further reduce potential vulnerabilities in fixed modes. For example, when abnormal behavior is detected, integrity protection can be enabled immediately to further improve the security of critical data. In addition, the system can flexibly apply integrity protection functions in different scenarios, reducing unnecessary resource consumption.
[0098] Figure 2 A schematic block diagram of another data protection device provided by at least one embodiment of the present disclosure is shown.
[0099] like Figure 2 As shown, Figure 1 Compared with the embodiment of the present invention, the data protection device 100 further includes an obfuscation scrambling module 140. The obfuscation scrambling module 140 may be configured to obtain an scrambling key according to the first key and the command address information included in the write request.
[0100] The integrity protection module 130 may also be configured to generate corresponding summary information as an integrity check code according to the first data ciphertext and the scrambling key.
[0101] For example, the obfuscated scrambling module 140 generates a scrambling key according to the first key and the command address information in the write request, so that the scrambling key corresponding to each write request is unique and unpredictable, further increasing the difficulty for an attacker to infer the key or data content by analyzing the relationship between multiple data blocks.
[0102] For example, the command address information may include a memory address, a storage location, or other identifiers, etc., for identifying a target location of the current write operation.
[0103] For example, the obfuscation and scrambling module 140 may receive the first key provided by the key generation module 110 and extract the corresponding command address information from the write request.
[0104] In a possible implementation, the obfuscation and scrambling module 140 may perform obfuscation and scrambling processing on the first key and the command address information to obtain a scrambling key.
[0105] For example, the confusion and scrambling process may include modes such as bit operation processing, noise addition processing, encryption processing or data disturbance processing, and the embodiments of the present disclosure are not limited to this. Exemplarily, the bit operation processing may further include bit and (&), bit or (|), bit left shift (<<), bit right shift (>>), bit inversion (~) (i.e., data bit inversion operation) or bit exchange (i.e., data bit exchange operation) and other operations on the data. For example, the noise addition process may include adding random noise to the corresponding data to confuse the data. For example, the encryption process may include using a cryptographic algorithm to convert the corresponding data into an encrypted data form. For example, the data disturbance process may include disturbing the corresponding data to confuse the data, and there is a certain difference between the disturbed data and the original data.
[0106] In a possible implementation, the obfuscation and scrambling module 140 may also use the command address information as a selection signal to select an obfuscation and scrambling processing mode, and then perform obfuscation and scrambling processing on the first key to obtain a scrambled key. For example, the selection signal may select a corresponding obfuscation and scrambling processing mode by mapping or matching.
[0107] For example, the obfuscation scrambling module 140 may include an obfuscation scrambling pattern library, which may record a plurality of different obfuscation scrambling processing modes.
[0108] For example, the obfuscation scrambling module 140 may be configured to select a corresponding obfuscation scrambling processing mode according to the selection signal. Here, the selection process for the obfuscation scrambling processing mode may include direct mapping (such as selecting the signal as an index) or may include matching based on a certain rule or condition, which is not limited in the embodiments of the present disclosure.
[0109] For example, the obfuscation scrambling module 140 may be configured to select at least one obfuscation scrambling processing mode from the mode library according to the selection signal. For example, when the selected obfuscation scrambling processing mode is a plurality of obfuscation scrambling processing modes, the obfuscation scrambling module 140 may be further configured to determine the operation order of the selected plurality of obfuscation scrambling processing modes according to the selection signal.
[0110] Exemplarily, when the selected obfuscation scrambling processing mode is the first obfuscation scrambling processing and the second obfuscation scrambling processing among the multiple obfuscation scrambling processing modes, the obfuscation scrambling module 140 may perform the first obfuscation scrambling processing on the first key to obtain a first obfuscation scrambling processing result, and then perform the second obfuscation scrambling processing on the first obfuscation scrambling processing result to generate a scrambling key.
[0111] In another possible implementation, the obfuscation scrambling module 140 may also use the first key as a selection signal to select an obfuscation scrambling processing mode, and then perform obfuscation scrambling processing on the command address information to obtain a scrambling key. The specific operation of the obfuscation scrambling module 140 using the first key as a selection signal to select an obfuscation scrambling processing mode can refer to the description of using the command address information as a selection signal to select an obfuscation scrambling processing mode in the aforementioned embodiment, and will not be repeated here.
[0112] For example, the integrity protection module 130 may receive the first data ciphertext provided by the data encryption module 120 and the scrambling key provided by the obfuscated scrambling module 140 .
[0113] For example, the integrity protection module 130 may generate corresponding summary information as an integrity check code according to a summary algorithm, the first data ciphertext and the scrambling key.
[0114] For example, the digest algorithm may include HMAC-SHA-256, HMAC-SHA-3, SM3, or BLAKE2, etc. The embodiments of the present disclosure do not limit the specific selection of the digest algorithm.
[0115] For example, the integrity protection module 130 may also receive a time identifier generated by the data encryption module 120, and the integrity protection module 130 may perform time consistency verification in combination with the time identifier, so that the timestamp of the generated integrity check code is correct.
[0116] For example, the integrity protection module 130 can determine whether it is necessary to generate an integrity check code based on the enable bit information. If the enable bit information is 1, the integrity protection module 130 can use a digest algorithm to combine the first data ciphertext and the scrambling key to generate digest information as the integrity check code. If the enable bit information is 0, the integrity protection module 130 can assign an invalid value (such as all zeros) to the integrity check code.
[0117] In the data protection device of at least one embodiment of the present disclosure, by introducing the obfuscated scrambling module 140, the scrambling key generated by the obfuscated scrambling module 140 not only depends on the first key, but also combines the command address information, so that the scrambling key is unique and unpredictable, thereby further improving the difficulty for attackers to infer the original key or data content by analyzing the relationship between multiple data. In addition, the integrity check code generated by the digest algorithm can not only detect data tampering, but also verify the correctness of the scrambling key, so that the integrity of the encrypted data is doubly guaranteed. In addition, through the enable bit information mechanism, the generation of the integrity check code can be flexibly enabled or disabled according to actual needs, reducing unnecessary resource consumption while maintaining the necessary security level. By managing and configuring the enable bit information, it is more convenient to control which data needs to be integrity protected and which data can relax the requirements, thereby improving the manageability and ease of use of the data, so that the data protection device 100 improves the confidentiality and integrity of the data while further improving the security and flexibility, and adapting to the needs of different application scenarios.
[0118] like Figure 2 As shown, Figure 1 In contrast, the data protection device 100 further includes an error correction code generation module 150. The error correction code generation module 150 may be configured to generate an error correction code corresponding to the first data ciphertext and the integrity check code.
[0119] For example, an error correction code can be a kind of redundant information, which can be used to detect and correct errors within a certain range during data transmission or storage. By introducing error correction codes, the reliability and fault tolerance of data can be further improved, such as when facing physical media failures, electromagnetic interference or other factors that may cause data corruption.
[0120] For example, the error correction code generation module 150 may be configured to receive the first data ciphertext provided by the data encryption module 120 and the integrity check code provided by the integrity protection module 130 .
[0121] For example, the error correction code generation module 150 may generate an error correction check code corresponding to the first data ciphertext and an error correction check code corresponding to the integrity check code according to an error correction algorithm.
[0122] For example, the error correction algorithm may include Hamming Code, Reed-Solomon Code, BCH Code (Bose-Chaudhuri-Hocquenghem Code) or LDPC Code (Low-Density Parity-Check Code), etc., which is not limited in the embodiments of the present disclosure.
[0123] For example, if the integrity check code is a valid value, the error correction code generation module 150 can generate an error correction check code corresponding to the first data ciphertext and an error correction check code corresponding to the integrity check code; if the integrity check code is assigned an invalid value (such as all zeros), the error correction code generation module 150 can decide whether to continue generating the error correction check code according to the configuration, or assign the error correction check code to an invalid value (such as all zeros).
[0124] In at least one embodiment of the present disclosure, the error correction code can work in conjunction with other security mechanisms (such as data encryption and integrity verification) to provide multi-level data protection, thereby further enhancing the security protection of data.
[0125] like Figure 2 As shown, Figure 1 Compared with the embodiment of the present invention, the data protection device 100 further includes a key queue 160. The key queue 160 may be configured to store a plurality of obfuscated scrambling keys respectively corresponding to a plurality of operators, and a plurality of enable bit information respectively corresponding to a plurality of operators.
[0126] For example, each of the multiple operators may be configured with corresponding obfuscated scrambling key and enable bit information.
[0127] For example, the key queue 160 may adopt a first-in-first-out (FIFO) or priority queue mechanism for queue management, and may also adjust the queue management accordingly according to the operator's priority, access frequency or other conditions to improve performance and efficiency, but the embodiments of the present disclosure are not limited to this.
[0128] For example, each key entry in the key queue 160 may include the following information: operator identification information (Operator ID), enable bit information, obfuscated scrambling key or time identifier, etc., which is not limited in the embodiments of the present disclosure.
[0129] For example, the operator identification information may be used to represent the identity of each operator, such as an application name, a device sequence, or a device serial number.
[0130] For example, the first key and enable bit information generated by the key generation module 110 in the aforementioned embodiment, the obfuscated scrambling key generated by the obfuscated scrambling module 140, the operator identification information of the corresponding operator or the corresponding time identifier can be stored together in the key queue 160.
[0131] For example, if the operator identification information, enable bit information, obfuscated scrambling key or time mark corresponding to the operator already exists in the key queue 160, the corresponding key entry in the key queue 160 can be updated; otherwise, a new key entry can be created.
[0132] For example, the key queue 160 can support concurrent requests from multiple operators at the same time. Each of the multiple operators can be configured with a corresponding independent key entry, so that the information contained in the key entries of different operators will not interfere with each other.
[0133] In the data protection device of at least one embodiment of the present disclosure, independent key management and security policies can be provided for multiple operators through the key queue 160, so that the relevant data corresponding to each operator can be properly protected. In addition, by centrally storing and / or managing keys through the key queue 160, the processing efficiency can be improved when processing concurrent requests from multiple operators, the time overhead of key generation and retrieval can be reduced, and the overall performance can be improved.
[0134] like Figure 2 As shown, Figure 1 Compared with the embodiment of the present invention, the data protection device 100 further includes an obfuscation parameter buffer 170. The obfuscation parameter buffer 170 may be configured to determine the obfuscation parameter information according to the parameter information of the operator sending the first data plaintext.
[0135] For example, when an operator issues a request (eg, a write request), the obfuscation parameter buffer 170 can quickly retrieve and provide corresponding obfuscation parameters based on the parameter information of the operator.
[0136] As mentioned above, for example, the multiple operators may include different devices or equipment, such as upstream processing devices of the data protection device 100, and the parameter information of the operator may include parameter information corresponding to the upstream processing devices of the data protection device 100, such as the different devices or equipment. For example, the corresponding parameter information may include identity information, etc., which is not limited in the embodiments of the present disclosure.
[0137] For example, multiple operators may also include virtual machines. A virtual machine provides an independent operating environment. Multiple virtual machines can be created on a physical host through virtual machine software. Each virtual machine can be like an independent computer, and the operating systems and applications between them are isolated from each other. Processes in different virtual machines cannot directly access the resources of other virtual machines unless through a network or sharing mechanism. The parameter information of the operator may include virtual machine parameter information.
[0138] For example, the virtual machine parameter information may include information such as the type, configuration, state, runtime environment variables, or virtual machine identification of the virtual machine, which is not limited in the embodiments of the present disclosure.
[0139] For example, the obfuscation parameter buffer 170 may determine the obfuscation parameter information corresponding to the parameter information of the virtual machine according to the parameter information of the virtual machine that sends the first data plaintext.
[0140] In at least one embodiment of the present disclosure, the obfuscation parameter buffer 170 can enable the data protection device 100 to further improve the performance and response speed of the system, and further improve the reliability and timeliness of data processing.
[0141] In some embodiments of the present disclosure, the obfuscation parameter buffer 170 stores a plurality of candidate obfuscation parameter information corresponding to a plurality of operators.
[0142] For example, the obfuscation parameter buffer 170 may also be configured to select obfuscation parameter information from a plurality of candidate obfuscation parameter information according to parameter information of the operator that sends the first data plaintext.
[0143] For example, the obfuscation parameter buffer 170 may be configured to store a plurality of candidate obfuscation parameter information, where the candidate obfuscation parameter information respectively corresponds to different operators.
[0144] For example, the alternative obfuscation parameter information may include a variant of an encryption algorithm, a key generation method, a choice of an obfuscation function or an operation vector, etc., which is not limited in the embodiments of the present disclosure.
[0145] For example, the obfuscation parameter buffer 170 may select corresponding candidate obfuscation parameters as obfuscation parameter information based on corresponding matching logic and according to the degree of association between the parameter information of the operator of the first data plaintext and a plurality of candidate obfuscation parameter information.
[0146] For example, the matching logic may include a lookup table, a decision tree, etc., which is not limited in the embodiments of the present disclosure.
[0147] In at least one embodiment of the present disclosure, the obfuscation parameter buffer 170 enables the data protection device 100 to flexibly respond to security requirements in different scenarios, providing higher security and performance. Through multi-level security and flexibility design, the reliability and timeliness of data processing are further improved.
[0148] For example, in the embodiments of the present disclosure, the key generation module 110, the data encryption module 120, the integrity protection module 130, the obfuscation scrambling module 140, the error correction code generation module 150, the key queue 160 and the obfuscation parameter buffer 170 can be hardware, software, firmware and any feasible combination thereof. For example, the key generation module 110, the data encryption module 120, the integrity protection module 130, the obfuscation scrambling module 140, the error correction code generation module 150, the key queue 160 and the obfuscation parameter buffer 170 can be dedicated or general circuits, chips or devices, etc., or can be a combination of a processor and a memory. The embodiments of the present disclosure do not limit the specific implementation forms of the above-mentioned modules.
[0149] It should be noted that, in the embodiment of the present disclosure, each module of the data protection device 100 may correspond to each step of the data protection method provided by the present disclosure (described below). Figure 1 to Figure 2 The components and structures of the data protection device 100 shown are merely exemplary and non-limiting. The data protection device 100 may further include other components and structures as required.
[0150] Figure 3 A schematic block diagram of a data decryption device provided by at least one embodiment of the present disclosure is shown.
[0151] like Figure 3 As shown, the data decryption device 200 includes a key generation module 210 , an integrity protection module 220 and a data decryption module 230 .
[0152] The key generation module 210 is configured to generate a first key according to the obfuscation parameter information in response to a read request corresponding to the first data ciphertext.
[0153] The integrity protection module 220 is configured to generate decryption verification operation information according to the integrity verification code corresponding to the first data ciphertext and the scrambling key.
[0154] The data decryption module 230 is configured to, in response to the decryption verification operation information, perform a decryption operation on the first data ciphertext according to the first key to generate the first data plaintext, or terminate the decryption operation.
[0155] For example, the first data ciphertext may correspond to the first data ciphertext generated by the aforementioned data protection device 100, and the first data plaintext may correspond to the result obtained by decrypting the aforementioned first data ciphertext, and may be transmitted to the upstream of the data decryption device 200 (e.g., a processor, a DMA controller, or an I / O device, etc.) for processing.
[0156] For example, the read request corresponding to the first data ciphertext may be issued by a first operator among multiple operators.
[0157] For example, the key generation module 210 is configured to respond to a read request corresponding to the first data ciphertext. The specific operation of generating the first key according to the obfuscation parameter information can refer to the related operation of the key generation module 110 generating the first key according to the obfuscation parameter information in the aforementioned embodiment, which will not be repeated here.
[0158] For example, the integrity protection module 220 may receive a first data ciphertext, an integrity check code corresponding to the first data ciphertext, and a scrambling key corresponding to an operator that sends a read request corresponding to the first data ciphertext.
[0159] For example, the integrity protection module 220 can use the same digest algorithm as that used to generate the integrity check code, combined with the first data ciphertext and the scrambling key, to regenerate a digest information, and then compare the regenerated digest information with the received integrity check code. If the two match, it can indicate that the first data ciphertext has not been tampered with, and generate decryption verification operation information indicating "passed"; if the two do not match, it indicates that the first data ciphertext may have been tampered with or damaged, and generate decryption verification operation information indicating "failed". For example, the decryption verification operation information indicating "failed" can be used to indicate the termination of the decryption operation, and the decryption verification operation information indicating "passed" can be used to indicate the start of the decryption operation. For example, the generated decryption verification operation information can be provided to the data decryption module 230 to decide whether to continue the decryption operation.
[0160] For example, the data decryption module 230 can receive the decryption verification operation information provided by the integrity protection module 220, and then determine whether to continue the decryption operation. For example, if the decryption verification operation information indicates "pass", the data decryption module 230 can continue the decryption operation; if the decryption verification operation information indicates "failure", the data decryption module 230 can terminate the decryption operation.
[0161] For example, the process in which the data decryption module 230 decrypts the first data ciphertext according to the first key to generate the first data plaintext can be understood as the reverse operation of the data encryption module 120 in the aforementioned data protection device 100 generating the first data ciphertext according to the first key and the first data plaintext.
[0162] In at least one embodiment of the present disclosure, the data decryption device 200 improves the security and integrity of data ciphertext during decryption, as well as the reliability and timeliness of data decryption processing, through the collaborative work of the key generation module 210, the integrity protection module 220 and the data decryption module 230.
[0163] In some embodiments of the present disclosure, the obfuscation parameter information received by the key generation module 210 may be generated by an obfuscation parameter buffer 270 (not shown in the figure), and the obfuscation parameter buffer 270 may be configured to select obfuscation parameter information from a plurality of alternative obfuscation parameter information based on parameter information of an operator corresponding to read command address information carrying a command to read the first data ciphertext.
[0164] For example, the specific operation of the obfuscation parameter buffer 270 selecting obfuscation parameter information from multiple alternative obfuscation parameter information according to the parameter information of the operator corresponding to the read command address information carrying the command to read the first data ciphertext can also refer to the relevant description of the obfuscation parameter buffer 170 determining the obfuscation parameter information in the aforementioned embodiment, which will not be repeated here.
[0165] In some embodiments of the present disclosure, the obfuscation parameter information received by the key generation module 210 can also be selected by the obfuscation parameter buffer 170 in the aforementioned data protection device 100 from multiple alternative obfuscation parameter information based on parameter information of the operator corresponding to the read command address information carrying the command to read the first data ciphertext. For example, the data protection device 100 and the corresponding data decryption device 200 can share the same obfuscation parameter buffer, thereby further saving circuit area and reducing overhead.
[0166] In some embodiments of the present disclosure, the key generation module 210 may also be configured to generate enable bit information.
[0167] The integrity protection module 220 may also be configured to generate an expected value of the integrity check code according to the scrambling key in response to an enabling operation of the enable bit information, or to assign the expected value of the integrity check code to an invalid value otherwise.
[0168] The integrity protection module 220 may also be configured to generate decryption verification operation information according to the integrity verification code and the expected value of the integrity verification code.
[0169] For example, the enable bit information here may correspond to the operator that sends the read request corresponding to the first data ciphertext.
[0170] For example, the specific operation of the key generation module 210 generating the enable bit information may refer to the related operation of the key generation module 110 generating the enable bit information in the aforementioned embodiment, which will not be repeated here.
[0171] For example, the integrity protection module 220 may be configured to determine whether to generate and verify the integrity check code according to the enable operation of the enable bit information. If the enable bit information is a valid value (e.g., 1), the integrity protection module 220 may generate an expected value of the integrity check code according to the scrambling key; if the enable bit information is an invalid value (e.g., all zeros), the integrity protection module 220 may directly assign the expected value of the integrity check code to an invalid value (e.g., all zeros).
[0172] For example, the specific operation of the integrity protection module 220 generating the expected value of the integrity check code according to the scrambling key can refer to the related operation of the integrity protection module 130 generating the integrity check code according to the scrambling key in the aforementioned embodiment, which will not be repeated here.
[0173] For example, the integrity protection module 220 may further generate decryption verification operation information according to the generated expected value of the integrity verification code and the received integrity verification code to determine whether to continue the decryption operation.
[0174] For example, the integrity protection module 220 may compare the generated integrity check code expected value with the received integrity check code. If the two match, it means that the first data ciphertext has not been tampered with, and a decryption check operation information indicating "pass" is generated; if the two do not match, it means that the first data ciphertext may have been tampered with or damaged, and a decryption check operation information indicating "failure" is generated. For example, the decryption check operation information generated by the integrity protection module 220 may be provided to the data decryption module 230 to determine whether to continue the decryption operation.
[0175] In at least one embodiment of the present disclosure, by introducing an enable bit information mechanism, the data decryption device 200 can not only have powerful encryption and integrity protection functions, but also be able to flexibly respond to security requirements in different scenarios, provide higher security and performance, and further improve the reliability and timeliness of data decryption processing.
[0176] Figure 4 A schematic block diagram of another data decryption device provided by at least one embodiment of the present disclosure is shown.
[0177] like Figure 4 As shown, Figure 3 Compared with the embodiment of the present invention, the data decryption device 200 further includes a confusion scrambling module 240.
[0178] The obfuscated scrambling module 240 may be configured to obtain a scrambling key according to the first key and command address information included in the read request.
[0179] The integrity protection module 220 may also be configured to generate corresponding summary information as an expected value of the integrity check code according to the scrambling key and the first data ciphertext.
[0180] For example, the specific operation of the obfuscated scrambling module 240 obtaining the scrambling key according to the first key and the command address information included in the read request can refer to the related operation of the obfuscated scrambling module 140 obtaining the scrambling key according to the first key and the command address information included in the write request in the aforementioned embodiment, which will not be repeated here.
[0181] For example, the integrity protection module 220 may use a digest algorithm to generate corresponding digest information as an expected value of the integrity check code according to the scrambling key and the first data ciphertext.
[0182] For example, the integrity protection module 220 may use the same digest algorithm as the integrity protection module 130 in the aforementioned embodiment to generate the integrity check code.
[0183] For example, the specific operation of the integrity protection module 220 generating the corresponding summary information as the expected value of the integrity check code according to the scrambling key and the first data ciphertext may also refer to the related operation of the integrity protection module 130 generating the corresponding summary information as the integrity check code according to the scrambling key and the first data ciphertext in the aforementioned embodiment, which will not be repeated here.
[0184] In some embodiments of the present disclosure, the integrity protection module 220 may also be configured to generate first decryption verification operation information in response to a mismatch between the integrity check code and the expected value of the integrity check code, and to generate second decryption verification operation information in response to a match between the integrity check code and the expected value of the integrity check code.
[0185] For example, the integrity protection module 220 may compare the expected value of the integrity check code generated above with the received integrity check code, and generate two different types of decryption check operation information (first decryption check operation information and second decryption check operation information) based on the comparison result.
[0186] For example, the first decryption verification operation information may be used to indicate the termination of the decryption operation, and the second decryption verification operation information may be used to indicate the start of the decryption operation.
[0187] For example, the integrity protection module 220 may compare the received integrity check code with the generated integrity check code expected value byte by byte to determine the difference between the two. If the two are consistent, it means that the first data ciphertext has not been tampered with, and the second decryption verification operation information is generated to indicate the start of the decryption operation; if there is any difference between the two, it means that the first data ciphertext may have been tampered with or damaged, and the first decryption verification operation information is generated to indicate the termination of the decryption operation.
[0188] For example, the integrity protection module 220 may provide the generated first decryption verification operation information or the second decryption verification operation information to the data decryption module 230 to determine whether to continue the decryption operation.
[0189] In at least one embodiment of the present disclosure, corresponding decryption verification operation information is generated based on the matching of the integrity check code and the expected value of the integrity check code, so that the data decryption device 200 not only has powerful encryption and integrity protection functions, but also can flexibly respond to security requirements in different scenarios and provide higher security and performance.
[0190] like Figure 4 As shown, Figure 3 Compared with the embodiment of the present invention, the data decryption device 200 further includes an error correction code verification module 250. The error correction code verification module 250 may be configured to perform an error correction operation on the first data ciphertext and the integrity check code according to the error correction check code corresponding to the first data ciphertext and the integrity check code.
[0191] For example, the error correction code verification module 250 can distribute the error correction operation on the first data ciphertext and the integrity check code according to the error correction check code corresponding to the first data ciphertext and the error correction check code corresponding to the integrity check code. Here, the integrity check code is the integrity check code corresponding to the first data ciphertext.
[0192] For example, the error correction check code may represent redundant information used to detect and correct errors in the first data ciphertext and the integrity check code.
[0193] For example, the error correction check code may be the error correction check code corresponding to the first data ciphertext generated by the error correction code generation module 150 in the aforementioned embodiment.
[0194] For example, the error correction code verification module 250 uses the same error correction algorithm as that used by the error correction code generation module 150 in the aforementioned embodiment to perform error correction operations on the first data ciphertext and the integrity check code.
[0195] For example, the error correction code verification module 250 can determine whether the errors in the first data ciphertext and / or the integrity check code are within the correction range of the error correction algorithm. For errors beyond the correction range, the error correction code verification module 250 can mark them as uncorrectable.
[0196] For example, the error correction code verification module 250 may generate corresponding decryption verification operation information according to the error correction results of the first data ciphertext and the integrity check code to determine whether to continue the decryption operation.
[0197] For example, if the first data ciphertext and / or the integrity check code has errors but cannot be corrected, the error correction code verification module 250 may generate first decryption check operation information and terminate subsequent decryption operations.
[0198] For example, if there are errors in the first data ciphertext and / or integrity check code and the error correction operation is successful, the error correction code verification module 250 can generate second decryption verification operation information and pass the corrected first data ciphertext and integrity check code to subsequent modules.
[0199] In at least one embodiment of the present disclosure, the error correction code verification module 250 can enable the data decryption device 200 to detect and correct errors that may occur during data transmission or storage, thereby providing higher security and reliability.
[0200] In some embodiments of the present disclosure, the error correction code verification module 250 may also be configured to generate a time stamp corresponding to the first data ciphertext.
[0201] For example, the time identifier may be used to identify the time consistency between the data decryption module 230 and the integrity protection module 220 .
[0202] For example, the error correction code verification module 250 may generate a time identifier corresponding to the first data ciphertext, and provide the time identifier to subsequent modules for time consistency verification.
[0203] For example, the error correction code verification module 250 can generate a time identifier corresponding to the first data ciphertext according to the timestamp of the first data ciphertext received by the data decryption device 200. Here, the representation form of the time identifier can be the same as the time identifier generated in the data protection device 100 in the aforementioned embodiment, and the embodiments of the present disclosure are not limited to this.
[0204] For example, the time identifier may be provided to the data decryption module 230 and / or the integrity protection module 220 for time consistency verification.
[0205] For example, the integrity protection module 220 may generate a corresponding integrity check code expected value according to the scrambling key, the first data ciphertext and the time identifier.
[0206] For example, the data decryption module 230 can verify the time consistency of the decryption operation based on the received time identifier. If the time identifier does not meet expectations (for example, time rollback or future time, etc.), the data decryption module 230 can terminate the decryption operation to prevent time rollback attacks.
[0207] In at least one embodiment of the present disclosure, the time identification generation mechanism can enable the data decryption device 200 to further improve the time consistency of the data, prevent time rollback attacks or other timestamp-based tampering behaviors, and further improve the reliability and timeliness of data decryption processing.
[0208] like Figure 4 As shown, Figure 3 Compared with the embodiment of the present invention, the data decryption device 200 further includes a key queue 260. The key queue 260 may be configured to store a plurality of obfuscated scrambling keys respectively corresponding to a plurality of operators, and a plurality of enable bit information respectively corresponding to a plurality of operators.
[0209] For example, the specific situation of the key queue 260 storing multiple obfuscated scrambling keys corresponding to multiple operators and multiple enable bit information corresponding to multiple operators can refer to the relevant description of the key queue 260 storing multiple obfuscated scrambling keys corresponding to multiple operators and multiple enable bit information corresponding to multiple operators in the aforementioned embodiment, which will not be repeated here.
[0210] For example, in the embodiment of the present disclosure, the key generation module 210, the integrity protection module 220, the data decryption module 230, the obfuscation scrambling module 240, the error correction code verification module 250, the key queue 260 and the obfuscation parameter buffer 270 can be hardware, software, firmware and any feasible combination thereof. For example, the key generation module 210, the integrity protection module 220, the data decryption module 230, the obfuscation scrambling module 240, the error correction code verification module 250, the key queue 260 and the obfuscation parameter buffer 270 can be a dedicated or general circuit, chip or device, etc., or a combination of a processor and a memory. The embodiment of the present disclosure does not limit the specific implementation form of each of the above modules.
[0211] It should be noted that, in the embodiment of the present disclosure, each module of the data decryption device 200 may correspond to each step of the data decryption method (described below) provided by the present disclosure. Figure 3 to Figure 4 The components and structures of the data decryption device 200 shown are merely exemplary and non-limiting. The data decryption device 200 may further include other components and structures as required.
[0212] Figure 5 A schematic block diagram of an application of a data protection device provided by at least one embodiment of the present disclosure is shown.
[0213] like Figure 5 As shown, the data protection device 300 includes a key generation module 310, a data encryption module 320, an integrity protection module 330, an obfuscation scrambling module 340, an error correction code generation module 350, a key queue 360 and an obfuscation parameter buffer 370.
[0214] For example, the obfuscation parameter buffer 370 stores a plurality of candidate obfuscation parameter information corresponding to a plurality of operators.
[0215] For example, the obfuscation parameter buffer 370 may be configured to select obfuscation parameter information from a plurality of candidate obfuscation parameter information according to parameter information of an operator that sends the first data plaintext.
[0216] For example, the key generation module 310 may be configured to generate a first key according to obfuscation parameter information and a second key.
[0217] For example, the data encryption module 320 may be configured to generate a first data ciphertext according to a first key and a first data plaintext.
[0218] For example, the data encryption module 120 may also be configured to generate a time stamp corresponding to the first data ciphertext according to the first key and the first data plaintext.
[0219] For example, the obfuscated scrambling module 340 may be configured to obtain a scrambling key according to the first key and command address information included in the write request.
[0220] For example, the key generation module 310 may also be configured to generate enable bit information.
[0221] For example, the key queue 360 may be configured to store a plurality of obfuscated scrambling keys respectively corresponding to a plurality of operators, and a plurality of enable bit information respectively corresponding to the plurality of operators.
[0222] For example, the integrity protection module 330 may be configured to generate corresponding summary information as an integrity check code according to the first data ciphertext, the scrambling key, and the time mark corresponding to the first data ciphertext in response to the enabling operation of the enable bit information.
[0223] For example, the error correction code generation module 350 may be configured to generate an error correction check code corresponding to the first data ciphertext and the integrity check code.
[0224] For example, in the embodiment of the present disclosure, the key generation module 310, the data encryption module 320, the integrity protection module 330, the obfuscation scrambling module 340, the error correction code generation module 350, the key queue 360 and the obfuscation parameter buffer 370 can be hardware, software, firmware and any feasible combination thereof. For example, the key generation module 310, the data encryption module 320, the integrity protection module 330, the obfuscation scrambling module 340, the error correction code generation module 350, the key queue 360 and the obfuscation parameter buffer 370 can be a dedicated or general circuit, chip or device, etc., or a combination of a processor and a memory. The embodiment of the present disclosure does not limit the specific implementation form of each of the above modules.
[0225] It should be noted that, in the embodiment of the present disclosure, each module of the data protection device 300 may correspond to each step of the data protection method (described below) provided by the present disclosure. Figure 5 The components and structures of the data protection device 300 shown are merely exemplary and non-limiting. The data protection device 300 may further include other components and structures as required.
[0226] In the embodiments of the present disclosure, the operations, functions or beneficial effects performed by the above modules of the data protection device 300 may be described in detail in the description of the data protection device provided in any embodiment of the present disclosure, and will not be repeated here.
[0227] Figure 6 A schematic block diagram of an application of a data decryption device provided by at least one embodiment of the present disclosure is shown.
[0228] like Figure 6 As shown, the data decryption device 400 includes a key generation module 410, an integrity protection module 420, a data decryption module 430, an obfuscation scrambling module 440, an error correction code verification module 450, a key queue 460 and an obfuscation parameter buffer 470.
[0229] For example, the key generation module 410 is configured to generate a first key according to the obfuscation parameter information and the second key in response to a read request corresponding to the first data ciphertext.
[0230] For example, the obfuscation parameter buffer 470 may be configured to select obfuscation parameter information from a plurality of candidate obfuscation parameter information according to parameter information of an operator corresponding to the read command address information that sends a command carrying a command to read the first data ciphertext.
[0231] For example, the obfuscation parameter information received by the key generation module 410 may also be provided by the obfuscation parameter buffer 370 in the aforementioned data protection device 300. For example, the data protection device 300 and the data decryption device 400 may share the same obfuscation parameter buffer, thereby further saving circuit area and reducing overhead.
[0232] For example, the obfuscated scrambling module 440 may be configured to obtain a scrambling key according to the first key and the read command address information included in the read request.
[0233] For example, the key queue 460 may be configured to store a plurality of obfuscated scrambling keys respectively corresponding to a plurality of operators, and a plurality of enable bit information respectively corresponding to the plurality of operators.
[0234] For example, the error correction code verification module 450 may be configured to perform an error correction operation on the first data ciphertext and the integrity check code according to the error correction check code corresponding to the first data ciphertext and the integrity check code, and generate corresponding decryption check operation information.
[0235] For example, the error correction code verification module 450 may also be configured to generate corresponding decryption verification operation information (eg, first decryption verification operation information) in response to the first data ciphertext and the integrity check code having errors but being uncorrectable.
[0236] For example, the error correction code verification module 450 may also be configured to generate corresponding decryption verification operation information (eg, second decryption verification operation information) in response to the first data ciphertext and the integrity check code having no errors or completing the error correction operation.
[0237] For example, the error correction code verification module 450 may also be configured to generate a time stamp corresponding to the first data ciphertext.
[0238] For example, the integrity protection module 420 may be configured to generate corresponding summary information as an expected value of the integrity check code according to the scrambling key, the first data ciphertext, and the time identifier.
[0239] For example, the integrity protection module 420 may also be configured to generate corresponding decryption verification operation information (e.g., first decryption verification operation information) in response to a mismatch between the integrity check code and the expected value of the integrity check code, and to generate corresponding decryption verification operation information (e.g., second decryption verification operation information) in response to a match between the integrity check code and the expected value of the integrity check code.
[0240] For example, the data decryption module 430 may be configured to, in response to the decryption verification operation information, perform a decryption operation on the first data ciphertext according to the first key to generate the first data plaintext, or terminate the decryption operation.
[0241] For example, in the embodiment of the present disclosure, the key generation module 410, the integrity protection module 420, the data decryption module 430, the obfuscation scrambling module 440, the error correction code verification module 450, the key queue 460 and the obfuscation parameter buffer 470 can be hardware, software, firmware and any feasible combination thereof. For example, the key generation module 410, the integrity protection module 420, the data decryption module 430, the obfuscation scrambling module 440, the error correction code verification module 450, the key queue 460 and the obfuscation parameter buffer 470 can be a dedicated or general circuit, chip or device, etc., or a combination of a processor and a memory. The embodiment of the present disclosure does not limit the specific implementation form of each of the above modules.
[0242] It should be noted that, in the embodiment of the present disclosure, each module of the data decryption device 400 may correspond to each step of the data decryption method (described below) provided by the present disclosure. Figure 6 The components and structures of the data decryption device 400 shown are merely exemplary and non-limiting. The data decryption device 400 may further include other components and structures as required.
[0243] In the embodiment of the present disclosure, the operations, functions or beneficial effects performed by the above modules of the data decryption device 400 may be described in detail in any embodiment of the present disclosure, and will not be repeated here.
[0244] Figure 7 A flow chart of a data protection method provided by at least one embodiment of the present disclosure is shown.
[0245] like Figure 7As shown, the data protection method includes steps S500-S520. The data protection method can be applied to the data protection device provided by any embodiment of the present disclosure.
[0246] Step S500: In response to a write request corresponding to the first data plaintext, a first key is generated according to obfuscation parameter information.
[0247] Step S510: Generate a first data ciphertext according to the first key and the first data plaintext.
[0248] Step S520: Generate an integrity check code for the first data ciphertext according to the scrambling key.
[0249] In some embodiments of the present disclosure, the data protection method further includes step S530.
[0250] Step S530: Generate a time mark corresponding to the first data ciphertext according to the first key and the first data plaintext. The time mark can be used to identify the time consistency of the data encryption module and the integrity protection module.
[0251] In some embodiments of the present disclosure, the data protection method further includes step S540.
[0252] Step S540: The key generation module generates enable bit information.
[0253] In some embodiments of the present disclosure, step S520 may further include: in response to an enabling operation of the enable bit information, generating an integrity check code for the first data ciphertext according to the scrambling key, otherwise assigning the integrity check code to an invalid value.
[0254] In some embodiments of the present disclosure, the data protection method further includes step S550.
[0255] Step S550: Obtain a scrambling key according to the first key and the command address information included in the write request.
[0256] Step S520 may further include: generating corresponding summary information as an integrity check code according to the first data ciphertext and the scrambling key.
[0257] In some embodiments of the present disclosure, the data protection method also includes step S560.
[0258] Step S560: Generate an error correction check code corresponding to the first data ciphertext and the integrity check code.
[0259] In some embodiments of the present disclosure, the data protection method further includes storing, by a key queue, a plurality of obfuscated scrambling keys respectively corresponding to a plurality of operating parties, and a plurality of enable bit information respectively corresponding to the plurality of operating parties.
[0260] In some embodiments of the present disclosure, a first operator among a plurality of operators issues a write request.
[0261] In some embodiments of the present disclosure, the data protection method also includes step S570.
[0262] Step S570: Determine obfuscated parameter information according to parameter information of the operator who sends the first data plaintext.
[0263] In some embodiments of the present disclosure, step S570 may further include: selecting obfuscation parameter information from a plurality of candidate obfuscation parameter information according to parameter information of an operator sending the first data plaintext.
[0264] It should be noted that, for the relevant contents of the functions or beneficial effects of each step in the data protection method provided in any embodiment of the present disclosure, for example, reference can be made to the relevant description of the data protection device provided in any embodiment of the present disclosure, and will not be repeated here.
[0265] Figure 8 A flow chart of a data decryption method provided by at least one embodiment of the present disclosure is shown.
[0266] like Figure 8 As shown, the data decryption method includes steps S600-S620. The data decryption method can be applied to the data decryption device provided by any embodiment of the present disclosure.
[0267] Step S600: In response to a read request corresponding to a first data ciphertext, a first key is generated according to obfuscation parameter information.
[0268] Step S610: Generate decryption verification operation information according to the integrity check code and the scrambling key corresponding to the first data ciphertext.
[0269] Step S620: In response to the decryption verification operation information, perform a decryption operation on the first data ciphertext according to the first key to generate a first data plaintext, or terminate the decryption operation.
[0270] In some embodiments of the present disclosure, the data decryption method further includes step S630.
[0271] Step S630: The key generation module generates enable bit information.
[0272] Step S610 may further include: in response to the enable operation of the enable bit information, generating an expected value of the integrity check code according to the scrambling key, otherwise assigning the expected value of the integrity check code to an invalid value, and generating decryption verification operation information according to the integrity check code and the expected value of the integrity check code.
[0273] In some embodiments of the present disclosure, step S610 may further include: in response to the integrity check code and the expected value of the integrity check code not matching, generating first decryption check operation information, and in response to the integrity check code and the expected value of the integrity check code matching, generating second decryption check operation information. The first decryption check operation information is used to indicate the termination of the decryption operation, and the second decryption check operation information is used to indicate the start of the decryption operation.
[0274] In some embodiments of the present disclosure, the data decryption method further includes step S640.
[0275] Step S640: performing an error correction operation on the first data ciphertext and the integrity check code according to the error correction check code corresponding to the first data ciphertext and the integrity check code.
[0276] In some embodiments of the present disclosure, step S640 may further include: in response to the first data ciphertext and the integrity check code having an error but not being correctable, generating first decryption check operation information, wherein the first decryption check operation information is used to indicate the termination of the decryption operation.
[0277] In some embodiments of the present disclosure, the data decryption method further includes step S650.
[0278] Step S650: The error correction code verification module generates a time mark corresponding to the first data ciphertext. The time mark can be used to identify the time consistency of the data decryption module and the integrity protection module.
[0279] In some embodiments of the present disclosure, the data decryption method further includes storing, by a key queue, a plurality of obfuscated scrambling keys respectively corresponding to a plurality of operators, and a plurality of enable bit information respectively corresponding to the plurality of operators.
[0280] In some embodiments of the present disclosure, a first operator among a plurality of operators issues a read request.
[0281] It should be noted that the specific operations, functions or beneficial effects of each step in the data decryption method provided in any embodiment of the present disclosure can be referred to the relevant description of the data decryption device provided in any embodiment of the present disclosure, and will not be repeated here.
[0282] Fig. 9 A schematic block diagram of an electronic device provided by at least one embodiment of the present disclosure is shown.
[0283] At least some embodiments of the present disclosure also provide an electronic device, such as Fig. 9As shown, the electronic device 700 includes a data protection device and / or a data decryption device provided by any embodiment of the present disclosure. For example, the data protection device and / or the data decryption device can be implemented as a sender and / or receiver of instructions / data, for example, it can be used in internal memory or external memory.
[0284] For example, the processor 701 may be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and / or program execution capabilities; for example, the central processing unit (CPU) may be RISC, X86, or ARM architecture, etc.
[0285] The electronic device 700 in the embodiment of the present disclosure may include mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as any devices such as digital TVs, desktop computers, servers, etc., and may also be a combination of any data processing devices and hardware, which is not limited by the embodiments of the present disclosure.
[0286] Fig. 9 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0287] For example, Fig. 9 As shown, in some examples, the processor 701 can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage device 708 to the random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system are also stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other through the communication channel 704. The input / output (I / O) interface 705 is also connected to the communication channel 704. For example, the storage controller of the RAM 703 for the memory includes the above-mentioned data protection device and / or data decryption device.
[0288] For example, the following components may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc., for example, a storage controller of the storage device 708 includes the above-mentioned data protection device and / or data decryption device; a communication device 709 including, for example, a network interface card such as a LAN card, a modem, etc. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or wired to exchange data, and perform communication processing via a network such as the Internet. The drive 710 is also connected to the I / O interface 705 as needed. Removable media 711, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 710 as needed, so that the computer program read therefrom can be installed into the storage device 708 as needed. Although Fig. 9 The electronic device 700 is shown to include various devices, but it should be understood that it is not required to implement or include all the devices shown. More or fewer devices may be implemented or included instead.
[0289] For example, the electronic device 700 may further include a peripheral interface (not shown in the figure), etc. The peripheral interface may be various types of interfaces, such as a USB interface, a lightning interface, etc. The communication device 709 may communicate with a network and other devices through wireless communication, such as the Internet, an intranet and / or a wireless network such as a cellular phone network, a wireless local area network (LAN) and / or a metropolitan area network (MAN). Wireless communication may use any of a variety of communication standards, protocols, and techniques, including, but not limited to, Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wi-Fi (e.g., based on IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n standards), Voice over Internet Protocol (VoIP), Wi-MAX, protocols for email, instant messaging, and / or Short Message Service (SMS), or any other suitable communication protocol.
[0290] It should be noted that in the embodiments of the present disclosure, the specific functions and technical effects of the electronic device 700 can be referred to the relevant descriptions of the data protection device and method, and the data decryption device and method in the embodiments of the present disclosure, and will not be repeated here.
[0291] Fig.10A schematic block diagram of another electronic device provided by at least one embodiment of the present disclosure is shown.
[0292] At least one embodiment of the present disclosure further provides an electronic device, such as Fig.10 As shown, the electronic device 800 includes at least one processor 810 and at least one memory 820 .
[0293] For example, the memory 820 may be used to store computer-readable instructions (e.g., one or more computer program modules) in a non-temporary manner. The processor 810 may be used to execute the computer-readable instructions, and when the computer-readable instructions are executed by the processor 810, one or more steps in the data protection method and / or data decryption method described above may be executed. The memory 820 and the processor 810 may be interconnected through a bus or link, in a wired, wireless, and / or other form of communication medium, etc., and the embodiments of the present disclosure are not limited to this.
[0294] For example, the processor 810 may be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be a RISC, X86, or ARM architecture, etc. The processor 810 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 800 to perform desired functions.
[0295] For example, the memory 820 may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 810 may run one or more computer program modules to implement various functions of the electronic device 800. Various applications and various data, as well as various data used and / or generated by the application, etc. may also be stored in the computer-readable storage medium.
[0296] At least one embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, which is used to non-temporarily store computer-readable instructions, and when the computer-readable instructions are executed by a computer, the above-mentioned data protection method and / or data decryption method can be implemented.
[0297] Fig.11A schematic diagram of a computer-readable storage medium provided for some embodiments of the present disclosure.
[0298] like Fig.11 As shown, the computer-readable storage medium 900 is used to store computer-readable instructions 910. For example, when the computer-readable instructions 910 are executed by a computer, one or more steps in the data protection method and / or data decryption method described above can be performed.
[0299] For example, the computer-readable storage medium 900 may be applied to the electronic device 700 or the electronic device 800. For example, the relevant description of the non-volatile computer-readable storage medium 900 may also refer to Fig. 9 The storage device 708 in the electronic device 700 is shown as well as Fig.10 The corresponding description of the memory 820 in the electronic device 800 is shown and will not be repeated here.
[0300] It should be noted that, in the embodiments of the present disclosure, the specific functions and technical effects of the computer-readable storage medium 900 can be referred to, for example, the above descriptions of the data protection device and method, and the data decryption device and method, and will not be repeated here.
[0301] There are a few points to note:
[0302] (1) The drawings of the embodiments of the present disclosure only relate to the structures involved in the embodiments of the present disclosure. Other structures may refer to the general design.
[0303] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to obtain new embodiments.
[0304] The above description is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A data protection device, comprising: A key generation module is configured to generate a first key according to the obfuscation parameter information in response to a write request corresponding to the first data plaintext; a data encryption module, configured to generate a first data ciphertext according to the first key and the first data plaintext; as well as The integrity protection module is configured to generate an integrity check code for the first data ciphertext according to the scrambling key.
2. The data protection device according to claim 1, wherein: The data encryption module is further configured to generate a time stamp corresponding to the first data ciphertext according to the first key and the first data plaintext, The time identifier is used to identify the time consistency between the data encryption module and the integrity protection module.
3. The data protection device according to claim 1, wherein: The key generation module is further configured to generate enable bit information, and The integrity protection module is further configured to, in response to an enabling operation of the enable bit information, generate the integrity check code for the first data ciphertext according to the scrambling key, otherwise assign the integrity check code to an invalid value.
4. The data protection device according to claim 3, further comprising: a confusion scrambling module, configured to obtain the scrambling key according to the first key and the command address information included in the write request; The integrity protection module is further configured to generate corresponding summary information as the integrity check code according to the first data ciphertext and the scrambling key.
5. The data protection device according to claim 4, further comprising: The error correction code generation module is configured to generate an error correction check code corresponding to the first data ciphertext and the integrity check code.
6. The data protection device according to claim 3, further comprising: The key queue is configured to store a plurality of obfuscated scrambling keys respectively corresponding to a plurality of operators and a plurality of enable bit information respectively corresponding to the plurality of operators, wherein a first operator among the plurality of operators issues the write request.
7. The data protection device according to any one of claims 1 to 6, further comprising: The obfuscation parameter buffer is configured to determine the obfuscation parameter information according to parameter information of the operator who sends the first data plaintext.
8. The data protection device according to claim 7, wherein: The obfuscation parameter buffer stores a plurality of candidate obfuscation parameter information corresponding to a plurality of operators, The obfuscation parameter buffer is further configured to select obfuscation parameter information from the plurality of candidate obfuscation parameter information according to parameter information of an operator sending the first data plaintext.
9. A data decryption device, comprising: A key generation module is configured to generate a first key according to the obfuscation parameter information in response to a read request corresponding to the first data ciphertext; an integrity protection module, configured to generate decryption verification operation information according to the integrity check code and the scrambling key corresponding to the first data ciphertext; as well as The data decryption module is configured to, in response to the decryption verification operation information, perform a decryption operation on the first data ciphertext according to the first key to generate a first data plaintext, or terminate the decryption operation.
10. The data decryption device according to claim 9, wherein: The key generation module is further configured to generate enable bit information; and The integrity protection module is further configured to, in response to an enabling operation of the enable bit information, generate an expected value of the integrity check code according to the scrambling key, otherwise assign the expected value of the integrity check code to an invalid value, and The decryption verification operation information is generated according to the integrity verification code and the expected value of the integrity verification code.
11. The data decryption device according to claim 10, further comprising: A confusion scrambling module, configured to obtain the scrambling key according to the first key and the command address information included in the read request; in The integrity protection module is further configured to generate corresponding summary information as the expected value of the integrity check code according to the scrambling key and the first data ciphertext.
12. The data decryption device according to claim 10, wherein: The integrity protection module is further configured to, in response to the integrity check code not matching the expected value of the integrity check code, generate first decryption verification operation information, and, in response to the integrity check code matching the expected value of the integrity check code, generate second decryption verification operation information. The first decryption verification operation information is used to indicate the termination of the decryption operation, and the second decryption verification operation information is used to indicate the start of the decryption operation.
13. The data decryption device according to claim 9, further comprising: The error correction code verification module is configured to perform an error correction operation on the first data ciphertext and the integrity check code according to the error correction check code corresponding to the first data ciphertext and the integrity check code.
14. The data decryption device according to claim 13, wherein: The error correction code verification module is further configured to generate first decryption verification operation information in response to the first data ciphertext and the integrity check code having errors but being uncorrectable, wherein the first decryption verification operation information is used to indicate termination of the decryption operation.
15. The data decryption device according to claim 13, wherein: The error correction code verification module is further configured to generate a time mark corresponding to the first data ciphertext, The time identifier is used to identify the time consistency between the data decryption module and the integrity protection module.
16. The data decryption device according to any one of claims 9 to 15, further comprising: A key queue is configured to store a plurality of obfuscated scrambling keys corresponding to a plurality of operators respectively, and a plurality of enable bit information corresponding to the plurality of operators respectively, The first operator among the multiple operators issues the read request.
17. A data protection method, comprising: In response to a write request corresponding to the first data plaintext, generating a first key according to the obfuscation parameter information; Generate a first data ciphertext according to the first key and the first data plaintext; as well as Generate an integrity check code for the first data ciphertext according to the scrambling key.
18. A data decryption method, comprising: In response to a read request corresponding to the first data ciphertext, generating a first key according to the obfuscation parameter information; Generate decryption verification operation information according to the integrity check code and the scrambling key corresponding to the first data ciphertext; as well as In response to the decryption verification operation information, a decryption operation is performed on the first data ciphertext according to the first key to generate a first data plaintext, or the decryption operation is terminated.
19. An electronic device, comprising the data protection device according to any one of claims 1 to 8 and / or the data decryption device according to any one of claims 9 to 16.
20. An electronic device, comprising: processor; as well as A memory, wherein the memory stores at least one computer program, and when the at least one computer program is executed by the processor, the data protection method of claim 17 and / or the data decryption method of claim 18 are implemented.
21. A non-transitory computer-readable storage medium for non-temporarily storing computer-readable instructions, which, when executed by a computer, implements the data protection method of claim 17 and / or the data decryption method of claim 18.