Encryption device, decryption device, encryption method, and encryption program
By dividing messages into blocks with auxiliary order information and parallelizing encryption, the method addresses the challenge of maintaining message order during parallel processing, enhancing speed and adaptability.
Patent Information
- Application Number
- JP2022060130
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-03-31
AI Technical Summary
Existing cryptographic processing methods struggle to parallelize a single message effectively, leading to issues with maintaining the original order during restoration.
A method that divides a message into blocks, adds auxiliary information indicating order, and performs parallel encryption processing, followed by integrating the encrypted data, while also providing parallelization information for decryption.
Enables parallel encryption processing for a single message and ensures correct restoration of the original message order, optimizing speed and flexibility across different environments.
Smart Images

Figure 0007599450000001 
Figure 0007599450000002 
Figure 0007599450000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for implementing cryptographic processing at high speed. [Background technology]
[0002] Conventionally, as cryptographic processing becomes more complicated, a method of achieving high speed by parallelizing processing has been generally used. However, depending on the cryptographic algorithm, there are cases where parallelization is difficult due to the structure, such as when the next internal state in the cryptographic processing depends on the previous internal state.
[0003] As a method for achieving high speed by parallelization even in cryptographic algorithms with structures that are difficult to parallelize, there is the comb scheduler method proposed in Non-Patent Document 1. In the comb scheduler, instead of encrypting one message in parallel, multiple independent messages are encrypted in parallel, thereby achieving high speed overall. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] A. Bogdanov, MM Lauridsen, E. Tischhauser. (2015). Comb to Pipeline: Fast Software Encryption Revisited. In: Leander, G. (eds) Fast Software Encryption. FSE 2015. Lecture Notes in Computer Science, vol 9054. Springer, Berlin, Heidelberg. Summary of the Invention [Problem to be solved by the invention]
[0005] However, the implementation method using the comb scheduler had a problem that it was not possible to achieve parallelization for a single message. In other words, if a message was simply divided and parallelized, the order of messages might not be maintained when the original message was restored from the divided messages.
[0006] An object of the present invention is to provide an encryption system that realizes parallelization of encryption processing for one message and is capable of restoring the original message in the correct order. [Means for solving the problem]
[0007] The encryption device of the present invention comprises a message division unit that divides a message to be encrypted into a plurality of message blocks and generates data of a size specified by an encryption algorithm by adding auxiliary information indicating an order to each message block; an input data construction unit that distributes the data to a predetermined parallel number of the encryption algorithm and reconstructs input data; an encryption unit that inputs the input data to the encryption algorithm in parallel and obtains encrypted data for the parallel number; and a ciphertext output unit that outputs a ciphertext combining a plurality of the encrypted data.
[0008] The encryption device may further include a parallelization information notification unit that notifies the decryption side of parallelization information including a size of the auxiliary information.
[0009] The parallelization information notification unit may notify a decoding side of parallelization information including the parallel number.
[0010] The decryption device of the present invention includes a ciphertext splitting unit that divides the ciphertext output by the encryption device into the parallel number, a decryption unit that inputs each of the multiple pieces of encrypted data split by the ciphertext splitting unit into a decryption algorithm and obtains the message block to which the auxiliary information is added, and a message recovery unit that rearranges the message blocks in their original order based on the auxiliary information to recover the message.
[0011] The encryption method of the present invention includes a message division step of dividing a message to be encrypted into a plurality of message blocks and adding auxiliary information indicating an order to each message block to generate data of a size specified by an encryption algorithm, an input data construction step of distributing the data to a predetermined parallel number of the encryption algorithm to reconstruct input data, an encryption step of inputting the input data to the encryption algorithm in parallel to obtain encrypted data for the parallel number, and a ciphertext output step of outputting a ciphertext combining a plurality of the encrypted data.
[0012] An encryption program according to the present invention causes a computer to function as the encryption device. Effect of the Invention
[0013] According to the present invention, it is possible to realize parallel cryptographic processing for one message and to restore the original message in the correct order. [Brief description of the drawings]
[0014] [Figure 1] FIG. 2 is a diagram illustrating a functional configuration of an encryption system according to an embodiment. [Diagram 2] FIG. 2 is a sequence diagram showing the flow of processing performed by an encryption system in an embodiment. [Diagram 3] FIG. 2 is a diagram illustrating a flow of encryption and decryption in an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] An example of an embodiment of the present invention will now be described. The encryption method of the present embodiment divides one message to be encrypted and parallelizes encryption processing for multiple independent messages, thereby achieving high speed overall.
[0016] FIG. 1 is a diagram showing the functional configuration of an encryption system 1 according to the present embodiment. The encryption system 1 includes an encryption device 10 that encrypts a message, and a decryption device 20 that decrypts the ciphertext. The encryption device 10 and the decryption device 20 are information processing devices each including a control unit and a storage unit as well as input / output devices and communication devices for various data. The encryption device 10 and the decryption device 20 may be the same device.
[0017] The control unit is a part that controls the entire encryption device 10 or the decryption device 20, and realizes each function in this embodiment by appropriately reading and executing various programs stored in the storage unit. The control unit may be a CPU. The storage unit is a storage area for storing various programs for causing the hardware group to function as the encryption device 10 or the decryption device 20, various data, and the like, and may be a ROM, a RAM, a flash memory, a hard disk drive (HDD), or the like.
[0018] The control unit of the encryption device 10 includes an encryption-side scheduler (a message division unit 11, an input data configuration unit 12, and a parallelization information notification unit 13), an encryption unit 14, and a ciphertext output unit 15. The control unit of the decryption device 20 includes a decryption side scheduler (a parallelization information acquisition unit 21, a ciphertext division unit 22, and a message restoration unit 24) and a decryption unit .
[0019] When a message M to be encrypted (e.g., a video file) is input to the encryption-side scheduler, the message division unit 11 divides this message M into a number of message blocks. Furthermore, the message division unit 11 gives each divided message block auxiliary information indicating the order of the block in the message M before division, and generates data of a size defined by the encryption algorithm.
[0020] In order to perform the encryption process efficiently, the size of the data obtained by concatenating the message block and auxiliary information must match the encryption process size. The size of the auxiliary information depends on how many parts the original message M is divided into, so the encryption scheduler allocates an appropriate size.
[0021] Next, the input data construction unit 12 distributes each of the generated data to a predetermined number of parallel processes of the encryption algorithm to reconstruct plaintext, which is the input data. For example, when four encryption processes are parallelized, the encryption-side scheduler divides M, adds auxiliary information, and then reconstructs the input data according to the number of divisions as follows: m0=M_{0}∥M_{4}∥…∥M_{4n-4} m1=M_{1}∥M_{5}∥…∥M_{4n-3} m2=M_{2}∥M_{6}∥…∥M_{4n-2} m3=M_{3}∥M_{7}∥…∥M_{4n-1} Here, M_{i} indicates data including the divided i-th message block and auxiliary information indicating that it is the i-th message block.
[0022] The parallelization information notification unit 13 notifies the decoding side scheduler (parallelization information acquisition unit 21) of the parallelization information including the number of parallel processes and the size of the auxiliary information, and shares the information with the decoding side scheduler.
[0023] The encryption unit 14 inputs the reconstructed input data (plain text) to the encryption algorithm in parallel, and obtains the number of parallel encrypted data. For example, when input data m0, m1, m2, and m3 are generated, the encryption unit 14 inputs them to the parallelized encryption algorithm and executes encryption processing in parallel. That is, with E as the encryption algorithm and K as the secret key, c0 = E(m0,K) c1 = E(m1,K) c2 = E(m2,K) c3 = E(m3,K) Four encrypted data pieces are obtained, represented as follows:
[0024] The ciphertext output unit 15 outputs a ciphertext that combines these multiple pieces of encrypted data, and provides it to the decryption device 20. In this case, the order of generation and concatenation of the multiple encrypted data is not limited, but the data strings of c0 to c3 are maintained. That is, the ciphertext may be c0∥c1∥c2∥c3, or the order may be reversed, such as c1∥c3∥c0∥c2.
[0025] In the decryption-side scheduler, the parallelization information acquisition unit 21 acquires the number of parallel processes and the size of auxiliary information notified from the encryption-side scheduler (parallelization information notification unit 13).
[0026] The ciphertext division unit 22 divides the ciphertext received from the encryption device 10 into the number of parallel portions shared with the encryption device 10 . For example, the ciphertext division unit 22 divides the ciphertext c2∥c0∥c3∥c1 into four, which is the shared parallel number, to obtain encrypted data c2, c0, c3, and c1.
[0027] The decryption unit 23 inputs each of the multiple pieces of encrypted data divided by the ciphertext division unit 22 into a decryption algorithm, and obtains the message block to which the auxiliary information has been added. At this time, the decryption unit 23 may execute the decryption process in parallel with the same parallel number as that shared with the encryption device 10, but it is not necessary to match the parallel number with that of the encryption side depending on the environment such as the processing capacity of the decryption device 20. For example, the decryption unit 23 may decrypt the divided c0 to c3 in four parallels to obtain the corresponding m0 to m3, or may execute two parallel processes, one for sequentially decrypting c0 and c1, and the other for sequentially decrypting c2 and c3. Alternatively, the decryption unit 23 may decrypt in sequence from c0 to c3 without parallelizing the decryption process.
[0028] The message restoration unit 24 separates the auxiliary information attached to the message blocks based on the size of the auxiliary information acquired by the parallelization information acquisition unit 21, and rearranges the message blocks in their original order based on this auxiliary information to restore the message M.
[0029] In addition, in the case where the encryption device 10 and the decryption device 20 hold fixed parallel numbers and auxiliary information sizes in advance, the parallelization information notification unit 13 and the parallelization information acquisition unit 21 are unnecessary.
[0030] FIG. 2 is a sequence diagram showing the flow of processing performed by the encryption system 1 in this embodiment. This sequence shows a case where the ciphertext encrypted by the encryption device 10 is decrypted by the decryption device 20 for use.
[0031] In step S1, the user determines the number of parallel processes to be executed in parallel when encrypting a message, and sets the number in the encryption side scheduler.
[0032] In step S2, the encryption scheduler (message division unit 11) divides the message to be encrypted into message blocks and assigns auxiliary information to each block indicating the number of the block in the original message. Furthermore, the encryption scheduler (input data construction unit 12) distributes the message blocks as input data (plaintext) for the encryption algorithm according to the number of parallel processes. At this time, the size of the auxiliary information is recorded since it will be necessary during decoding.
[0033] In step S3, the encryption unit 14 performs encryption processing of the divided message in parallel according to the number of parallel processes, and generates a ciphertext.
[0034] In step S4, the ciphertext output unit 15 transmits the generated ciphertext to the decryption device 20. At this time, the encryption-side scheduler (parallelization information notification unit 13) also transmits to the decryption device 20 the number of parallel encryption processes executed in parallel by the encryption unit 14 and the size of the auxiliary information added to the message block.
[0035] In step S5, the decryption-side scheduler (parallelization information acquisition unit 21) acquires from the encryption device 10 the number of parallel encryption processes and the size of the auxiliary information. Note that these pieces of information may be designated by the user or may be registered in advance in the decoding side scheduler as fixed values.
[0036] In step S6, the decryption-side scheduler (ciphertext division unit 22) divides the ciphertext according to the number of parallel processes, and obtains the encrypted data that has been continuously processed in the encryption device 10.
[0037] In step S7, the decryption unit 23 executes the decryption process for each of the encrypted data divided into the parallel number in sequence or in parallel, and inputs each decrypted message block to the scheduler.
[0038] In step S8, the decoding side scheduler (message restoration unit 24) extracts auxiliary information from the message blocks and rearranges the blocks in the correct order to restore the original message.
[0039] When the ciphertext is to be transmitted later or decrypted and used by the encryption device 10 itself, in step S4, the encryption side scheduler may record the ciphertext, the parallel number, and the auxiliary information size instead of transmitting them.
[0040] FIG. 3 is a diagram showing a schematic flow of encryption and decryption in this embodiment. Here, an example is shown in which a message M is encrypted in four parallel processes and then decrypted in four parallel processes.
[0041] When a message M is input to the encryption-side scheduler, the message M is divided into message blocks, and after each block is assigned an order (auxiliary information), it is reconstructed into four plaintexts, m0 to m3. These are input to the parallelized encryption algorithm E, respectively, to obtain encrypted data c0 to c3. The number of parallel processes, the size of the auxiliary information, and the ciphertext (c0∥c1∥c2∥c3, in no particular order) are passed to the decryption-side scheduler.
[0042] The decryption-side scheduler divides the ciphertext into c0 to c3 in accordance with the notified number of parallel processes, and inputs each of the divided parts to the parallelized decryption algorithm D. When these ciphertexts are decrypted, data m0 to m3 are obtained in which the plaintext message blocks and auxiliary information are concatenated. Since the decryption side scheduler has acquired the size of the auxiliary information, it extracts only the message blocks from the concatenated data and sorts them in the order indicated by the auxiliary information to restore the entire original message.
[0043] According to this embodiment, the encryption device 10 divides a message to be encrypted into a plurality of message blocks, and generates data of a size defined by the encryption algorithm by adding auxiliary information indicating the order of each message block. As a result, the encryption device 10 can reconstruct the input data by distributing the generated data to a predetermined number of parallel encryption algorithms, inputting the input data to the encryption algorithm in parallel, and outputting ciphertext quickly through parallel processing.
[0044] Since the ciphertext generated by the encryption device 10 contains information about the number of each message block in the original message, it is possible to sort the decrypted message blocks. Therefore, there is no need to synchronize the encrypted data with the processing of other message blocks, which has the advantage that the processing required for synchronization can be omitted. Since synchronization is not required, it is possible to execute the next processing (transmission to a communication partner, storage in storage, etc.) from the block for which processing has been completed. Therefore, even in the case of an encryption method that is difficult to parallelize, the encryption system 1 can realize parallelization of encryption processing for one message, and can restore the original message in the correct order by using the auxiliary information.
[0045] In addition, the execution environments may differ between the encryption side and the decryption side, and the optimal parallel number may differ depending on each environment. Since the decryption device 20 can execute the decryption process in parallel by distributing the encrypted data to an arbitrary parallel number equal to or less than the parallel number in the encryption device 10, the encryption system 1 can flexibly change the parallel number according to the environments of the encryption side and the decryption side, and can execute the process optimal for each environment. For example, when sending encrypted data from a server to a client, the server can use a high-end CPU to execute 16 processes in parallel, while the client can use a low-end CPU to execute 4 processes in parallel. By configuring the scheduler according to each environment, appropriate performance can be achieved.
[0046] The encryption device 10 and the decryption device 20 share the size of the auxiliary information linked to the message block and the number of parallel operations, so that the decryption device 20 can appropriately perform the decryption process according to the parallelization information arbitrarily set on the encryption side. Furthermore, since the encryption system 1 performs encryption including auxiliary information, it is possible to reduce the risk that the structure of the ciphertext will be guessed and decrypted from the additional information, thereby ensuring security.
[0047] In addition, the above-mentioned embodiment, for example, speeds up encryption and decryption processes, making it possible to contribute to Goal 9 of the Sustainable Development Goals (SDGs) led by the United Nations, which is to "build resilient infrastructure, promote sustainable industrialization and foster innovation."
[0048] Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Furthermore, the effects described in the above-described embodiments are merely a list of the most preferable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the embodiments.
[0049] The encryption method of the encryption system 1 is realized by software. When realized by software, a program constituting this software is installed in an information processing device (computer). These programs may be recorded on a removable medium such as a CD-ROM and distributed to users, or may be distributed by being downloaded to the user's computer via a network. Furthermore, these programs may be provided to the user's computer as a Web service via a network without being downloaded. [Explanation of symbols]
[0050] 1. Encryption System 10 Encryption device 11 Message division 12 Input data configuration section 13 Parallelization information notification section 14 Encryption section 15 Ciphertext output unit 20 Decryption device 21 Parallelization information acquisition unit 22 Ciphertext division part 23 Decoding section 24 Message Recovery Section
Claims
1. a message division unit that divides a message to be encrypted into a plurality of message blocks, and generates data of a size defined by an encryption algorithm by adding auxiliary information indicating an order to each message block; an input data constructing unit that distributes the data to a predetermined number of parallel processes of the encryption algorithm to reconstruct input data; an encryption unit that inputs the input data to the encryption algorithm in parallel to obtain the parallel number of encrypted data; and a ciphertext output unit that outputs a ciphertext obtained by integrating a plurality of the encrypted data.
2. The encryption device according to claim 1 , further comprising a parallelization information notification unit that notifies a decryption side of parallelization information including a size of the auxiliary information.
3. The encryption device according to claim 2 , wherein the parallelization information notification unit notifies a decryption side of the parallelization information including the number of parallel operations.
4. a ciphertext division unit that divides the ciphertext output by the encryption device according to any one of claims 1 to 3 into the number of parallel bits; a decryption unit that inputs each of the plurality of encrypted data divided by the ciphertext division unit to a decryption algorithm and obtains the message block to which the auxiliary information is added; a message restoration unit that rearranges the message blocks in their original order based on the auxiliary information to restore the message.
5. a message division step of dividing a message to be encrypted into a plurality of message blocks, and generating data of a size defined by an encryption algorithm by adding auxiliary information indicating an order to each message block; an input data construction step of reconstructing input data by distributing the data to a predetermined number of parallel processes of the encryption algorithm; an encryption step of inputting the input data to the encryption algorithm in parallel to obtain the parallel number of encrypted data; a ciphertext output step of outputting a ciphertext obtained by integrating a plurality of the encrypted data.
6. An encryption program for causing a computer to function as the encryption device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Data processing method, device and equipment, medium and program product
CN113014604A
Encryption communication method and node unit
JP2000315997A
Encryption device, decryption device, encryption method, decryption method, encryption program, and decryption program
JP2004138722A
JPP7367860B
Multipart authenticated encryption
US9537657B1
