Arithmetic device
The arithmetic device optimizes hardware usage by reusing arithmetic units for multiple stages of butterfly operations, addressing the challenge of limited resources in vehicles and enabling secure cryptographic operations.
Patent Information
- Application Number
- JP2023067125
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-04-17
AI Technical Summary
There is a need for an arithmetic device capable of performing post-quantum cryptographic encryption operations, particularly lattice cryptography, which requires significant calculation, but is constrained by limited hardware resources in vehicles and similar systems.
The arithmetic device includes one or more arithmetic units that perform butterfly operations on input data, with a rearrangement unit to reorder and reuse these units for multiple stages of calculations, allowing efficient execution of arithmetic transformations with fewer hardware resources.
This approach enables the arithmetic device to perform arithmetic conversions efficiently, reducing the hardware requirements and facilitating integration into vehicles, while ensuring secure communication and authentication processes.
Smart Images

Figure 2024153313000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a computing device. [Background technology]
[0002] For example, Patent Document 1 discloses a coprocessor capable of performing post-quantum encryption calculations at high speed. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] US Patent Application Publication No. 2022 / 0171885 Summary of the Invention [Problem to be solved by the invention]
[0004] In recent years, in order to prevent encryption codes from being decrypted by quantum computers, there is a demand for incorporating an arithmetic device capable of executing encryption calculations of post-quantum cryptography into vehicles, etc. In the calculations of lattice cryptography, which is one type of post-quantum cryptography, number theoretic transformations, which require a large amount of calculations, are performed. When incorporating an arithmetic device that performs number theoretic transformations into vehicles, etc., there is a limit to the hardware resources that can be incorporated. Therefore, there is a demand for an arithmetic device that can execute number theoretic transformations even with limited hardware resources. [Means for solving the problem]
[0005] The present disclosure can be realized in the following forms.
[0006] According to one embodiment of the present disclosure, there is provided an arithmetic device for performing number theoretic transformation, comprising: an arithmetic section (40) including one or more arithmetic units (50) configured to perform butterfly operations on two input data, and outputting the same number of output data as the two or more input data; and a sorting section (30) generating sorted data by sorting the output data in a predetermined order, and repeatedly inputting a part or all of the sorted data to the arithmetic section as the input data.
[0007] According to this embodiment, the arithmetic device executes number theoretic transformation by repeatedly using the same arithmetic unit to perform butterfly operations on two pieces of input data, which allows the number theoretic transformation to be executed with fewer hardware resources. [Brief description of the drawings]
[0008] [Figure 1] FIG. 2 is an explanatory diagram showing a schematic configuration of a calculation device according to the first embodiment. [Diagram 2] FIG. 4 is a diagram for explaining the configuration of a first arithmetic unit. [Diagram 3] A diagram explaining the butterfly operation of number theoretic transformation of eight pieces of data. [Figure 4] FIG. 4 is a process diagram of number theoretic transformation processing in the first embodiment. [Diagram 5] FIG. 4 is a process diagram of the first stage of NTT butterfly calculation processing in the first embodiment. [Figure 6] FIG. 11 is a process diagram of the second stage NTT butterfly calculation processing in the first embodiment. [Figure 7] FIG. 11 is a process diagram of the third stage NTT butterfly calculation processing in the first embodiment. [Figure 8] 5A to 5C are diagrams for explaining input data and output data of each arithmetic unit in the number theoretic transformation processing of the first embodiment. [Figure 9] FIG. 11 is an explanatory diagram showing a schematic configuration of a calculation device according to a second embodiment. [Figure 10] FIG. 11 is a process diagram of the first stage of NTT butterfly calculation processing in the second embodiment. [Figure 11]FIG. 13 is a process diagram of the second stage NTT butterfly calculation processing in the second embodiment. [Figure 12] FIG. 11 is a process diagram of the third stage NTT butterfly calculation processing in the second embodiment. [Figure 13] 13A to 13C are diagrams for explaining input data and output data of each arithmetic unit in the number theoretic transformation process according to the second embodiment. [Figure 14] FIG. 11 is an explanatory diagram showing a schematic configuration of a calculation device according to a third embodiment. [Figure 15] FIG. 13 is a process diagram of the first stage of NTT butterfly calculation processing in the third embodiment. [Figure 16] FIG. 13 is a process diagram of the second stage NTT butterfly calculation processing in the third embodiment. [Figure 17] FIG. 13 is a process diagram of the third stage NTT butterfly calculation processing in the third embodiment. [Figure 18] 13A to 13C are diagrams for explaining input data and output data of each arithmetic unit in the number theoretic transformation processing according to the third embodiment. [Figure 19] FIG. 13 is a diagram for explaining the configuration of a calculation unit according to a fourth embodiment. [Figure 20] A diagram explaining the butterfly operation of the reciprocal number theoretic transformation of eight pieces of data. [Figure 21] FIG. 13 is a process diagram of reciprocal number theoretic transformation processing in the fourth embodiment. [Figure 22] FIG. 13 is a process diagram of the first stage INTT butterfly calculation processing in the fourth embodiment. [Diagram 23] FIG. 13 is a process diagram of the second stage INTT butterfly calculation processing in the fourth embodiment. [Figure 24] FIG. 13 is a process diagram of the third stage INTT butterfly calculation processing in the fourth embodiment. [Diagram 25] 13A to 13C are diagrams for explaining input data and output data of each arithmetic unit in the reciprocal number theoretic transformation process according to the fourth embodiment. [Figure 26] FIG. 13 is a diagram for explaining the configuration of a calculation unit according to a fifth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] A. First embodiment: The arithmetic device 100 shown in FIG. 1 is a device for performing number theoretic transformation. The arithmetic device 100 is mounted on a vehicle. In this embodiment, the vehicle is an automobile. The arithmetic device 100 encrypts or decrypts data by performing butterfly operations of number theoretic transformation, for example, when the vehicle communicates with a communication partner outside the vehicle or when a program for controlling the vehicle is executed. Number theoretic transformation is also called NTT (Number Theoretic Transform). The vehicle may be, for example, a motorcycle.
[0010] The arithmetic device 100 includes a CPU 10, a memory 20, a sorting unit 30, and an arithmetic unit 40. The memory 20 stores data included in data to be encrypted or decrypted by butterfly operations of number theoretic transformation. The memory 20 is also referred to as a storage unit.
[0011] The rearrangement unit 30 rearranges the data acquired from the memory 20 or the output data output from the calculation unit 40 (described later) in a predetermined order. Hereinafter, the data rearranged by the rearrangement unit 30 is referred to as rearranged data. That is, the rearrangement unit 30 generates the rearranged data. The rearrangement unit 30 is realized by a circuit such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit). The rearrangement unit 30 also buffers the rearranged data. The rearrangement unit 30 repeatedly inputs a part or all of the rearranged data to the calculation unit 40 as input data.
[0012] The arithmetic unit 40 includes a first arithmetic unit 41, a second arithmetic unit 42, a third arithmetic unit 43, and a fourth arithmetic unit 44. The first arithmetic unit 41 is configured to perform butterfly arithmetic of number theoretic transformation of two pieces of input data. The first arithmetic unit 41 is realized by a circuit such as an FPGA or an ASIC.
[0013] As shown in FIG. 2, the first arithmetic unit 41 includes a first input section 51, a second input section 52, a multiplier 53, a first output section 54, and a second output section 55. The first input section 51 receives first input data, which is one piece of input data. The second input section 52 receives second input data, which is one piece of input data different from the first input data. A predetermined coefficient is input to the multiplier 53. The multiplier 53 outputs a value obtained by multiplying the value input to the multiplier 53 by the predetermined coefficient. The first output section 54 outputs first output data, which is one piece of output data. The second output section 55 outputs second output data, which is one piece of output data different from the first output data.
[0014] The first output unit 54 outputs a value obtained by adding the first input data and the second input data as the first output data. The second output unit 55 outputs a value obtained by multiplying a value obtained by subtracting the second input data from the first input data by the coefficient input to the multiplier 53 as the second output data. That is, the first arithmetic unit 41 outputs the result of the butterfly operation performed between the value input to the first input unit 51, the value input to the second input unit 52, and the coefficient input to the multiplier 53 from the first output unit 54 and the second output unit 55. When a value A is input to the first input unit 51, a value B is input to the second input unit 52, and a coefficient C is input to the multiplier 53, the first output unit 54 outputs a value X, and the second output unit 55 outputs a value Y. Here, the values X and Y are expressed by the following formulas (1) and (2), respectively. X=A+B...Formula (1) Y = (AB) × C... formula (2)
[0015] The second arithmetic unit 42, the third arithmetic unit 43, and the fourth arithmetic unit 44 have the same configuration as the first arithmetic unit 41. Therefore, detailed description of these units will be omitted. In the following, when there is no need to distinguish between the arithmetic units, they will simply be referred to as arithmetic units 50. In this embodiment, the arithmetic section 40 includes four arithmetic units 50 in parallel.
[0016] In this embodiment, eight pieces of input data are input to the calculation section 40. The eight pieces of input data are input one by one to the first input section 51 and the second input section 52 of each calculation unit 50. The calculation section 40 outputs the same number of output data as the input data to the sorting section 30. The calculation section 40 outputs one piece of output data from each of the first output section 54 and the second output section 55 of each calculation unit 50.
[0017] In the following, a case where the arithmetic device 100 performs butterfly arithmetic of number theoretic transformation of eight data will be described. As shown in FIG. 3, in the butterfly arithmetic of number theoretic transformation of eight data, first, eight data A0 to A7 are calculated by butterfly arithmetic of eight data x0 to x7. Next, eight data B0 to B7 are calculated by butterfly arithmetic of eight data A0 to A7. Finally, eight data X0 to X7 are calculated by butterfly arithmetic of eight data B0 to B7. W8 shown in FIG. 3 is a primitive eighth root of 1 modulo P (P is a positive integer), and W4 is a primitive fourth root of 1 modulo Q (Q is a positive integer). x0 to x7 are data before number theoretic transformation, and X0 to X7 are data after number theoretic transformation. In this specification, the butterfly arithmetic of calculating eight data A0 to A7 from eight data x0 to x7 is also called the first-stage NTT butterfly arithmetic. The butterfly computation that calculates the eight pieces of data B0 to B7 from the eight pieces of data A0 to A7 is also called the second-stage NTT butterfly computation, and the butterfly computation that calculates the eight pieces of data X0 to X7 from the eight pieces of data B0 to B7 is also called the third-stage NTT butterfly computation.
[0018] 4, butterfly operations of number theoretic transformation of eight pieces of data are executed. The arithmetic device 100 executes the number theoretic transformation process, and thereby executes butterfly operations of number theoretic transformation of eight pieces of data by using the four arithmetic units 50 in a rotating manner.
[0019] In step S10 in Fig. 4, the rearrangement unit 30 acquires eight pieces of data on which the butterfly operation of the number theoretic transformation is performed from the memory 20. The rearrangement unit 30 acquires eight pieces of data, x0 to x7, shown in Fig. 3. The acquired data is arranged in the order of x0, x1, x2, x3, x4, x5, x6, and x7.
[0020] In step S20, the arithmetic device 100 executes the first stage of NTT butterfly computation processing. The first stage of NTT butterfly computation processing will be described below with reference to FIG.
[0021] 5, the rearrangement unit 30 rearranges the data acquired from the memory 20 in the bit-reversed order. Specifically, the rearrangement unit 30 rearranges the data arranged in the order of x0, x1, x2, x3, x4, x5, x6, x7 into the order of x0, x4, x2, x6, x1, x5, x3, x7. The rearrangement unit 30 buffers the rearranged data in the above-mentioned order.
[0022] In step S102, the rearrangement unit 30 inputs the eight rearranged data buffered in step S101 to the arithmetic unit 40. As shown in FIG. 8, the rearrangement unit 30 inputs x0 to the first input section 51 of the first arithmetic unit 41, x4 to the second input section 52 of the first arithmetic unit 41, x2 to the first input section 51 of the second arithmetic unit 42, x6 to the second input section 52 of the second arithmetic unit 42, x1 to the first input section 51 of the third arithmetic unit 43, x5 to the second input section 52 of the third arithmetic unit 43, x3 to the first input section 51 of the fourth arithmetic unit 44, and x7 to the second input section 52 of the fourth arithmetic unit 44. Also, in step S102, the multiplier 53 of the first arithmetic unit 41 is supplied with a coefficient W8 0 However, the multiplier 53 of the second arithmetic unit 42 has a coefficient W8 2 However, the multiplier 53 of the third arithmetic unit 43 has a coefficient W8 1 However, the multiplier 53 of the first arithmetic unit 41 has a coefficient W8 3 are input, respectively.
[0023] In step S103, each arithmetic unit 50 executes butterfly arithmetic between the value input to the first input unit 51, the value input to the second input unit 52, and the coefficient input to the multiplier 53, and outputs the result from the first output unit 54 and the second output unit 55. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, the second output unit 55 of the second arithmetic unit 42, the first output unit 54 of the third arithmetic unit 43, the second output unit 55 of the third arithmetic unit 43, the first output unit 54 of the fourth arithmetic unit 44, and the second output unit 55 of the fourth arithmetic unit 44 output A0, A4, A2, A6, A1, A5, A3, and A7 as output data to the sorting unit 30, respectively. As described above, the first-stage NTT butterfly arithmetic processing is executed.
[0024] In step S30 of Fig. 4, the arithmetic device 100 executes the second stage of NTT butterfly arithmetic processing. The second stage of NTT butterfly arithmetic processing will be described below with reference to Fig. 6.
[0025] In step S111 of Fig. 6, rearrangement unit 30 rearranges the output data output in step S103 of Fig. 5. Specifically, rearrangement unit 30 rearranges the output data arranged in the order of A0, A4, A2, A6, A1, A5, A3, A7 into the order of A0, A2, A1, A3, A4, A6, A5, A7. Rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0026] In step S112, the rearrangement unit 30 inputs the eight rearranged data buffered in step S111 to the arithmetic unit 40. As shown in Fig. 8, the rearrangement unit 30 inputs A0 to the first input section 51 of the first arithmetic unit 41, A2 to the second input section 52 of the first arithmetic unit 41, A1 to the first input section 51 of the second arithmetic unit 42, A3 to the second input section 52 of the second arithmetic unit 42, A4 to the first input section 51 of the third arithmetic unit 43, A6 to the second input section 52 of the third arithmetic unit 43, A5 to the first input section 51 of the fourth arithmetic unit 44, and A7 to the second input section 52 of the seventh arithmetic unit. Also, in step S112, the multipliers 53 of the first arithmetic unit 41 and the third arithmetic unit 43 are supplied with a coefficient W4. 0 However, the multipliers 53 of the second arithmetic unit 42 and the fourth arithmetic unit 44 are supplied with the coefficient W4 1 are input, respectively.
[0027] In step S113, each calculation unit 50 executes a butterfly calculation. The first output unit 54 of the first calculation unit 41, the second output unit 55 of the first calculation unit 41, the first output unit 54 of the second calculation unit 42, the second output unit 55 of the second calculation unit 42, the first output unit 54 of the third calculation unit 43, the second output unit 55 of the third calculation unit 43, the first output unit 54 of the fourth calculation unit 44, and the second output unit 55 of the fourth calculation unit 44 output B0, B2, B1, B3, B4, B6, B5, and B7 as output data to the sorting unit 30, respectively. As described above, the second-stage NTT butterfly calculation process is executed.
[0028] In step S40 of Fig. 4, the calculation device 100 executes the third stage of NTT butterfly calculation processing. The third stage of NTT butterfly calculation processing will be described below with reference to Fig. 7.
[0029] In step S121 of Fig. 7, rearrangement unit 30 rearranges the output data output in step S113 of Fig. 6. Specifically, rearrangement unit 30 rearranges the output data arranged in the order of B0, B2, B1, B3, B4, B6, B5, B7 into the order of B0, B1, B2, B3, B4, B5, B6, B7. Rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0030] In step S122, the rearrangement unit 30 inputs the eight rearranged data buffered in step S121 to the arithmetic unit 40. As shown in Fig. 8, the rearrangement unit 30 inputs B0 to the first input section 51 of the first arithmetic unit 41, B1 to the second input section 52 of the first arithmetic unit 41, B2 to the first input section 51 of the second arithmetic unit 42, B3 to the second input section 52 of the second arithmetic unit 42, B4 to the first input section 51 of the third arithmetic unit 43, B5 to the second input section 52 of the third arithmetic unit 43, B6 to the first input section 51 of the fourth arithmetic unit 44, and B7 to the second input section 52 of the seventh arithmetic unit. Also, in step S122, the coefficient 1 is input to the multipliers 53 of all the arithmetic units 50.
[0031] In step S123, each arithmetic unit 50 executes a butterfly calculation. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, the second output unit 55 of the second arithmetic unit 42, the first output unit 54 of the third arithmetic unit 43, the second output unit 55 of the third arithmetic unit 43, the first output unit 54 of the fourth arithmetic unit 44, and the second output unit 55 of the fourth arithmetic unit 44 output X0, X4, X2, X6, X1, X5, X3, and X7 as output data to the sorting unit 30, respectively. As described above, the third-stage NTT butterfly calculation process is executed.
[0032] In step S50 of Fig. 4, the CPU 10 stores the output data output from the arithmetic unit 40 in step S123 of Fig. 7 in the memory 20. As described above, the number theoretic transformation process is executed.
[0033] The arithmetic device 100 performs number theoretic transformation processing when the vehicle communicates with a communication device outside the vehicle, when a program for controlling the vehicle is executed, when devices mounted on the vehicle communicate with each other, etc.
[0034] Specifically, the arithmetic device 100 executes a number-theoretic conversion process when the vehicle transmits and receives information to and from a communication device, such as a server or a smartphone, installed outside the vehicle via the Internet. The above-mentioned information is data for updating a control program of the vehicle, data for unlocking a door of the vehicle, and the like. In this case, data included in authentication data for verifying the legitimacy of a communication device located outside the vehicle is input as input data to the arithmetic unit 40. The authentication data for verifying the legitimacy of a communication device located outside the vehicle is, for example, data that proves that a communication device, such as a server or a smartphone, with which the vehicle intends to communicate is really the communication device with which the vehicle intends to communicate. The arithmetic device 100 executes a number-theoretic conversion process to decrypt, for example, the encrypted authentication data.
[0035] Furthermore, the arithmetic device 100 executes a number theoretic transformation process, for example, when the vehicle executes a program that controls the operation of the vehicle, such as starting and stopping the vehicle. In this case, data included in authentication data for verifying the validity of the program executed by the vehicle is input as input data to the arithmetic unit 40. The authentication data for verifying the validity of the program executed by the vehicle is, for example, data that proves that the program executed by the vehicle is a legitimate program created by a trusted creator. The arithmetic device 100 executes the number theoretic transformation process to, for example, decrypt the encrypted authentication data.
[0036] The arithmetic device 100 also performs number theoretic conversion processing when ECUs (Electronic Control Units) mounted on a vehicle, such as an ECU that controls the driving force of the vehicle and an ECU that controls the brakes of the vehicle, communicate with each other. In this case, data included in authentication data for verifying the legitimacy of a device such as an ECU mounted on a vehicle is input as input data to the arithmetic unit 40. The authentication data for verifying the legitimacy of a device is, for example, data that proves that another device with which a device is to communicate is really the device with which the device is to communicate. The arithmetic device 100 encrypts or decrypts the authentication data by performing number theoretic conversion processing.
[0037] According to the first embodiment described above, the arithmetic device 100 executes the number theoretic transformation process, repeatedly using the same arithmetic unit 50 to perform butterfly operations, and executes the butterfly operations of the number theoretic transformation of eight data. Therefore, the arithmetic device 100 can execute the number theoretic transformation with a small hardware resource. Therefore, the arithmetic device 100 capable of executing the number theoretic transformation can be miniaturized, and can be easily incorporated into a vehicle.
[0038] In this embodiment, the input data input to the arithmetic unit 40 is data included in the data to be encrypted or decrypted by number theoretic transformation. Therefore, the arithmetic device 100 can encrypt or decrypt data by executing the butterfly operation of the number theoretic transformation.
[0039] In addition, in this embodiment, the arithmetic device 100 executes a number theoretic transformation process when the vehicle communicates with a communication device outside the vehicle. For example, the arithmetic device 100 inputs data included in authentication data for verifying the legitimacy of the communication device outside the vehicle as input data to the arithmetic unit 40, and decrypts the encrypted authentication data. Therefore, it is possible to confirm whether the communication device outside the vehicle is a legitimate communication device.
[0040] In addition, in this embodiment, the arithmetic device 100 executes a number theoretic transformation process when the vehicle executes a program that controls the vehicle. For example, the arithmetic device 100 inputs data included in authentication data for verifying the validity of the program executed by the vehicle as input data to the arithmetic unit 40, and decrypts the encrypted authentication data. Therefore, it is possible to confirm whether the program executed by the vehicle is a legitimate program.
[0041] In addition, in this embodiment, the arithmetic device 100 executes a number theoretic transformation process when devices mounted on a vehicle communicate with each other. The arithmetic device 100 inputs data included in authentication data for verifying the legitimacy of the device mounted on the vehicle as input data to the arithmetic unit 40, and encrypts the authentication data or decrypts the encrypted authentication data. Therefore, it is possible to confirm whether or not another device with which a device is to communicate is a legitimate device.
[0042] In this embodiment, the rearrangement unit 30 and the arithmetic unit 50 are realized by circuits such as FPGA and ASIC. Therefore, the butterfly operations of the number theoretic transformation can be performed at higher speeds than when the CPU 10 functions as the rearrangement unit 30 and the arithmetic unit 40 by executing a program stored in the memory 20.
[0043] B. Second embodiment: As shown in FIG. 9, in the second embodiment, the calculation unit 40 includes a first calculation unit 41 and a second calculation unit 42. That is, the calculation unit 40 includes two calculation units 50 in parallel. The configuration of each part of the calculation device 100 other than the calculation unit 40 is the same as that of the first embodiment. In the second embodiment, the calculation device 100 executes a butterfly calculation of number theoretic transformation of eight pieces of data by executing a number theoretic transformation process, reusing two calculation units 50. In the second embodiment, the first stage NTT butterfly calculation process, the second stage NTT butterfly calculation process, and the third stage NTT butterfly calculation process are different from those of the first embodiment. In the first stage NTT butterfly calculation process in the second embodiment shown in FIG. 10, the parts that execute the same process as the first stage NTT butterfly calculation process in the first embodiment shown in FIG. 5 are denoted by the same reference numerals, and the description thereof will be omitted.
[0044] 10, the rearrangement unit 30 inputs four pieces of data among the rearranged data buffered in step S101 to the calculation unit 40. As shown in FIG 13, the rearrangement unit 30 inputs x0 to the first input section 51 of the first calculation unit 41, inputs x4 to the second input section 52 of the first calculation unit 41, inputs x2 to the first input section 51 of the second calculation unit 42, and inputs x6 to the second input section 52 of the second calculation unit 42. Also, in step S202, the multiplier 53 of the first calculation unit 41 inputs a coefficient W8 0 However, the multiplier 53 of the second arithmetic unit 42 has a coefficient W8 2 are input, respectively.
[0045] In step S203, each arithmetic unit 50 executes a butterfly operation. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, and the second output unit 55 of the second arithmetic unit 42 output A0, A4, A2, and A6 to the sorting unit 30 as output data, respectively.
[0046] In step S204, the rearrangement section 30 buffers the output data output in step S203.
[0047] In step S205, rearrangement section 30 inputs, to calculation section 40, the four pieces of data that were not input to calculation section 40 in step S202, among the rearranged data buffered in step S101. As shown in Fig. 13, rearrangement section 30 inputs x1 to the first input section 51 of first calculation unit 41, inputs x5 to the second input section 52 of first calculation unit 41, inputs x3 to the first input section 51 of second calculation unit 42, and inputs x7 to the second input section 52 of second calculation unit 42. Also, in step S205, coefficient W8 is input to multiplier 53 of first calculation unit 41. 1 However, the multiplier 53 of the second arithmetic unit 42 has a coefficient W8 3 are input, respectively.
[0048] In step S206, each arithmetic unit 50 executes a butterfly operation. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, and the second output unit 55 of the second arithmetic unit 42 output A1, A5, A3, and A7 to the sorting unit 30 as output data, respectively.
[0049] In step S207, rearrangement section 30 buffers the output data output in step S206. As described above, the first stage of NTT butterfly computation processing is executed.
[0050] In step S211 in Fig. 11, rearrangement unit 30 rearranges the output data buffered in step S204 and step S207 in Fig. 10. Specifically, rearrangement unit 30 rearranges the output data arranged in the order of A0, A4, A2, A6, A1, A5, A3, A7 into the order of A0, A2, A1, A3, A4, A6, A5, A7. Rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0051] In step S212, rearrangement section 30 inputs four pieces of the rearranged data buffered in step S211 to calculation section 40. As shown in Fig. 13, rearrangement section 30 inputs A0 to the first input section 51 of first calculation unit 41, inputs A2 to the second input section 52 of first calculation unit 41, inputs A1 to the first input section 51 of second calculation unit 42, and inputs A3 to the second input section 52 of second calculation unit 42. Also, in step S212, coefficient W4 is input to multiplier 53 of first calculation unit 41. 0 However, the multiplier 53 of the second arithmetic unit 42 has a coefficient W4 1 are input, respectively.
[0052] In step S213, each arithmetic unit 50 executes a butterfly operation. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, and the second output unit 55 of the second arithmetic unit 42 output B0, B2, B1, and B3 to the sorting unit 30 as output data, respectively.
[0053] In step S214, the rearrangement section 30 buffers the output data output in step S213.
[0054] In step S215, rearrangement unit 30 inputs, to calculation unit 40, the four pieces of data that were not input to calculation unit 40 in step S212, among the rearranged data buffered in step S211. As shown in Fig. 13, rearrangement unit 30 inputs A4 to the first input section 51 of first calculation unit 41, A6 to the second input section 52 of first calculation unit 41, A5 to the first input section 51 of second calculation unit 42, and A7 to the second input section 52 of second calculation unit 42. Also, in step S215, coefficient W4 is input to multiplier 53 of first calculation unit 41. 0 However, the multiplier 53 of the second arithmetic unit 42 has a coefficient W4 1 are input, respectively.
[0055] In step S216, each arithmetic unit 50 executes a butterfly operation. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, and the second output unit 55 of the second arithmetic unit 42 output B4, B6, B5, and B7 to the rearrangement unit 30 as output data, respectively.
[0056] In step S217, rearrangement section 30 buffers the output data output in step S216. As described above, the second stage of NTT butterfly computation processing is executed.
[0057] In step S221 of Fig. 12, rearrangement unit 30 rearranges the output data buffered in step S214 and step S217 of Fig. 11. Specifically, rearrangement unit 30 rearranges the output data arranged in the order of B0, B2, B1, B3, B4, B6, B5, B7 into the order of B0, B1, B2, B3, B4, B5, B6, B7. Rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0058] 13, rearrangement unit 30 inputs B0 to the first input unit 51 of the first arithmetic unit 41, inputs B1 to the second input unit 52 of the first arithmetic unit 41, inputs B2 to the first input unit 51 of the second arithmetic unit 42, and inputs B3 to the second input unit 52 of the second arithmetic unit 42. Also, in step S222, coefficient 1 is input to multipliers 53 of the first arithmetic unit 41 and the second arithmetic unit 42.
[0059] In step S223, each arithmetic unit 50 executes a butterfly operation. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, and the second output unit 55 of the second arithmetic unit 42 output X0, X4, X2, and X6 to the rearrangement unit 30 as output data, respectively.
[0060] In step S224, the rearrangement section 30 buffers the output data output in step S223.
[0061] In step S225, rearrangement unit 30 inputs, to calculation unit 40, the four pieces of data that were not input to calculation unit 40 in step S222, among the rearranged data buffered in step S221. Rearrangement unit 30 inputs B4 to the first input unit 51 of the first calculation unit 41, inputs B5 to the second input unit 52 of the first calculation unit 41, inputs B6 to the first input unit 51 of the second calculation unit 42, and inputs B7 to the second input unit 52 of the second calculation unit 42, as shown in Fig. 13. Also, in step S225, coefficient 1 is input to multipliers 53 of the first calculation unit 41 and the second calculation unit 42.
[0062] In step S226, each arithmetic unit 50 executes a butterfly operation. The first output unit 54 of the first arithmetic unit 41, the second output unit 55 of the first arithmetic unit 41, the first output unit 54 of the second arithmetic unit 42, and the second output unit 55 of the second arithmetic unit 42 output X1, X5, X3, and X7 to the sorting unit 30 as output data, respectively.
[0063] In step S227, rearrangement section 30 buffers the output data output in step S226. As described above, the third stage of NTT butterfly computation processing is executed.
[0064] In the second embodiment, in step S50 of the number theoretic transformation process shown in FIG. 4, the CPU 10 stores in the memory 20 the output data buffered in steps S224 and S227 in FIG.
[0065] According to the second embodiment described above, the arithmetic device 100 executes the number theoretic transformation process, repeatedly using the same arithmetic unit 50 to perform butterfly operations, and executes the butterfly operations of the number theoretic transformation of eight data. Therefore, the arithmetic device 100 can execute the number theoretic transformation with a small amount of hardware resources. Therefore, the arithmetic device 100 capable of executing the number theoretic transformation can be easily incorporated into a vehicle.
[0066] C. Third embodiment: As shown in FIG. 14, in the third embodiment, the arithmetic unit 40 includes a first arithmetic unit 41. That is, the arithmetic unit 40 includes one arithmetic unit 50. The configuration of each part of the arithmetic device 100 other than the arithmetic unit 40 is the same as that of the first embodiment. In the third embodiment, the arithmetic device 100 executes a butterfly operation of number theoretic transformation of eight pieces of data by executing a number theoretic transformation process, reusing one arithmetic unit 50. In the third embodiment, the first stage NTT butterfly operation process, the second stage NTT butterfly operation process, and the third stage NTT butterfly operation process are different from those of the first embodiment. In the first stage NTT butterfly operation process in the third embodiment shown in FIG. 15, the parts that execute the same process as the first stage NTT butterfly operation process in the first embodiment shown in FIG. 5 are denoted by the same reference numerals, and the description thereof will be omitted.
[0067] 15, the rearrangement unit 30 inputs two pieces of data among the rearranged data buffered in step S101 to the calculation unit 40. As shown in FIG 18, the rearrangement unit 30 inputs x0 to the first input section 51 of the first calculation unit 41 and inputs x4 to the second input section 52 of the first calculation unit 41. Also, in step S302, the coefficient W8 is input to the multiplier 53 of the first calculation unit 41. 0 is entered.
[0068] In step S303, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output A0 and A4 to the rearrangement section 30 as output data, respectively.
[0069] In step S304, the rearrangement section 30 buffers the output data output in step S303.
[0070] In step S305, rearrangement unit 30 inputs, to calculation unit 40, two pieces of data that were not input to calculation unit 40 in step S302, among the rearranged data buffered in step S101. As shown in Fig. 18, rearrangement unit 30 inputs x2 to the first input section 51 of first calculation unit 41, and inputs x6 to the second input section 52 of first calculation unit 41. Also, in step S305, coefficient W8 is input to multiplier 53 of first calculation unit 41. 2 is entered.
[0071] In step S306, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output A2 and A6 to the rearrangement section 30 as output data, respectively.
[0072] In step S307, rearrangement section 30 buffers the output data output in step S306.
[0073] In step S308, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in steps S302 and S305, among the rearranged data buffered in step S101. Rearrangement unit 30 inputs x1 to the first input section 51 of first calculation unit 41, and inputs x5 to the second input section 52 of first calculation unit 41, as shown in Fig. 18. Also, in step S308, coefficient W8 is input to multiplier 53 of first calculation unit 41. 1 is entered.
[0074] In step S309, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output A1 and A5 to the rearrangement section 30 as output data, respectively.
[0075] In step S310, rearrangement section 30 buffers the output data output in step S309.
[0076] In step S311, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in steps S302, S305, and S308, among the rearranged data buffered in step S101. Rearrangement unit 30 inputs x3 to the first input section 51 of first calculation unit 41, and inputs x7 to the second input section 52 of first calculation unit 41, as shown in Fig. 18. Also, in step S311, coefficient W8 is input to multiplier 53 of first calculation unit 41. 3 is entered.
[0077] In step S312, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output A3 and A7 to the rearrangement section 30 as output data, respectively.
[0078] In step S313, rearrangement section 30 buffers the output data output in step S312. As described above, the first stage of NTT butterfly computation processing is executed.
[0079] In step S321 in Fig. 16, rearrangement unit 30 rearranges the output data buffered in steps S304, S307, S310, and S313 in Fig. 15. Specifically, rearrangement unit 30 rearranges the output data arranged in the order of A0, A4, A2, A6, A1, A5, A3, A7 into the order of A0, A2, A1, A3, A4, A6, A5, A7. Rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0080] In step S322, the rearrangement unit 30 inputs two pieces of data among the rearranged data buffered in step S321 to the calculation unit 40. As shown in Fig. 18, the rearrangement unit 30 inputs A0 to the first input section 51 of the first calculation unit 41 and inputs A2 to the second input section 52 of the first calculation unit 41. Also, in step S322, the multiplier 53 of the first calculation unit 41 inputs a coefficient W4 0 is entered.
[0081] In step S323, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output B0 and B2 to the rearrangement section 30 as output data, respectively.
[0082] In step S324, the sorting section 30 buffers the output data output in step S333.
[0083] In step S325, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in step S322, among the rearranged data buffered in step S321. Rearrangement unit 30 inputs A1 to the first input section 51 of first calculation unit 41, and inputs A3 to the second input section 52 of first calculation unit 41, as shown in Fig. 18. Also, in step S325, coefficient W4 is input to multiplier 53 of first calculation unit 41. 1 is entered.
[0084] In step S326, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output B1 and B3 to the rearrangement section 30 as output data, respectively.
[0085] In step S327, the sorting section 30 buffers the output data output in step S326.
[0086] In step S328, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in steps S322 and S325, among the rearranged data buffered in step S321. Rearrangement unit 30 inputs A4 to the first input section 51 of first calculation unit 41, and inputs A6 to the second input section 52 of first calculation unit 41, as shown in Fig. 18. Also, in step S328, coefficient W4 is input to multiplier 53 of first calculation unit 41. 0 is entered.
[0087] In step S329, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output B4 and B6 to the rearrangement section 30 as output data, respectively.
[0088] In step S330, rearrangement section 30 buffers the output data output in step S329.
[0089] In step S331, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in steps S322, S325, and S328, among the rearranged data buffered in step S321. Rearrangement unit 30 inputs A5 to the first input section 51 of first calculation unit 41, and inputs A7 to the second input section 52 of first calculation unit 41, as shown in Fig. 18. Also, in step S331, coefficient W4 is input to multiplier 53 of first calculation unit 41. 1 is entered.
[0090] In step S332, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output B5 and B7 to the rearrangement section 30 as output data, respectively.
[0091] In step S333, rearrangement section 30 buffers the output data output in step S332. As described above, the second stage of NTT butterfly computation processing is executed.
[0092] In step S341 in Fig. 17, rearrangement unit 30 rearranges the output data buffered in steps S324, S327, S330, and S333 in Fig. 16. Specifically, rearrangement unit 30 rearranges the output data arranged in the order of B0, B2, B1, B3, B4, B6, B5, and B7 into the order of B0, B1, B2, B3, B4, B5, B6, and B7. Rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0093] In step S342, rearrangement unit 30 inputs two pieces of data among the rearranged data buffered in step S341 to calculation unit 40. As shown in Fig. 18, rearrangement unit 30 inputs B0 to the first input unit 51 of the first calculation unit 41, and inputs B1 to the second input unit 52 of the first calculation unit 41. Also, in step S342, coefficient 1 is input to multiplier 53 of the first calculation unit 41.
[0094] In step S343, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output X0 and X4 to the rearrangement section 30 as output data, respectively.
[0095] In step S344, rearrangement section 30 buffers the output data output in step S343.
[0096] In step S345, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in step S342, out of the rearranged data buffered in step S341. Rearrangement unit 30 inputs B2 to the first input section 51 of the first calculation unit 41, and inputs B3 to the second input section 52 of the first calculation unit 41, as shown in Fig. 18. Also, in step S345, coefficient 1 is input to multiplier 53 of the first calculation unit 41.
[0097] In step S346, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output X2 and X6 to the rearrangement section 30 as output data, respectively.
[0098] In step S347, rearrangement section 30 buffers the output data output in step S346.
[0099] In step S348, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in steps S342 and S345, out of the rearranged data buffered in step S341. Rearrangement unit 30 inputs B4 to the first input unit 51 of the first calculation unit 41, and inputs B5 to the second input unit 52 of the first calculation unit 41, as shown in Fig. 18. Also, in step S348, coefficient 1 is input to multiplier 53 of the first calculation unit 41.
[0100] In step S349, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output X1 and X5 to the rearrangement section 30 as output data, respectively.
[0101] In step S350, rearrangement section 30 buffers the output data output in step S349.
[0102] In step S351, rearrangement unit 30 inputs to calculation unit 40 two pieces of data that were not input to calculation unit 40 in steps S342, S345, and S348, out of the rearranged data buffered in step S341. Rearrangement unit 30 inputs B6 to the first input section 51 of the first calculation unit 41, and inputs B7 to the second input section 52 of the first calculation unit 41, as shown in Fig. 18. Also, in step S351, coefficient 1 is input to multiplier 53 of the first calculation unit 41.
[0103] In step S352, the first arithmetic unit 41 executes a butterfly calculation. The first output section 54 and the second output section 55 of the first arithmetic unit 41 output X3 and X7 to the rearrangement section 30 as output data, respectively.
[0104] In step S353, rearrangement section 30 buffers the output data output in step S354. As described above, the third stage of NTT butterfly computation processing is executed.
[0105] In the third embodiment, in step S50 of the number theoretic transformation process shown in FIG. 4, the CPU 10 stores in the memory 20 the output data buffered in steps S344, S347, S350, and S353 in FIG.
[0106] According to the third embodiment described above, the arithmetic device 100 executes the number theoretic transformation process, repeatedly using the same arithmetic unit 50 to perform butterfly operations, and executes the butterfly operations of the number theoretic transformation of eight data. Therefore, the arithmetic device 100 can execute the number theoretic transformation with a small amount of hardware resources. Therefore, the arithmetic device 100 capable of executing the number theoretic transformation can be easily incorporated into a vehicle.
[0107] D. Fourth embodiment: In the fourth embodiment, the configuration of the arithmetic unit 50b is different from that of the first embodiment. The configuration of each part of the arithmetic device 100 other than the arithmetic unit 50b is the same as that of the first embodiment. In the fourth embodiment, the arithmetic unit 50b is configured to be able to execute butterfly operations of number theoretic transformation and inverse number theoretic transformation. Inverse number theoretic transformation is also called INTT (Inverse Number Theoretic Transform). The memory 20 stores data included in data to be encrypted or decrypted by butterfly operations of number theoretic transformation, and data included in data to be encrypted or decrypted by butterfly operations of inverse number theoretic transformation. The arithmetic device 100 decrypts data encrypted by number theoretic transformation by performing butterfly operations of inverse number theoretic transformation. In addition, the arithmetic device 100 decrypts data encrypted by inverse number theoretic transformation by performing butterfly operations of number theoretic transformation.
[0108] As shown in FIG. 19, the arithmetic unit 50b of the fourth embodiment includes a first input section 51, a second input section 52, a first output section 54, a second output section 55, a multiplier 56, a first shift arithmetic section 57, and a second shift arithmetic section 58.
[0109] A predetermined coefficient C is input to the multiplier 56. The multiplier 56 has a selector and outputs either the value input to the multiplier 56 or a value obtained by multiplying the value input to the multiplier 56 by the coefficient C. The multiplier 56 is provided so as to be able to select the position at which the multiplication included in the butterfly computation is performed. The multiplier 56 includes a multiplier first input unit 61, a multiplier first output unit 62, a multiplier second input unit 63, and a multiplier second output unit 64.
[0110] The first shift calculation unit 57 selectively outputs a value input to the first shift calculation unit 57 or a value obtained by performing a shift calculation on the value input to the first shift calculation unit 57. The first shift calculation unit 57 is provided so as to be able to output a value obtained by multiplying the value input to the first shift calculation unit 57 by a coefficient D by performing a shift calculation. Here, the coefficient D is the kth power of 2 (k is an integer). The second shift calculation unit 58 selectively outputs a value input to the second shift calculation unit 58 or a value obtained by performing a shift calculation on the value input to the second shift calculation unit 58. The second shift calculation unit 58 is provided so as to be able to output a value obtained by multiplying the value input to the second shift calculation unit 58 by a coefficient E by performing a shift calculation. Here, the coefficient E is the kth power of 2. The first shift calculation unit 57 and the second shift calculation unit 58 are collectively referred to as shift calculation units.
[0111] In the following, a case where the arithmetic unit 50b performs butterfly arithmetic of number theoretic transformation of two input data will be described. When a value A is input to the first input unit 51 and a value B is input to the second input unit 52, the value B is input to the multiplier first input unit 61. The multiplier first output unit 62 outputs the value B. The multiplier second input unit 63 receives a value (AB). The multiplier second output unit 64 outputs the value (AB)×C. The shift operation unit outputs the value input to the shift operation unit. In this case, the value X and the value Y output by the arithmetic unit 50b are expressed by the above-mentioned formulas (1) and (2), respectively. That is, the multiplier 56 performs the multiplication included in the butterfly arithmetic immediately before the output data is output. In the fourth embodiment, the arithmetic device 100 performs butterfly arithmetic of number theoretic transformation of eight data in the same manner as the number theoretic transformation process of the first embodiment shown in FIG. 4.
[0112] In the following, a case where the arithmetic unit 50b performs butterfly arithmetic of reciprocal theoretic transformation of two input data will be described. When a value A is input to the first input unit 51 and a value B is input to the second input unit 52, the value B is input to the multiplier first input unit 61. The multiplier first output unit 62 outputs a value (B×C). The multiplier second input unit 63 receives a value (A-(B×C)). The multiplier second output unit 64 outputs a value (A-(B×C)). The shift arithmetic unit outputs a value obtained by performing a shift arithmetic on the value input to the shift arithmetic unit. In this case, the values X and Y output by the arithmetic unit 50b are expressed by the following formulas (3) and (4), respectively. That is, the multiplier 56 performs the multiplication included in the butterfly arithmetic immediately after the input data is input. X=(A+(B×C))×D...Equation (3) Y = (A-(B×C))×E (4)
[0113] In the following, a case where the arithmetic device 100 performs butterfly arithmetic of reciprocal number theoretic transformation of eight data will be described. As shown in FIG. 20, in the butterfly arithmetic of reciprocal number theoretic transformation of eight data, first, eight data items C0 to C7 are calculated by butterfly arithmetic of eight data items X0 to X7. Next, eight data items D0 to D7 are calculated by butterfly arithmetic of eight data items C0 to C7. Finally, eight data items x0 to x7 are calculated by butterfly arithmetic of eight data items D0 to D7. X0 to X7 are data items before reciprocal number theoretic transformation, and x0 to x7 are data items after reciprocal number theoretic transformation. In other words, x0 to x7 are data items before number theoretic transformation, and X0 to X7 are data items after number theoretic transformation. In this specification, the butterfly arithmetic of calculating eight data items C0 to C7 from eight data items X0 to X7 is also referred to as the first-stage INTT butterfly arithmetic. Moreover, the butterfly calculation that calculates the eight pieces of data D0 to D7 from the eight pieces of data C0 to C7 is also called the second-stage INTT butterfly calculation, and the butterfly calculation that calculates the eight pieces of data x0 to x7 from the eight pieces of data D0 to D7 is also called the third-stage INTT butterfly calculation.
[0114] 21, butterfly operations for reciprocal number theoretic transformation of eight pieces of data are executed. The arithmetic device 100 executes the reciprocal number theoretic transformation of eight pieces of data by using the four arithmetic units 50b in a rotating manner.
[0115] In step S410 in Fig. 21, the rearrangement unit 30 acquires eight pieces of data on which the butterfly operation of the reciprocal transform is performed from the memory 20. The rearrangement unit 30 acquires eight pieces of data, X0 to X7, shown in Fig. 20. The acquired data is arranged in the order of X0, X4, X2, X6, X1, X5, X3, and X7.
[0116] In step S420, the arithmetic device 100 executes the first stage of the INTT butterfly calculation process. The first stage of the INTT butterfly calculation process will be described below with reference to FIG.
[0117] In step S501 of FIG. 22, the rearrangement section 30 buffers the data acquired from the memory 20.
[0118] In step S502, the rearrangement unit 30 inputs the data buffered in step S501 to the arithmetic unit 40. As shown in FIG. 25, the rearrangement unit 30 inputs X0 to the first input section 51 of the first arithmetic unit 41, inputs X4 to the second input section 52 of the first arithmetic unit 41, inputs X2 to the first input section 51 of the second arithmetic unit 42, inputs X6 to the second input section 52 of the second arithmetic unit 42, inputs X1 to the first input section 51 of the third arithmetic unit 43, inputs X5 to the second input section 52 of the third arithmetic unit 43, inputs X3 to the first input section 51 of the fourth arithmetic unit 44, and inputs X7 to the second input section 52 of the seventh arithmetic unit. Also, in step S502, the coefficient 1 is input to the multipliers 56 of all the arithmetic units 50b. The shift arithmetic unit does not execute a shift operation. That is, the shift operation unit outputs a value obtained by multiplying the input value by a coefficient 1.
[0119] In step S503, each arithmetic unit 50b executes a butterfly calculation. The first output section 54 of the first arithmetic unit 41, the second output section 55 of the first arithmetic unit 41, the first output section 54 of the second arithmetic unit 42, the second output section 55 of the second arithmetic unit 42, the first output section 54 of the third arithmetic unit 43, the second output section 55 of the third arithmetic unit 43, the first output section 54 of the fourth arithmetic unit 44, and the second output section 55 of the fourth arithmetic unit 44 output C0, C1, C2, C3, C4, C5, C6, and C7 as output data to the sorting section 30, respectively. As described above, the first-stage INTT butterfly calculation process is executed.
[0120] In step S430 in Fig. 21, the arithmetic device 100 executes the second stage of the INTT butterfly calculation process. The second stage of the INTT butterfly calculation process will be described below with reference to Fig. 23.
[0121] In step S511 in Fig. 23, the rearrangement unit 30 rearranges the output data output in step S503 in Fig. 22. Specifically, the rearrangement unit 30 rearranges the output data arranged in the order of C0, C1, C2, C3, C4, C5, C6, and C7 into the order of C0, C2, C1, C3, C4, C6, C5, and C7. The rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0122] In step S512, the rearrangement unit 30 inputs the eight rearranged data buffered in step S511 to the arithmetic unit 40. As shown in FIG. 25, the rearrangement unit 30 inputs C0 to the first input section 51 of the first arithmetic unit 41, inputs C2 to the second input section 52 of the first arithmetic unit 41, inputs C1 to the first input section 51 of the second arithmetic unit 42, inputs C3 to the second input section 52 of the second arithmetic unit 42, inputs C4 to the first input section 51 of the third arithmetic unit 43, inputs C6 to the second input section 52 of the third arithmetic unit 43, inputs C5 to the first input section 51 of the fourth arithmetic unit 44, and inputs C7 to the second input section 52 of the seventh arithmetic unit. Also, in step S512, the multipliers 56 of the first arithmetic unit 41 and the third arithmetic unit 43 are supplied with a coefficient W4.0 However, the multipliers 56 of the second arithmetic unit 42 and the fourth arithmetic unit 44 are supplied with the coefficient W4 -1 are input, respectively. The shift operation unit does not execute a shift operation.
[0123] In step S513, each arithmetic unit 50b executes a butterfly calculation. The first output section 54 of the first arithmetic unit 41, the second output section 55 of the first arithmetic unit 41, the first output section 54 of the second arithmetic unit 42, the second output section 55 of the second arithmetic unit 42, the first output section 54 of the third arithmetic unit 43, the second output section 55 of the third arithmetic unit 43, the first output section 54 of the fourth arithmetic unit 44, and the second output section 55 of the fourth arithmetic unit 44 output D0, D2, D1, D3, D4, D6, D5, and D7 as output data to the sorting section 30, respectively. As described above, the second-stage INTT butterfly calculation process is executed.
[0124] In step S440 in Fig. 21, the arithmetic device 100 executes the third-stage INTT butterfly calculation process. The third-stage INTT butterfly calculation process will be described below with reference to Fig. 24.
[0125] In step S521 of Fig. 24, the rearrangement unit 30 rearranges the output data output in step S513 of Fig. 23. Specifically, the rearrangement unit 30 rearranges the output data arranged in the order of D0, D2, D1, D3, D4, D6, D5, and D7 into the order of D0, D4, D2, D6, D1, D5, D3, and D7. The rearrangement unit 30 buffers the rearranged data rearranged in the above-mentioned order.
[0126] In step S522, the rearrangement unit 30 inputs the eight rearranged data buffered in step S521 to the arithmetic unit 40. As shown in FIG. 25, the rearrangement unit 30 inputs D0 to the first input section 51 of the first arithmetic unit 41, D4 to the second input section 52 of the first arithmetic unit 41, D2 to the first input section 51 of the second arithmetic unit 42, D6 to the second input section 52 of the second arithmetic unit 42, D1 to the first input section 51 of the third arithmetic unit 43, D5 to the second input section 52 of the third arithmetic unit 43, D3 to the first input section 51 of the fourth arithmetic unit 44, and D7 to the second input section 52 of the fourth arithmetic unit 44. Also, in step S522, the multiplier 56 of the first arithmetic unit 41 is supplied with a coefficient W8 0 However, the multiplier 56 of the second arithmetic unit 42 has a coefficient W8 -2 However, the multiplier 56 of the third arithmetic unit 43 has a coefficient W8 -1 However, the multiplier 56 of the first arithmetic unit 41 has a coefficient W8 -3 are input. The shift operation unit executes the shift operation. The shift operation unit outputs the value obtained by multiplying the input value by 1 / 8.
[0127] In step S523, each arithmetic unit 50b executes a butterfly arithmetic operation. The first output section 54 of the first arithmetic unit 41, the second output section 55 of the first arithmetic unit 41, the first output section 54 of the second arithmetic unit 42, the second output section 55 of the second arithmetic unit 42, the first output section 54 of the third arithmetic unit 43, the second output section 55 of the third arithmetic unit 43, the first output section 54 of the fourth arithmetic unit 44, and the second output section 55 of the fourth arithmetic unit 44 output x0, x4, x2, x6, x1, x5, x3, and x7 to the sorting section 30 as output data, respectively.
[0128] In step S524, rearrangement unit 30 rearranges the output data output in step S523. Specifically, rearrangement unit 30 rearranges the output data arranged in the order of x0, x4, x2, x6, x1, x5, x3, x7 into the order of x0, x1, x2, x3, x4, x5, x6, x7. As described above, the third-stage NTT butterfly computation process is executed.
[0129] In step S450 in Fig. 21, the CPU 10 stores the rearranged data rearranged by the rearrangement section 30 in step S524 in Fig. 24 in the memory 20. As described above, the reciprocal theoretic transformation process is executed.
[0130] According to the fourth embodiment described above, the arithmetic device 100 executes the butterfly operation of the reciprocal number theoretic transformation of eight data by repeatedly using the same arithmetic unit 50b by executing the reciprocal number theoretic transformation process. Also, the arithmetic device 100 executes the butterfly operation of the number theoretic transformation of eight data by executing the number theoretic transformation process, as in the first embodiment. Therefore, the arithmetic device 100 can execute the number theoretic transformation and the reciprocal number theoretic transformation with a small hardware resource. Therefore, the arithmetic device 100 capable of executing the number theoretic transformation and the reciprocal number theoretic transformation can be miniaturized, and the arithmetic device 100 capable of executing the number theoretic transformation and the reciprocal number theoretic transformation can be easily incorporated into a vehicle.
[0131] E. Fifth embodiment: In the fifth embodiment, the arithmetic device 100 is a device that performs butterfly operations of reciprocal number theoretic transformation. For example, when a vehicle communicates with a communication device outside the vehicle or when a program for controlling the vehicle is executed, the arithmetic device 100 performs butterfly operations of reciprocal number theoretic transformation to encrypt or decrypt data.
[0132] In the fifth embodiment, the configuration of the arithmetic unit 50c is different from that of the first embodiment. The configurations of the components of the arithmetic device 100 other than the arithmetic unit 50c are the same as those of the first embodiment. In the fifth embodiment, the arithmetic unit 50c is configured to be capable of executing butterfly operations of reciprocal theoretic transformation of two pieces of input data. The memory 20 stores data included in data to be encrypted or decrypted by butterfly operations of reciprocal theoretic transformation.
[0133] As shown in FIG. 26, the arithmetic unit 50c of the fifth embodiment includes a first input unit 51, a second input unit 52, a multiplier 53, a first output unit 54, a second output unit 55, a first shift operation unit 57, and a second shift operation unit 58. The arithmetic unit 50c of the fifth embodiment is different from the arithmetic unit 50 of the first embodiment in that the multiplier 53 is provided immediately after the second input unit 52, not before the second output unit 55. The first shift operation unit 57 and the second shift operation unit 58 are provided before the first output unit 54 and the second output unit 55, respectively. When a value A is input to the first input unit 51, a value B is input to the second input unit 52, and a coefficient C is input to the multiplier 53, the value X output from the first output unit 54 and the value Y output from the second output unit 55 are expressed by the above-mentioned formulas (3) and (4), respectively. In the fifth embodiment, the arithmetic device 100 executes butterfly operations for reciprocal theoretic transformation of eight pieces of data in the same manner as the reciprocal theoretic transformation process of the fourth embodiment shown in FIG.
[0134] According to the fifth embodiment described above, the arithmetic device 100 executes the reciprocal theoretic transformation process, thereby repeatedly using the same arithmetic unit 50 to perform butterfly operations, and executes the butterfly operations of the reciprocal theoretic transformation of eight data. Therefore, the arithmetic device 100 can execute the reciprocal theoretic transformation with few hardware resources. Therefore, the arithmetic device 100 capable of executing the reciprocal theoretic transformation can be miniaturized, and the arithmetic device 100 capable of executing the reciprocal theoretic transformation can be easily incorporated into a vehicle.
[0135] F. Other Embodiments: (F-1) In the first embodiment, the arithmetic unit 40 includes four arithmetic units 50. In the second embodiment, the arithmetic unit 40 includes two arithmetic units 50. In the third embodiment, the arithmetic unit 40 includes one arithmetic unit 50. In the first to third embodiments, eight input data are input to the arithmetic unit 40. In contrast, the arithmetic unit 40 may include 2j arithmetic units 50 (j is an integer equal to or greater than 3). That is, the arithmetic unit 40 may include 2m arithmetic units 50 (m is an integer equal to or greater than 0). When the arithmetic unit 40 includes 2m arithmetic units 50, 2n input data (n is an integer satisfying n>m) are input to the arithmetic unit 40. That is, the arithmetic device 100 performs butterfly arithmetic on 2n data.
[0136] (F-2) In the above embodiment, the input data is data contained in the data to be encrypted or decrypted by number theoretic transformation, but the input data does not have to be data contained in the data to be encrypted or decrypted by number theoretic transformation.
[0137] (F-3) In the above embodiment, the arithmetic device 100 is mounted on a vehicle, but the arithmetic device 100 does not have to be mounted on a vehicle.
[0138] G. Other forms: The present disclosure is not limited to the above-mentioned embodiment, and can be realized in various forms without departing from the spirit of the present disclosure. For example, the present disclosure can be realized in the following forms. The technical features in the above-mentioned embodiments corresponding to the technical features in each form described below can be appropriately replaced or combined in order to solve some or all of the problems of the present disclosure, or to achieve some or all of the effects of the present disclosure. Furthermore, if the technical feature is not described as essential in this specification, it can be appropriately deleted.
[0139] <Form 1> An arithmetic device (100) for performing number theoretic transformation comprises: an arithmetic section (40) having one or more arithmetic units (50) configured to perform butterfly operations on two input data, and outputting the same number of output data as the two or more input data; and a sorting section (30) generating sorted data by sorting the output data in a predetermined order, and repeatedly inputting some or all of the sorted data to the arithmetic section as the input data.
[0140] <Mode 2> In the arithmetic device of mode 1, the input data may be data included in data to be encrypted or decrypted by number theoretic transformation.
[0141] <Feature 3> In the arithmetic device of feature 1, the arithmetic device may be mounted on a vehicle.
[0142] <Form 4> In the calculation device of Form 3, the input data is data included in authentication data for verifying the legitimacy of a communication device outside the vehicle, and the input data may be input to the calculation unit when the vehicle communicates with the communication device.
[0143] <Form 5> In the arithmetic device of Form 3 above, the input data may be data included in authentication data for verifying the legitimacy of a program that controls the vehicle, and the input data may be input to the arithmetic unit when the vehicle executes the program.
[0144] <Form 6> In the calculation device of Form 3, the input data is data included in authentication data for verifying the legitimacy of devices installed in the vehicle, and the input data may be input to the calculation unit when the devices communicate with each other.
[0145] <Form 7> In the arithmetic device of Form 1 above, the arithmetic unit may include a first input section to which first input data, which is one of the input data, is input, a second input section to which second input data, which is one of the input data different from the first input data, a multiplier that outputs a value obtained by multiplying the input value by a predetermined coefficient, a first output section that outputs first output data, which is one of the output data, and a second output section that outputs second output data, which is one of the output data different from the first output data, wherein the first output section outputs a value obtained by adding the first input data and the second input data as the first output data, and the second output section outputs a value obtained by subtracting the second input data from the first input data and multiplying the value by the coefficient as the second output data.
[0146] <Mode 8> In the arithmetic device of Mode 1 above, the arithmetic unit is configured to be able to execute butterfly operations of number theoretic transformation and reciprocal transformation, and includes a shift operation unit which selectively outputs an input value or a value obtained by performing a shift operation on an input value, and a multiplier which is configured to be able to select a position at which a multiplication included in the butterfly operation is performed, and outputs a value obtained by multiplying an input value by a predetermined coefficient, and when the arithmetic unit executes the butterfly operation of number theoretic transformation, the shift operation unit outputs the input value, and the multiplier executes the multiplication immediately before the output data is output, and when the arithmetic unit executes the butterfly operation of reciprocal transformation, the shift operation unit outputs a value obtained by performing the shift operation on an input value, and the multiplier executes the multiplication immediately after the input data is input. [Explanation of symbols]
[0147] 10...CPU, 20...memory, 30...sorting section, 40...arithmetic section, 41...first arithmetic unit, 42...second arithmetic unit, 43...third arithmetic unit, 44...fourth arithmetic unit, 50...arithmetic unit, 51...first input section, 52...second input section, 53...multiplier, 54...first output section, 55...second output section, 56...multiplier, 57...first shift arithmetic section, 58...second shift arithmetic section, 61...multiplier first input section, 62...multiplier first output section, 63...multiplier second input section, 64...multiplier second output section, 100...arithmetic device
Claims
1. An arithmetic device (100) for performing number theoretic transformations, comprising: A calculation unit (40) including one or a plurality of calculation units (50) in parallel configured to perform butterfly calculations on two pieces of input data, and outputting the same number of pieces of output data as the two or more pieces of input data; a sorting unit (30) that generates sorted data by sorting the output data in a predetermined order, and repeatedly inputs a part or all of the sorted data to the calculation unit as the input data; Computing device.
2. 2. The computing device according to claim 1, The input data is data included in data to be encrypted or decrypted by number theoretic transformation. Computing device.
3. 3. The computing device according to claim 2, The computing device is mounted on a vehicle. Computing device.
4. 4. The computing device according to claim 3, the input data is data included in authentication data for verifying the authenticity of a communication device located outside the vehicle, When the vehicle communicates with the communication device, the input data is input to the calculation unit. Computing device.
5. 4. The computing device according to claim 3, the input data is data included in authentication data for verifying the validity of a program for controlling the vehicle, When the vehicle executes the program, the input data is input to the calculation unit. Computing device.
6. 4. The computing device according to claim 3, the input data is data included in authentication data for verifying the authenticity of a device mounted on the vehicle, When the devices communicate with each other, the input data is input to the calculation unit. Computing device.
7. 2. The computing device according to claim 1, The computing unit includes: a first input unit to which first input data, which is one of the input data, is input; a second input unit to which second input data, which is one of the input data different from the first input data, is input; a multiplier that outputs a value obtained by multiplying an input value by a predetermined coefficient; a first output section that outputs first output data, which is one of the output data; a second output section that outputs second output data that is one of the output data different from the first output data; the first output unit outputs a value obtained by adding the first input data and the second input data as the first output data; the second output unit outputs, as the second output data, a value obtained by subtracting the second input data from the first input data and multiplying the result by the coefficient. Computing device.
8. 2. The computing device according to claim 1, The computing unit includes: The number theoretic transform and the inverse number theoretic transform butterfly operations are executable, a shift operation unit that selectively outputs an input value or a value obtained by performing a shift operation on the input value; a multiplier that is provided to be able to select a position at which the multiplication included in the butterfly computation is performed and that outputs a value obtained by multiplying an input value by a predetermined coefficient; When the arithmetic unit performs a butterfly operation of a number theoretic transform, The shift operation unit outputs an input value, The multiplier performs the multiplication immediately before the output data is output; When the arithmetic unit performs a butterfly operation of a reciprocal number theoretic transform, The shift operation unit outputs a value obtained by performing the shift operation on an input value, The multiplier performs the multiplication immediately after the input data is input. Computing device.
Citation Information
Patent Citations
Digital signal processing integrated circuit
JP1988167967A
Fast fourier transform circuit and fast fourier transform method
JP2008083852A
Radar signal processing apparatus
JP2010181200A
Information Processing Systems
JP6627777B2
Fast fourier transforming apparatus and method, variable bit reverse circuit, inverse fast fourier transforming apparatus and method, and OFDM receiver and transmitter
US6115728A
