Data decryption system and data decryption method
By overlapping the operations of the address channel and the data channel in the data decryption system, the problem in the existing technology that the decoding engine waits for the external storage device to read data is solved, efficient data decryption is achieved, decryption efficiency is improved, and data integrity is taken into account .
Patent Information
- Application Number
- CN202010216504.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-25
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-03-25
AI Technical Summary
The existing technology needs to wait for the external storage device to read the data during the decoding process, causing the decoding engine to waste time and making it difficult to balance data integrity and processing performance.
A data decryption system is designed, including an address check circuit, an encryption and decryption processor, and an arithmetic circuit. By calculating the decryption key while data is read from the storage device, the first period overlaps with the second period to ensure timely data decryption. sex.
By synchronously calculating the decryption key, the time waiting for the storage device to be read is reduced, the efficiency of data decryption is improved, the idle time is reduced, and the integrity of the data and processing efficiency are taken into account.
Smart Images

Figure CN113449311B
Abstract
Description
Technical Field
[0001] The present invention relates to a data system and method, and more particularly to a data decryption system and method. Background Art
[0002] The decoding engine of the prior art needs a period of time to wait for the external storage device to read the data during the process of processing the decrypted data. The decoding engine needs to calculate the key used to decrypt the data after obtaining the returned data. Such a procedure causes the decoding engine to waste idle time waiting for the external storage device to read the data.
[0003] Therefore, how to simultaneously achieve both data integrity and processing efficiency is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The invention summary is intended to provide a simplified summary of the present disclosure so that readers can have a basic understanding of the present disclosure. This invention summary is not a complete overview of the present disclosure, and it is not intended to point out the important / critical components of the embodiments of the present disclosure or to define the scope of the present disclosure.
[0005] According to one embodiment of the present invention, a data decryption system is disclosed, comprising an address check circuit, an encryption / decryption processor, and an operation circuit. The address check circuit is configured to receive an address through an address channel. The operation circuit is coupled to the encryption / decryption processor, wherein the operation circuit is configured to receive read data indicated by the address from a storage device through a data channel during a first period; wherein the encryption / decryption processor calculates a second key according to a first key and the address during a second period, and the second key is used to decrypt the read data. wherein the first period overlaps with the second period.
[0006] According to another embodiment, a data decryption method is disclosed, comprising the following steps: transmitting an address to an address checking circuit and a storage device via an address channel; receiving read data indicated by the address from the storage device via a data channel during a first period; and completing calculation of a second key based on a first key and the address during a second period, wherein the first period overlaps with the second period. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The following detailed description, when read in conjunction with the accompanying drawings, will facilitate a better understanding of the embodiments of the present disclosure. It should be noted that the features in the drawings are not necessarily drawn to scale, based on the needs of practical description. In fact, the size of each feature may be arbitrarily increased or decreased for the purpose of clarity of discussion.
[0008] Figure 1 A functional block diagram of a data decryption system according to some embodiments of the present invention is shown.
[0009] Figure 2 The figure shows the time sequence of data processing by the data decryption system according to some embodiments of the present case.
[0010] Figure 3 A flow chart of a data decoding method according to some embodiments of the present invention is shown.
[0011] Figures 4 to 6 A schematic diagram showing a data decoding method according to some embodiments of the present invention applicable to a hybrid storage device. DETAILED DESCRIPTION
[0012] The following disclosure provides many different embodiments to implement the different features of the present invention. The following describes embodiments of components and arrangements to simplify the present invention. Of course, these embodiments are exemplary only and are not intended to be restrictive. For example, the terms "first" and "second" used in the present invention to describe components are only used to distinguish between the same or similar components or operations. The terms are not used to limit the technical components of the present invention, nor are they used to limit the order or sequence of operations. In addition, the present invention may repeat component symbols and / or letters in each embodiment, and the same technical terms may use the same and / or corresponding component symbols in each embodiment. This repetition is for the purpose of simplicity and clarity, and does not itself indicate the relationship between the various embodiments and / or configurations discussed.
[0013] Please refer to Figure 1 , which shows a functional block diagram of a data decryption system 100 according to some embodiments of the present invention. The data decryption system 100 is coupled to the processing system 500 and the storage device 600. In some embodiments, the processing system 500 issues a read request, which is transmitted to the data decryption system 100 and the storage device 600 through the address channel 165. The storage device 600 returns the read data indicated by the address to the data decryption system 100 through the data channel 173 according to the address of the read request.
[0014] In some embodiments, the data in the storage device 600 may be cipher data and plaintext data. The data decryption system 100 determines whether the data requested by the processing system 500 is cipher data. If the requested data is cipher data, the data decryption system 100 will calculate the key for decryption before waiting for the storage device 600 to return the data. In this way, the data decryption system 100 can immediately decrypt the data after receiving the return data from the storage device 600.
[0015] In some embodiments, the encrypted data stored in the storage device 600 is encrypted by a symmetric encryption and decryption algorithm. The symmetric encryption and decryption algorithm can be applied to the encryption and decryption processor 130 to generate a key. In other embodiments, an asymmetric encryption and decryption algorithm can also be applied to the data decryption system 100 and the storage device 600 of the present case.
[0016] In some embodiments, the data in the storage device 600 may be instructions or file data.
[0017] like Figure 1 As shown, the data decryption system 100 includes an address checking circuit 110, a storage medium 120, an encryption and decryption processor 130, a buffer 140, and an operation circuit 150. The storage medium 120 is coupled to the address checking circuit 110 and the encryption and decryption processor 130. The buffer 140 is coupled to the encryption and decryption processor 130. The operation circuit 150 is coupled to the storage medium 120 and the encryption and decryption processor 130.
[0018] In some embodiments, the address checking circuit 110 is configured to receive an address through the address channel 165. On the other hand, the address transmitted by the processing system 500 has a target identifier, and the target identifier is used to indicate the storage device 600 to be accessed. In another embodiment, the data decryption system 100 can be coupled to multiple storage devices 600 ( Figure 1 Only one storage device 600 is shown). The storage devices 600 have respective identifiers to avoid errors in the process of transferring data.
[0019] In some embodiments, the storage medium 120 has a queue for storing addresses and a queue for storing identifiers. For example, the address check circuit 110 transmits the address to the storage medium 120, so that the address is stored in the address queue, and the target identifier is also stored in the identifier queue.
[0020] In some embodiments, the encryption / decryption processor 130 is configured to generate a key for decrypting the read data returned by the storage device 600 (if the read data is encrypted data). For example, the encryption / decryption processor 130 is used to execute a block code algorithm, such as the Advanced Encryption Standard (AES) algorithm, the Data Encryption Standard (DES) algorithm, the Rivest Cipher (RC) series of algorithms, etc. It is worth mentioning that the encryption / decryption processor 130 uses an existing encryption / decryption algorithm, and a person skilled in the art can design and implement the internal circuit structure and / or encryption / decryption steps of the encryption / decryption processor 130 based on his / her experience.
[0021] In some embodiments, the register 140 is configured to store a key, such as an AES key, a DES key, a RS key, etc.
[0022] Please refer to Figure 2 , which shows the time sequence of data processing by the data decryption system 100 according to some embodiments of the present invention. Figure 1 and Figure 2 As shown, after the data decryption system 100 receives an address from the processing system 500 through the address channel 165, the data decryption system 100 transmits the address to the storage device 600. At time point S, the storage device 600 returns the data of the address. In some embodiments, the operation circuit 150 receives read data from the storage device 600 through the data channel 173 during the first period T1. The first period T1 is the total time required for the data decryption system 100 to read data from the storage device 600.
[0023] On the other hand, after the data decryption system 100 receives the address from the processing system 500 through the address channel 165, the encryption and decryption processor 130 receives the address at time point S. In some embodiments, the encryption and decryption processor 130 calculates the second key according to the first key and the address in the second period T2. The second key is used by the encryption and decryption processor 130 to decrypt the read data obtained from the storage device 600 (for example, the city bureau received by the operation circuit 150 in the first period T1). The second period T2 is the time required for the encryption and decryption processor 130 to calculate the second key. For example, the encryption and decryption processor 130 executes the AES algorithm, reads the AES key of the buffer 140 and the address in the address queue of the storage medium 120, and performs the encryption operation. The result of this encryption operation can be used by the operation circuit 150 to decrypt the key of the data of the storage device 600.
[0024] In some embodiments, the data decryption system 100 receives data from the storage device 600 and calculates the second key at the same time, that is, the first period T1 and the second period T2 overlap. In other embodiments, the first period T1 and the second period T2 may overlap partially or completely, depending on the time required for data reading (i.e., the first period T1) and the time required for key calculation (i.e., the second period T2).
[0025] In some embodiments, the time required to read the data is less than the time required to calculate the key. Figure 2 , the operation circuit 150 completes data reading at time point C, and the encryption / decryption processor 130 completes key calculation at time point D. Time point D is after time point C. After the encryption / decryption processor 130 calculates the key required for decrypting the data, the operation circuit 150 performs data decryption in the third period T3. In other embodiments, if the time required for data reading is greater than the time required for key calculation, the operation circuit 150 can immediately decrypt the data in the third period T3 after the operation circuit 150 reads the completed data. The third period T3 is the time required for the operation circuit 150 to decrypt the data. At time point E, the operation circuit 150 completes data decryption. The third period T3 follows the first period T1 or the second period T2.
[0026] In this case, the storage device 600 searches for data according to the address to provide the read data to the operation circuit 150, while the encryption and decryption processor 130 performs the key operation. After the data decryption system 100 receives the read data or completes the key operation, the data can be decrypted immediately. In this way, compared with the general practice of waiting for the data to be read before performing the key operation, the present case can save the time of waiting for the storage device 600 to search for data and transmit data, thereby accelerating the data decryption performance.
[0027] In some embodiments, the operation circuit 150 includes an identification circuit 152 , a multiplexer 154 , and an exclusive OR (XOR) circuit 156 . The identification circuit 152 is coupled to the storage medium 120 .
[0028] In some embodiments, the identification circuit 152 is configured to read the target identifier in the identifier queue and the address in the address queue from the storage medium 120 to output an indication signal to the input end of the multiplexer 154, so that the multiplexer 154 can select one of the data at the multiple input ends as the data at the output end. For example, when the processing system 500 outputs multiple requests to read data, the addresses of these requests are simultaneously transmitted to the data decryption system 100 and the storage device 600. Since the read data received by the data decryption system 100 from the storage device 600 is not necessarily in the same order as the order in which the requests are received, the identification circuit 152 is required to control the output of the multiplexer 154 to avoid the problem of inconsistency between the read data and the address.
[0029] The following describes an embodiment in which the operation circuit 150 outputs decrypted data. When the read data is transmitted to the operation circuit 150 via the data channel 173, the read data is simultaneously transmitted to an input end of the multiplexer 154 and the XOR circuit 156. The XOR circuit 156 uses the key output by the encryption / decryption processor 130 and the read data to perform an XOR operation, and outputs the operation result to the other input end of the multiplexer 154 via the data channel 176. In one embodiment, the case decrypts the read data through the operation of the XOR circuit 156. In other words, the two input ends of the multiplexer 154 are the decrypted data and the undecrypted data, respectively.
[0030] In some embodiments, the address checking circuit 110 records the address segment of the encrypted data of the storage device 600, so it can be determined whether the address points to the encrypted data based on the received address. The information determining whether the address points to the encrypted data will be transmitted to the identification circuit 152, and transmitted to the control end of the multiplexer 154 together with the indication signal. In this way, if the processing system 500 requests encrypted data, the correct decoded data can be received by the processing system 500. Alternatively, if the data requested by the processing system 500 is unencrypted data, it can also be correctly returned to the processing system 500 through the data decryption system 100 of the present case.
[0031] It is worth mentioning that the circuit of the operation circuit 150 of this case can be designed according to different decoding algorithms. This case is not limited to the operation circuit 150 using the identification circuit 152, the multiplexer 154 and the XOR circuit 156, but is only an embodiment for illustration.
[0032] Please refer to Figure 3 , which shows a flow chart of a data decoding method according to some embodiments of the present invention. This decoding method can be Figure 1 The data decryption system 100 is implemented, and the following description is referred to Figure 1 and Figure 3 .
[0033] In step S210 , an address is received via an address channel 165 .
[0034] In step S220 , the address is transmitted to the address checking circuit 110 and the storage device 500 .
[0035] In step S230 , read data indicated by the address is received from the storage device 500 via a data channel 173 during a first period.
[0036] In step S240 , the second key is calculated according to the first key and the address during a second period, wherein the first period overlaps with the second period.
[0037] In some embodiments, the data decoding method is applicable to a hybrid storage device, that is, not all storage spaces in the storage device are encrypted spaces (storing encrypted data) or unencrypted spaces (storing unencrypted data).
[0038] Figures 4 to 6 Schematic diagram showing that the data decoding method in some embodiments of the present case is applicable to a hybrid storage device. The storage space of a general storage device (such as flash, DDR, SRAM, etc.) can be divided into blocks, pages, and sections. A page contains multiple blocks, and a section contains multiple pages. In the prior art, the entire memory space of the storage device needs to be divided into an encrypted space before the data encryption function can be used. The data decoding method of the present case can support a section containing multiple unencrypted pages and encrypted pages.
[0039] like Figure 4 As shown, the block 310_n has a block space 301. In some embodiments, the block space 301 is configured as 32 bytes. Figure 1 and Figure 3 The request address may be the address of the block 310_n, so that the data decryption system 100 can decrypt the 32-byte block data.
[0040] like Figure 5 As shown, the page 410_n has a plurality of blocks, for example, 511 blocks 310_1, 310_2, ..., 310_511. In some embodiments, the page 410_n may be divided into a plurality of blocks used to store encrypted data and a plurality of blocks used to store unencrypted data.
[0041] In some embodiments, the encryption / decryption processor 130 generates encrypted data according to the block address of the block 310_2 and the key (e.g., AES key) of the buffer 150 to serve as the block key (hereinafter referred to as the first block key) for the operation circuit 150 to decrypt the data block 310_2. In another embodiment, the encryption / decryption processor 130 generates encrypted data according to the block address of the block 310_3 and the key of the buffer 150 to serve as the block key (hereinafter referred to as the second block key) for the operation circuit 150 to decrypt the data block 310_2. It is worth mentioning that the first block key is different from the second block key.
[0042] In some embodiments, if all blocks of the page 410_n store encrypted and / or unencrypted data, an encrypted and / or unencrypted page may be formed.
[0043] like Figure 6 As shown, the segment 400 has a plurality of pages, for example, four pages 410_1, 410_2, 410_3, and 410_4. The addresses of the pages 410_1, 410_2, 410_3, and 410_4 are 0x0000_0000, 0x0000_4000, 0x0000_8000, and 0x0000_B000, respectively. In some embodiments, the segment 400 may be divided into a plurality of pages used to store encrypted data, and a plurality of pages used to store unencrypted data. For example, Figure 6 As shown, if page 410_2 is an encrypted page (i.e., all blocks in the page are encrypted data), the encryption / decryption processor 130 generates a segment key (hereinafter referred to as the first segment key) according to the segment address 0x0000_4000 of segment 400 and the AES key. The first segment key is used to decrypt the data associated with the segment address 0x0000_4000 (i.e., page 410_2). Similarly, if page 410_3 is also an encrypted page, the encryption / decryption processor 130 generates a segment key (hereinafter referred to as the second segment key) according to the segment address 0x0000_8000 of segment 400 and the AES key. The second segment key is used to decrypt the data associated with the segment address 0x0000_8000 (i.e., page 410_3). It is worth mentioning that the first segment key is different from the second segment key.
[0044] In other embodiments, in addition to generating different decryption keys according to the addresses, different pages and / or sectors may also be used with different encryption keys (for example, one page and / or sector with one AES key) in the encryption / decryption processor 130 to enhance the strength of data encryption / decryption.
[0045] In some other embodiments, multiple blocks of the same page or multiple pages of the same segment can use the same address to calculate the decryption key (such as the block key and segment key mentioned above). For example, the encryption and decryption processor 130 calculates the segment key according to the segment address 0x0000_4000, and this segment key can be used to decrypt the encrypted data of pages 410_2 and 410_3 at the same time. In this way, the calculation cost can be reduced and the decryption performance can be improved.
[0046] In summary, the decoding engine of the prior art often needs to wait for the external storage device to read the data and send it back before calculating the key used to decrypt the data, which causes the decoding engine to waste time waiting for the reading time. In contrast, the data decryption system and data decryption method of this case can synchronously calculate the key used to decrypt the data while the data is being read from the storage device. In this way, after obtaining the read data, the data can be decrypted immediately, which reduces the idle time and greatly improves the efficiency of decryption. In addition, this case does not limit the use conditions of the storage device. The storage device can be used to store partially encrypted data and partially unencrypted data, making it more flexible in use.
[0047] The above content summarizes the features of several embodiments so that those skilled in the art can better understand the embodiments of the present invention. Those skilled in the art should understand that the above content can be easily used as a basis for designing or modifying other changes without departing from the spirit and scope of the present invention to implement the same purpose and / or achieve the same advantages of the embodiments described herein. The above content should be understood as an example of the present invention, and its protection scope should be based on the scope of the patent application.
[0048]
Explanation of symbols
[0049] 100:Data decryption system
[0050] 110: Address check circuit
[0051] 120: Storage medium
[0052] 130: encryption and decryption processor
[0053] 140: Cache
[0054] 150: Operational circuit
[0055] 152: Identification Circuit
[0056] 154:Multitasking
[0057] 156:XOR Circuit
[0058] 165: Address channel
[0059] 173, 176, 179: Data channels
[0060] 500: Processing system
[0061] 600: Storage device
[0062] S210~S240: Steps
[0063] 310_1, 310_2, 310_3, 310_511, 310_n: Block
[0064] 301: Block space
[0065] 400: Segment
[0066] 410_1, 410_2, 410_3, 410_n: pages.
Claims
1. A data decryption system, comprising: an address check circuit configured to receive an address via an address channel; A cryptographic processor; and a computing circuit coupled to the encryption / decryption processor, wherein the computing circuit is configured to receive a read data indicated by the address from a storage device through a data channel during a first period; in, The encryption / decryption processor calculates a second key according to a first key and the address during a second period, wherein the second key is used to decrypt the read data, wherein the first period overlaps with the second period. Wherein, the operation circuit comprises: an XOR circuit coupled to the encryption / decryption processor, wherein the XOR circuit is configured to generate a decrypted data according to the second key and the read data during a third period, wherein the third period is subsequent to the first period or the second period, an identification circuit configured to read the target identifier corresponding to the address to generate an indication signal; and A multiplexer is configured to receive the decrypted data from the XOR circuit and the read data from the storage device, and output one of the decrypted data and the read data according to the indication signal.
2. The data decryption system according to claim 1, in, The first period and the second period partially overlap or completely overlap.
3. The data decryption system as claimed in claim 2, in, The target identifier is transmitted to the address checking circuit via the address channel, and the data decryption system further comprises: A storage medium is coupled to the address checking circuit and the encryption / decryption processor, wherein the storage medium is configured to store the target identifier in a queue.
4. The data decryption system according to claim 2, in, The encryption / decryption processor generates the second key according to a block address of a plurality of blocks of the storage device, wherein the second key is used for the operation circuit to decrypt one of the blocks.
5. The data decryption system according to claim 1, in, The storage device includes a section, and the encryption and decryption processor is further configured to: generating a first segment key according to a first address of the segment and the first key, wherein the first segment key is used to decrypt data associated with the first address; and A second segment key is generated according to a second address of the segment and the first key, wherein the second segment key is used to decrypt data associated with the second address.
6. A data decryption method executed by the data decryption system according to claim 1, comprising: transmitting an address to an address checking circuit and a storage device via an address channel; receiving a read data indicated by the address from the storage device via a data channel during a first period; During a second period, a second key is calculated according to a first key and the address, in, The first period overlaps with the second period; generating a decrypted data according to the second key and the read data in a third period, wherein the third period is subsequent to the first period or the second period; reading a target identifier corresponding to the address to generate an indication signal; as well as One of the decrypted data and the read data is output according to the indication signal.
Citation Information
Patent Citations
Scrambling an address and encrypting write data for storing in a storage device
CN103154963A
Data encryption and decryption device and method, storage medium and data storage system
CN109656840A
