WO2018092981A2 - 고속의 naf 변환 장치 및 고속의 naf 변환 방법 - Google Patents
고속의 naf 변환 장치 및 고속의 naf 변환 방법 Download PDFInfo
- Publication number
- WO2018092981A2 WO2018092981A2 PCT/KR2017/001113 KR2017001113W WO2018092981A2 WO 2018092981 A2 WO2018092981 A2 WO 2018092981A2 KR 2017001113 W KR2017001113 W KR 2017001113W WO 2018092981 A2 WO2018092981 A2 WO 2018092981A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- window
- bit
- naf
- value
- public key
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/45—Structures or tools for the administration of authentication
- G06F21/46—Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/52—Multiplying; Dividing
- G06F7/523—Multiplying only
- G06F7/533—Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even
- G06F7/5332—Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by skipping over strings of zeroes or ones, e.g. using the Booth Algorithm
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/02—Conversion to or from weighted codes, i.e. the weight given to a digit depending on the position of the digit within the block or code word
- H03M7/04—Conversion to or from weighted codes, i.e. the weight given to a digit depending on the position of the digit within the block or code word the radix thereof being two
Definitions
- the present invention relates to a fast NAF converter and a fast NAF conversion method.
- the secret key cryptography method in the related art encrypts and decrypts using one encryption key, and thus, the possibility of leakage of the encryption key is very high.
- Public key cryptography encrypts using public and private keys, thereby ensuring stability against key exchange and providing high security.
- Representative public key cryptosystems in the prior art include RSA (Rivest, Shamir, Adleman) and ECC (Elliptic Curve Cryptography).
- RSA is an algorithm based on the difficulty of prime factorization.
- a public and private key can be obtained by multiplying two prime numbers and performing additional operations.
- RSA uses a modular power operation in the encryption and decryption process as a core function.
- ECC is a public key cryptography method based on the elliptic curve theory.
- Elliptic curve defined in phase Based on the discrete log problem in.
- ECC is a finite body Elliptic curve defined in phase Dot above Positive integer As much as Use scalar multiplication, an operation that computes. Scalar multiplication consists of a point doubling operation and a point addition operation, which are operations on points on an elliptic curve.
- the speed of the ECC may be greatly affected by the scalar multiplication operation speed. Therefore, in order to improve the speed of ECC, research is required to improve the scalar multiplication operation speed.
- the present invention has been made to solve the above problems, and the NAF (Non-Adgacetnt Form) conversion process is used to reduce the number of modular multiplications in the RSA modular multiplication operation and the number of point editions in the scalar multiplication operation of the ECC. It aims at being able to improve speed.
- NAF Non-Adgacetnt Form
- a fast NAF conversion apparatus for achieving the above object includes a setting unit for setting a window value and a window having the set value as a length, based on a Least Significant Bit (LSB) of a public key, If the target bit to be first set to at least a part and the target bit to be encrypted in the public key is out of the window, the window is shifted into a ⁇ -bit right shift so that the target bit is included (
- the ⁇ may be a natural number), and may include a processing unit for setting the window second.
- a high-speed NAF conversion method the step of setting the value of the window, based on the LSB (Least Significant Bit) of the public key, the window having the set length, the length First setting the at least a portion of the public key, and if the target bit to be encrypted in the public key is outside the window, shift the window ⁇ -bit right to include the target bit. ⁇ -bit right shift (where ⁇ is a natural number) to set the window.
- NAF conversion ( Is a positive integer
- the number of bits according to the binary conversion of may be increased or the NAF conversion time may be shortened when there are many patterns generating an odd case.
- 1A to 1I are diagrams for explaining an algorithm used in RSA or ECC according to an embodiment of the present invention.
- FIG. 2 is a block diagram illustrating a fast NAF converter according to an embodiment of the present invention.
- 3A and 3B are diagrams for describing an implementation example using a high-speed NAF conversion apparatus according to an embodiment of the present invention.
- 4A and 4B are diagrams for describing an implementation example using a high speed NAF conversion apparatus according to an embodiment of the present invention.
- FIG. 5 is a diagram illustrating an algorithm for implementing a fast NAF conversion apparatus according to an embodiment of the present invention.
- 6 to 11 are diagrams for explaining the performance evaluation of the algorithm for implementing a high-speed NAF conversion apparatus according to an embodiment of the present invention.
- FIG. 12 is a flowchart illustrating a high-speed NAF conversion method in detail according to an embodiment of the present invention.
- the fast NAF converter and the fast NAF conversion method described herein are positive integers that are essentially used in modular multiplication of RSA and scalar multiplication of ECC. NAF for This can speed up the conversion process.
- 1A to 1I are diagrams for explaining an algorithm used in RSA or ECC according to an embodiment of the present invention.
- FIG. 1A and 1B are diagrams for explaining a Square and Multiply technique.
- FIG. 1A is a first algorithm for a square-and-multiply scheme, and may be an algorithm used to reduce an amount of computation in a modular power operation of an RSA. In the calculation of the form, conventionally Although expressed as a decimal number, as shown in FIG. It can be represented as a binary number.
- Is initialized to 0 and when the algorithm terminates Can be a value, Is It may be a variable that stores a value.
- the square and multiply technique To To 0 Each bit of the can be checked by shifting 1-bit in a left-to-right manner.
- 1B is a diagram illustrating an example of calculation using the square-and-multiply technique.
- 1C is a diagram for describing a binary technique.
- Binary Techniques of ECC It can be used most commonly in scalar multiplication to compute.
- item 1 of the second algorithm for the binary technique shown in FIG.
- Each bit can be checked by moving left-right or left-to-left in 1-bit order.
- the binary technique may perform one point doubling operation for each bit as in item 2.1. If the bit is non-zero, the binary technique may perform point edition operations by the number of non-zero bits to perform additional point addition operations, such as item 2.2.
- the binary technique Reducing the number of 1 in can speed up the scalar multiplication operation.
- 1D and 1E are diagrams for explaining the NAF technique.
- Square and multiply techniques for optimizing RSA's modular power arithmetic and binary techniques used for scalar multiplication in ECC As the number of non-zero bits increases, the number of modular multiplication operations and point edition operations may increase.
- the algorithm is You can use a signed number for each bit of. Algorithm removes consecutive nonzero numbers By reducing the average density of nonzero numbers, RSA's modular power operation can be used to reduce the number of modular multiplications. Also, The algorithm can be used to reduce the number of point edition operations in ECC scalar multiplication. Generally the length sign To Odd Number, It can be expressed as At this time, Can be.
- the third algorithm is of Convert to May be an algorithm.
- the third algorithm is a positive integer And window size Take input Binary representation of To reduce the number of nonzero integer bits in Can return.
- the NAF technique like item (2) of the third algorithm, If the condition is satisfied, the Wile statement can be executed repeatedly. Is odd (that is, when the Least Significant Bit (LSB) is 1) The value of (Item 2.1), where the NAF technique is end Greater than or equal to The value is If not, the previous value can be used (item 2.1.1). on Can be omitted (item (2.1.2)). As shown in item 2.2, Is even (ie, LSB is 0) The value can be zero.
- LSB Least Significant Bit
- the NAF technique is in Is It is possible to divide the value by 2, and this process may be a 1-bit shift to the right.
- the decimal number 7 in binary is 111 2
- 7 divided by 2 is actually 3.5
- Is declared as an Integer The value is 3 excluding the decimal point, which can be 11 2 in binary. Therefore, the NAF technique can eliminate the rightmost bit and move all bits one space to the right.
- NAF technique The length of Because of, One bit comparison operation can be performed.
- 1E is a diagram illustrating an example of calculation using a NAF technique.
- FIG. 1F and 1G are diagrams for describing a recording binary technique.
- Burning Binary Technique It may be an algorithm that performs a modular power operation using an algorithm.
- the detailed operation procedure of the recording binary technique is as shown in the fourth algorithm in FIG. 1F, and FIG. 1G is a diagram illustrating an example of an operation using the recording binary technique.
- FIG. 1H is a diagram for describing a window NAF technique.
- Windows NAF technique It may be an algorithm that performs scalar multiplication using an algorithm.
- the Windows NAF technique Algorithms can be used to reduce point edition operations.
- Windows NAF technique The points on the elliptic curve corresponding to can be calculated in advance and stored. So the Windows NAF technique A memory for storing pre-computation values may be required according to the size of.
- the detailed operation of the window NAF technique is as shown in the fifth algorithm of FIG. 1H.
- As an example of operation using the window NAF technique when, ego, Can be.
- an operation example using the window NAF technique when, ego, Can be.
- FIG. 1I is a diagram for describing a sliding window technique.
- Sliding window technique For And points on elliptic curves Because we precalculate and store the result May require memory to store pre-computed values.
- the sliding window technique Although there are many disadvantages of pre-computation compared to the window NAF technique, Size In this case, the number of point edition operations may be reduced.
- the sliding window technique can use a general binary representation of only 0,1, but in this case the point on the elliptic curve Because we calculate M in advance, memory requirements can be much higher. Thus, the sliding window technique To By converting to, the efficiency can be increased.
- the detailed operation of the sliding window technique is as shown in the sixth algorithm of FIG. 1I.
- FIG. 2 is a block diagram illustrating a fast NAF converter according to an embodiment of the present invention.
- the high speed NAF converter 200 (hereinafter, NAF converter) of the present invention may include a setting unit 210 and a processing unit 220.
- the NAF conversion apparatus 200 may be configured by adding the changer 230, the calculator 240, and the determiner 250.
- the setting unit 210 sets a window value. That is, the setting unit 210 may set a window value that is a positive integer. For example, the setting unit 210 may set at least one value of two or more integers as the window value.
- the processor 220 first sets a window having the set value as a length to at least a portion of the public key, based on the Least Significant Bit (LSB) of the public key. That is, the processor 220 may set a window to a part of the public key as the first setting by the value set by the setting unit 210. For example, when the value of the window is set to 3, the processor 220 may first set 3 bits from the LSB of the public key.
- LSB Least Significant Bit
- the processor 220 shifts the window so that the target bit is included in the window by omega-bit right shift. ⁇ is a natural number), and the window is set to the second. That is, the processor 220 includes a value of the window in order to include the target bit in the window.
- the second setting can be made by moving the bit by -bit. For example, when the value of the window is set to 3, the processor 220 may move the window 3-bit to set the target bit to be included.
- NAF converter 200 in FIG. 2 will now be described with reference to FIGS. 3A, 3B, 4A, and 4B.
- 3A and 3B are diagrams for describing an implementation example using a high-speed NAF conversion apparatus according to an embodiment of the present invention.
- the processor 220 About When is set to In the algorithm Can be set to a first window (gray shaded portion, 311) when is odd (ie, when LSB is 1).
- the changer 230 may change all of the bits in the public key included in the first set window to '0'. That is, the changer 230 may change all of the first set bits to '0'. In the example of FIG. 3A, the changer 230 may change all of the bits included in the window (that is, the gray shaded portion) to '0' (312).
- the calculator 240 may calculate a converted value for the bit in the public key included in the first set window.
- arithmetic unit 240 is item 2.1 of the third algorithm if the rightmost three bits are 011. about Can be calculated.
- the changer 230 may check whether the calculated value exceeds the selected reference value, add or subtract a predetermined number, and make the converted value '0'. For example, if the reference value is If selected, the change unit 230 is converted value end You can check if it is.
- the changer 230 is The value of item 2.1.1 in the third algorithm. Does not satisfy Can be performed. At this time, the changer 230 is Is 3 The rightmost 3-bits may be 000 to perform 312.
- the processor 220 determines ⁇ as '1' and shifts the window 1-bit right, but the 1-bit right until the target bit is included in the window.
- the second setting may be repeated by repeating the movement.
- the processor 220 performs item 2.3 of the third algorithm.
- the value can be divided by 2 and shifted 1-bit to the right (313). That is, as shown in FIG. 3A, the gray shades representing the rightmost 3-bits can be shifted.
- the NAF converter 200 In the process of moving 1-bit to the right after performing an operation as shown in FIGS. 3A and 3B through an algorithm, Suppose we see the first bit From the first bit You can see that the first bit all changes to zero.
- the processor 220 may move the LSB of the public key in association with the 1-bit right shift of the window. As shown in Figure 3a, the processing unit 220 By increasing the value by 1, you can move the arrow pointing to the LSB.
- the processor 220 may remove the bit of the bit value '0' that is separated from the window after the 1-bit right shift. That is, the processor 220 may remove the bits previously designated as LSBs (steps 311 and 312) so that they actually disappear. For example, in FIG. 3A, as shown in step 313, the processor 220 may remove a bit value of a portion (non-grey shaded) portion that is separated from the window.
- the processing unit 220 If set to, the window may be first set (gray shaded portion 321).
- the changer 230 is an item 2.1 of the third algorithm if the rightmost 3-bit is 101. about You can do At this time, the changer 230 is The value of item (2.1.1) Satisfies Value is Is -3, and the value of item (2.1.2) Can be performed.
- the change unit 230 Is -3 When the rightmost 3-bits are 000, 322 can be carried out. In the present specification, the conversion occurs as 0 or 1 (0 or 1) is expressed as 1 or 0 (1 or 0), but is not limited thereto.
- the processor 220 performs an item 2.3 of the third algorithm.
- the value can be divided by 2 and shifted 1-bit to the right (323).
- the processor 220 By increasing the value by one, you can move the arrow pointing to the LSB.
- the NAF converter 200 is Apply the sliding window concept to the algorithm, In the algorithm The value of must You can take advantage of the property of being a smaller amount of odd numbers.
- NAF converter 200 is only 1 and 3 which is 001 and 011 It can take advantage of the property that can be a value of.
- the NAF converter 200 moves to the right until the LSB becomes 1 to form 001 and 011, and in the case of 101 and 111, the carry is carried out. It can take advantage of the property that it can be in the form of 001 by moving it to the right until it reaches 1000 and then LSB becomes 1. Therefore, the NAF converter 200 The value of must You can take advantage of the characteristic of being smaller odd number.
- 4A and 4B are diagrams for describing an implementation example using a high speed NAF conversion apparatus according to an embodiment of the present invention.
- the processing unit 220 About When is set to In the algorithm Can be set to the first window (gray shaded portions 411, 421) when is odd (i.e., when LSB is 1).
- the determination unit 250 may determine whether the calculated value exceeds the selected reference value. That is, the determination unit 250 may determine the converted value calculated by the calculator 240 based on the reference value. For example, the determination unit 250 is a reference value Based on this, it may be determined whether the converted value exceeds the reference value.
- the processor 220 may move the window right by the ⁇ -bit to adjust the setting position of the window to the target bit. That is, the processor 220 is a reference value If the converted value is smaller, the first window size ⁇ may be shifted by ⁇ bits. As shown in Figure 4a, the processing unit 220 ⁇ -bit can be shifted to the right (413).
- the NAF converter 200 may check the value of the bit shifted by the window. That is, when the window size is first set to 3, the processor 220 may move the window having the window size 3 to the right by 3 bits. After the 3-bit shift, the NAF converter 200 may check one of 0 or 1 as a bit value with respect to the bits included in the window. In this process, the processor 220 The algorithm's computational process can be omitted.
- the processor 220 may carry a bit value of the target bit when the determination result is exceeded, and move the window right by the ⁇ -bit to adjust the setting position of the window to the target bit. . That is, as the processor 220 generates a carry, instead 422 may be performed.
- the processor 220 may move the window having the window size ⁇ to the right by ⁇ bits (423).
- the NAF converter 200 may check the value of the bit shifted by the window. For example, the processor 220 may move the window having the first set window size 3 to the right by three bits. After the 3-bit shift, the NAF converter 200 may check one of 0 or 1 as a bit value with respect to the bits included in the window.
- the processor 220 may adjust the LSB of the public key to the target bit in association with the ⁇ -bit right shift of the window. That is, as shown in FIGS. 4A and 4B, the processor 220 moves ⁇ -bit to the right. By moving to the first bit, the arrow pointing to the LSB can be moved.
- NAF converter 200 is By doing one comparison operation, To perform a bitwise comparison operation Optimize the computational processing speed of the algorithm.
- the NAF converter 200 when the NAF conversion, ( Is a positive integer
- the NAF conversion time can be shortened when there are many patterns that increase the number of bits according to the binary conversion of a number or generate an odd number ( Is a positive integer
- FIG. 5 is a diagram illustrating an algorithm for implementing a fast NAF conversion apparatus according to an embodiment of the present invention.
- the NAF conversion apparatus 200 uses a seventh algorithm ( Algorithm) may be expressed as pseudo code.
- the NAF conversion apparatus 200 determines the execution condition of the While statement in the item 2 of the seventh algorithm. It may not be set. The reason is that, The value of must Since the smaller number is an odd number, the NAF conversion apparatus 200 may determine whether to stop the wile statement only in item 2.3.1.
- the wire statement of item 2.1 may be code for quickly processing a series of zeros. When you exit the Wihle sentence and come to item (2.2) Can be an odd integer.
- Item 2.3.2 in the seventh algorithm is a code representation of the operation of FIG. 4A.
- the NAF converter 200 can be sure that the item (2.1.2) and '0 of the third algorithm.
- the process of shifting by 1 bit by bit for a bit may be omitted. That is, the NAF converter 200 To Increase by To You can move as far as right.
- Item 2.4 in the seventh algorithm is a code representation of the operation of FIG. 4B.
- the NAF converter 200 since the NAF converter 200 has a carry in the algorithm, Can be performed.
- the apparatus 200 for NAF may perform the rest of the apparatus as described in item 2.3.2.
- 6 to 11 are diagrams for explaining the performance evaluation of the algorithm for implementing a high-speed NAF conversion apparatus according to an embodiment of the present invention.
- the performance evaluation of the present application Length of A cycle counter comparison can be made for.
- the performance evaluation of the present application may include a comparison of the number of times the odd case occurs. That is, in the performance evaluation of the present application, the number of repetitions of patterns such as 0,1,01,001,011,101, etc., which are combined with 0 and 1, is used.
- the cases of size 2 and 3 can be implemented on the low-performance 8-bit microprocessor ATmega128 and the performance of the cycle counter measured.
- the number of binary bits in is more than 1024-bits in RSA and more than 160-bits in ECC. These bits can be regarded as repetition of various patterns by 0 and 1.
- Algorithm Contrast The average and deviation gains of the algorithm are summarized. Compared to algorithm The average cycle counter of the algorithm is reduced by about 20% and the deviation is also reduced by more than 30%. Especially, The algorithm is It can show better performance in deviations than the algorithm. this is, Algorithm Length of Increases the cycle counter increment It is smaller than the algorithm, which means that it can exhibit constant performance for various input patterns.
- FIGS. 8 and 9 show the results of analyzing the cycle counters of the two algorithms in detail according to the number of repetitions in the 1 and 01 bit patterns, which are the main repetition patterns affecting the performance of the two algorithms.
- the algorithm is Compared with the algorithm, the average gains of 18.6% and 19.4% and the deviation gains of 31.3% and 31.8% can be improved.
- FIGS. 10 and 11 The algorithm is Compared with the algorithm, the average gain can be improved by 11.8% and 14.3%, and the deviation gain is 26.7% and 29.9%, respectively.
- the reason why the clock counter does not increase as the number of repetitions increases from 2 to 3 (or 5 to 6) This may be because the number of bit shifts is the same.
- 0101 is a one-time shift because it causes a carry to be converted to 1000, then 3 right shifts, then handles 0001.
- Bit shifts can occur.
- a 010101 degree shift can occur, convert to 011000, shift to the right three bits, and then handle 011, so a shift can occur once.
- 01010101 converts to 01011000 after the carry occurs, shifts to the right by 3-bit shift, then becomes 01011, converts to 01000, then shifts to the right by 3-bit shift. Because we are dealing with 01, shifts can occur twice. Therefore, when the number of consecutive 01's is 2 and the number 3's cycle counter is the same, the cycle counter may increase when the number 4 is the same.
- FIG. 12 is a flowchart illustrating a high-speed NAF conversion method in detail according to an embodiment of the present invention.
- the fast NAF conversion method according to the present embodiment may be performed by the above-described NAF conversion apparatus 200.
- step 1210 may be a process of setting a window value that is a positive integer.
- the NAF converter 200 may set at least one value of two or more integers as a window value.
- the NAF conversion apparatus 200 first sets a window having the set value as a length to at least a portion of the public key based on the Least Significant Bit (LSB) of the public key (1220). That is, step 1220 is a first setting, and the window may be set to a part of the public key by the value set in step 1210. For example, when the value of the window is set to 3, the NAF conversion apparatus 200 may first set 3 bits from the LSB of the public key.
- LSB Least Significant Bit
- the NAF conversion apparatus 200 shifts the window ⁇ -bit right shift so that the target bit is included when the target bit to be encrypted in the public key is outside the window. (Where ⁇ is a natural number) to set the window (2230). That is, in order to include the target bit in the window, the NAF converter 200 may set the window by shifting the window by ⁇ -bit, which is a value of the window. For example, when the value of the window is set to 3, the NAF converter 200 may move the window 3-bit to set the target bit to be included.
- the NAF conversion apparatus 200 may change all of the bits in the public key included in the first set window to '0'. That is, the NAF converter 200 may change all of the first set bits to '0'.
- the NAF conversion apparatus 200 may calculate a conversion value for the bits in the public key included in the first set window.
- the NAF conversion apparatus 200 is an item 2.1 of the third algorithm if the rightmost three bits are 011. about Can be calculated.
- the step of changing to '0' may be a process of checking whether the calculated value exceeds a predetermined reference value, adding or subtracting a predetermined number, and making the converted value '0'. For example, if the reference value is If it is selected as, NAF converter 200 is converted value end You can check if it is. NAF converter 200 The value of item 2.1.1 in the third algorithm. Does not satisfy Can be performed. At this time, the NAF converter 200 Is 3 You can do this so that the rightmost 3-bit is 000.
- step 1230 determines ⁇ as '1' and shifts the window 1-bit right, but the 1-bit right until the target bit is included in the window.
- the second setting may be performed by repeating the movement.
- the NAF conversion apparatus 200 performs the item 2.3 of the third algorithm. You can divide the value by 2 and move it 1-bit to the right.
- step 1230 may be a process of removing a bit of the bit value '0' that is separated from the window after the 1-bit right shift. That is, the NAF converter 200 may remove the bits previously designated as LSBs so that they actually disappear. For example, the NAF converter 200 may remove the bit value of the part deviated from the window.
- step 1230 may be a process of moving the LSB of the public key in association with the 1-bit right movement of the window.
- the NAF converter 200 By increasing the value by 1, you can move the LSB.
- the NAF conversion apparatus 200 may determine whether the calculated value exceeds the selected reference value. That is, the NAF converter 200 may determine the converted value calculated in the calculating of the converted value based on the reference value. For example, the NAF converter 200 is a reference value Based on this, it may be determined whether the converted value exceeds the reference value.
- the NAF converter 200 may move the window right by the ⁇ -bit to adjust the setting position of the window to the target bit. That is, the NAF converter 200 is a reference value If the conversion value is smaller, the first set window size ⁇ may be shifted right by ⁇ bits. NAF converter 200 Can be shifted ⁇ -bit to the right. After the ⁇ -bit shift, the NAF converter 200 may check the value of the bit shifted by the window. For example, when the window size is first set to 3, the NAF converter 200 may move the window having the window size 3 to the right by 3 bits. After the 3-bit shift, the NAF converter 200 may check one of 0 or 1 as a bit value with respect to the bits included in the window. In this process, the NAF converter 200 The algorithm's computational process can be omitted.
- the NAF conversion apparatus 200 when exceeded, as a result of the determination, carry a bit value of the target bit, move the window right by the ⁇ -bit, and change the setting position of the window. Can be adjusted with the target bit. That is, as the NAF converter 200 generates a carry, instead Can be performed.
- the NAF converter 200 may shift a window having a window size of ⁇ right by ⁇ bits after switching bit values. After the ⁇ -bit shift, the NAF converter 200 may check the value of the bit shifted by the window. For example, the NAF converter 200 may move the window having the first set window size 3 to the right by three bits. After the 3-bit shift, the NAF converter 200 may check one of 0 or 1 as a bit value with respect to the bits included in the window.
- the NAF conversion apparatus 200 may adjust the LSB of the public key to the target bit in association with the ⁇ -bit right shift of the window. For example, the NAF converter 200 performs a ⁇ -bit shift to the right. By moving to the first bit, the arrow pointing to the LSB can be moved.
- the NAF conversion method is NAF conversion, ( Is a positive integer
- the number of bits according to the binary conversion of may be increased or the NAF conversion time may be shortened when there are many patterns generating an odd case.
- the method according to an embodiment of the present invention can be implemented in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium.
- the computer readable medium may include program instructions, data files, data structures, etc. alone or in combination.
- the program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts.
- Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks.
- Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
- the hardware device described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Image Processing (AREA)
Abstract
본 발명은 고속의 NAF 변환 장치 및 고속의 NAF 변환 방법에 관한 것이다. 본 발명에 따른 고속의 NAF 변환 장치는, 윈도우의 값을 설정하는 설정부 및 공개키의 LSB(Least Significant Bit)를 기준으로, 상기 설정된 값을, 길이로 갖는 윈도우를, 상기 공개키의 적어도 일부에 제1 세팅하고, 상기 공개키 내 암호화 대상이 되는 타깃 비트가, 상기 윈도우의 밖에 있는 경우, 상기 타깃 비트가 포함되도록 상기 윈도우를, ω-비트 오른쪽 이동(ω-bit right shift)(상기 ω은 자연수)시켜, 상기 윈도우를 제2 세팅하는 처리부를 포함할 수 있다.
Description
본 발명은 고속의 NAF 변환 장치 및 고속의 NAF 변환 방법에 관한 것이다.
종래 기술에서의 비밀키 암호 방식은 하나의 암호화키를 사용하여 암호화 및 복호화 함으로써, 암호화키에 대한 유출 가능성이 매우 높다. 반면 공개키 암호 방식은 공개키와 비밀키를 사용하여 암호화함으로써, 키 교환에 대한 안정성을 보장하고 높은 보안 강도를 제공한다. 종래 기술에서의 대표적인 공개키 암호 방식은 RSA(Rivest, Shamir, Adleman)와 ECC(Elliptic Curve Cryptography)가 있다.
먼저, RSA는 소인수분해의 어려움에 기초한 알고리즘으로, 두 개의 소수들의 곱과 추가 연산을 통해 공개키 및 비밀키를 구할 수 있다. 즉, RSA는 핵심 기능으로 암호화, 복호화 과정에서 모듈러 멱승 연산을 사용한다. 예를 들면, RSA의 경우에서, 는 소수이고, 는 이며, 이다(비밀키=, 공개키=). 만일, 공개키가 {7, 187}이고, 비밀키가 {23, 17, 11}일 때 메시지 이라면, 암호화된 메시지 는 가 되고, 를 복호화하면 이므로 처음 메시지 가 구해질 수 있다. 이 때, 과 을 구하고 을 계산하는 것은 아주 많은 연산을 요구할 수 있다.
해당 연산은 RSA의 속도에 큰 영향을 미치기 때문에 모듈러 곱셈 최적화, 모듈러 곱셈 횟수 최적화에 대한 다양한 연구가 이루어지고 있다.
다음으로, ECC는 타원곡선 이론에 기초한 공개키 암호 방식으로, 유한체 상에 정의된 타원곡선 에서의 이산로그문제에 기초한다. ECC는 핵심 기능으로 유한체 상에 정의된 타원곡선 위의 점 를 양의 정수 만큼 더한 를 계산하는 연산인 스칼라 곱셈을 사용한다. 스칼라 곱셈은 타원곡선 상의 점에 대한 연산인 포인트 더블링(point doubling) 연산과 포인트 에디션(point addition) 연산으로 구성되어 있다.
이때, ECC의 속도는 스칼라 곱셈 연산 속도에 큰 영향을 받을 수 있다. 그래서, ECC의 속도를 향상시키기 위해서, 스칼라 곱셈 연산 속도를 향상시키는 연구가 요구된다.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, RSA의 모듈러 멱승 연산에서의 모듈러 곱셈 횟수와 ECC의 스칼라 곱셈 연산에서의 포인트 에디션 횟수를 감소시키도록 NAF(Non-Adgacetnt Form) 변환 과정의 속도를 향상시킬 수 있는 것을 목적으로 한다.
상기의 목적을 이루기 위한 고속의 NAF 변환 장치는, 윈도우의 값을 설정하는 설정부 및 공개키의 LSB(Least Significant Bit)를 기준으로, 상기 설정된 값을, 길이로 갖는 윈도우를, 상기 공개키의 적어도 일부에 제1 세팅하고, 상기 공개키 내 암호화 대상이 되는 타깃 비트가, 상기 윈도우의 밖에 있는 경우, 상기 타깃 비트가 포함되도록 상기 윈도우를, ω-비트 오른쪽 이동(ω-bit right shift)(상기 ω은 자연수)시켜, 상기 윈도우를 제2 세팅하는 처리부를 포함할 수 있다.
또한, 상기 목적을 달성하기 위한 기술적 방법으로서, 고속의 NAF 변환 방법은, 윈도우의 값을 설정하는 단계, 공개키의 LSB(Least Significant Bit)를 기준으로, 상기 설정된 값을, 길이로 갖는 윈도우를, 상기 공개키의 적어도 일부에 제1 세팅하는 단계, 및 상기 공개키 내 암호화 대상이 되는 타깃 비트가, 상기 윈도우의 밖에 있는 경우, 상기 타깃 비트가 포함되도록 상기 윈도우를, ω-비트 오른쪽 이동(ω-bit right shift)(상기 ω은 자연수)시켜, 상기 윈도우를 제2 세팅하는 단계를 포함하여 구성할 수 있다.
본 발명의 일실시예에 따르면, RSA의 모듈러 멱승 연산에서의 모듈러 곱셈 횟수와 ECC의 스칼라 곱셈 연산에서의 포인트 에디션 횟수를 감소시키도록 NAF 변환 과정의 속도를 향상시킬 수 있다.
또한, 본 발명의 일실시예에 따르면, 번의 비교 연산 과정을 수행함으로써, 번의 비트 비교 연산 과정을 수행하는 알고리즘의 연산 처리 속도를 최적화 할 수 있다(은 양의 정수 의 이진수 변환에 따른 비트 수, 는 윈도우 크기).
도 1a 내지 도 1i는 본 발명의 일실시예에 따른 RSA 또는 ECC에서 사용하는 알고리즘을 설명하기 위한 도면이다.
도 2는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 나타내는 블록도이다.
도 3a 및 도 3b는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 이용한 구현예를 설명하기 위한 도면이다.
도 4a 및 도 4b는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 이용한 구현예를 설명하기 위한 도면이다.
도 5는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 구현하기 위한 알고리즘을 도시한 도면이다.
도 6 내지 도 11은 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 구현하기 위한 알고리즘의 성능 평가를 설명하기 위한 도면이다.
도 12는 본 발명의 일실시예에 따른 고속의 NAF 변환 방법을 구체적으로 도시한 작업 흐름도이다.
이하에서, 본 발명에 따른 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 그러나, 본 발명이 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.
본 명세서에서 설명되는 고속의 NAF 변환 장치 및 고속의 NAF 변환 방법은 RSA의 모듈러 멱승 연산과 ECC의 스칼라 곱셈 연산 등에서 필수적으로 사용하는 양의 정수 에 대한 NAF() 변환 과정의 속도를 향상시킬 수 있다.
명세서 상에서 설명의 이해를 돕기 위하여, 도 1a 내지 도 1i를 참조하여 RSA 또는 ECC에서 사용하는 알고리즘에 대하여 설명하고자 한다.
도 1a 내지 도 1i는 본 발명의 일실시예에 따른 RSA 또는 ECC에서 사용하는 알고리즘을 설명하기 위한 도면이다.
도 1a 및 도 1b는 스퀘어 앤드 멀티플라이(Square and Multiply) 기법을 설명하기 위한 도면이다. 도 1a는 스퀘어 앤드 멀티플라이 기법을 위한 제1 알고리즘으로서, RSA의 모듈러 멱승 연산에서 연산량을 줄이기 위해서 사용되는 알고리즘일 수 있다. 형태의 계산에 있어서, 종래에는 를 십진수로 표현하였지만, 도 1b에 도시된 바와 같은, 제1 알고리즘은 형태의 이진수로 표현할 수 있다. 제1 알고리즘의 항목(1)에서, 는 0으로 초기화되어 알고리즘이 종료될 때는 값이 될 수 있으며, 는 값을 저장하는 변수일 수 있다. 항목(2)에서 확인할 수 있듯이, 스퀘어 앤드 멀티플라이 기법은 를 부터 0까지 감소시키며 의 각 비트(bit)들을 왼쪽-오른쪽(Left-to-Right) 방식으로 1-비트씩 이동(Shift)하며 확인할 수 있다. 이 때, 스퀘어 앤드 멀티플라이 기법은 연산을 수행하면서(항목(2.1)), 의 번째 비트인 가 1인 경우에는 추가적으로 과 연산을 수행할 수 있다(항목(2.2)). 따라서, 스퀘어 앤드 멀티플라이 기법은 에서 1의 개수를 줄인다면 모듈러 곱셈 연산 횟수를 줄일 수 있다. 도 1b는 스퀘어 앤드 멀티플라이 기법을 이용한 연산 예를 나타내는 도면이다.
도 1c는 바이너리(Binary)기법을 설명하기 위한 도면이다. 바이너리 기법은 ECC의 를 계산하는 스칼라 곱셈에서 가장 일반적으로 사용될 수 있다. 도 1c에 도시된, 바이너리 기법을 위한 제2 알고리즘의 항목(1)에 나타낸 바와 같이, 바이너리 기법은 의 각 비트들을 왼쪽-오른쪽(Left-to-Right) 또는 오른쪽-왼쪽(Right-to-Left) 방식으로 1-비트씩 이동하며 확인할 수 있다. 이 때, 바이너리 기법은 항목(2.1)과 같이 각 비트마다 한 번의 포인트 더블링(point doubling) 연산을 수행할 수 있다. 비트가 0이 아닌 경우, 바이너리 기법은 항목(2.2)와 같이 추가적인 포인트 에디션(point addition) 연산을 수행하도록 0이 아닌 비트의 수만큼 포인트 에디션 연산을 수행할 수 있다. 따라서, 바이너리 기법은 에서 1의 개수를 줄인다면 스칼라 곱셈 연산 속도를 향상시킬 수 있다.
도 1d 및 도 1e는 NAF 기법을 설명하기 위한 도면이다. RSA의 모듈러 멱승 연산을 최적화하기 위한 스퀘어 앤드 멀티플라이 기법과, ECC의 스칼라 곱셈에 사용되는 바이너리 기법은 에서 0이 아닌 비트의 수가 많을수록 모듈러 곱셈 연산, 포인트 에디션 연산 횟수가 증가할 수 있다. 알고리즘은 의 각 비트에 부호가 있는 숫자를 사용할 수 있다. 알고리즘은 0이 아닌 숫자가 연속된 부분을 제거하여 보다 0이 아닌 숫자의 평균 밀도를 감소시킴으로써, RSA의 모듈러 멱승 연산에서는 모듈러 곱셈의 횟수를 줄이기 위해서 사용될 수 있다. 또한, 알고리즘은 ECC의 스칼라 곱셈에서는 포인트 에디션 연산의 수를 줄이기 위해서 사용될 수 있다. 일반적으로 길이가 인 를 인홀수,와 같이 표현할 수 있다. 이 때, 일 수 있다.
도 1d에 도시된 바와 같이, 제3 알고리즘은 을 로 변환하는 알고리즘일 수 있다. 제3 알고리즘은 양의 정수 와 윈도우 크기(window size)인 를 입력 받아 의 이진 표현인 에서 0이 아닌 정수인 비트 수가 줄어들도록 변환한 를 반환할 수 있다. NAF 기법은 제3 알고리즘의 항목(2)와 같이, 조건을 만족하면 와일(While)문을 반복하여 수행할 수 있고, 가 홀수일 때(즉, LSB(Least Significant Bit)가 1일 때) 의 값은 가 되도록 할 수 있다(항목(2.1). 이 때, NAF 기법은 앞서 구한 가 보다 크거나 같으면 값은 가 되도록 하고, 그렇지 않을 경우에는 앞에서 구한 값을 사용할 수 있다(항목(2.1.1). 또한, NAF 기법은 에 를 빼줄 수 있다(항목(2.1.2)). 항목(2.2)에 나타낸 바와 같이, 가 짝수일 경우(즉, LSB가 0일 경우) 값은 0이 될 수 있다. 항목(2.3)에서, NAF 기법은 에서 는 값을 2로 나누는 수행을 할 수 있고, 이 과정이 오른쪽으로 1-비트 이동하는 동작일 수 있다. 예를 들어, 십진수 7을 이진수로 나타내면 1112이고, 7을 2로 나누면 실제로는 3.5이지만, 제3 알고리즘에서 변수 가 정수(Integer)로 선언되어있기 때문에 값은 소수점을 제외한 3이 되고, 이를 이진수로 나타내면 112이 될 수 있다. 따라서, NAF 기법은 가장 오른쪽 비트를 없애고 모든 비트가 오른쪽으로 한 칸씩 이동하도록 할 수 있다. NAF 기법은 의 길이가 이므로, 번의 비트 비교 연산 과정을 수행할 수 있다. 도 1e는 NAF 기법을 이용한 연산 예를 나타내는 도면이다.
도 1f 및 도 1g는 레코딩 바이너리(Recording Binary) 기법을 설명하기 위한 도면이다. 레코딩 바이너리 기법은 알고리즘을 사용하여 모듈러 멱승 연산을 수행하는 알고리즘일 수 있다. 항목(2.3)과 같이, 가 -1인 경우를 처리하는 과정을 추가한다는 점과 를 사용한다는 점을 제외하면 스퀘어 앤드 멀티플라이 기법과 동일할 수 있다. 제4 알고리즘은 에서 의 곱셈에 대한 역원인 가 미리 계산될 수 있다. 레코딩 바이너리 기법의 상세 동작 과정은 도 1f에서의 제4 알고리즘에 나타낸 바와 같고, 도 1g는 레코딩 바이너리 기법을 이용한 연산 예를 나타내는 도면이다.
도 1h는 윈도우 NAF(Window NAF) 기법을 설명하기 위한 도면이다. 윈도우 NAF 기법은 알고리즘을 사용하여 스칼라 곱셈을 수행하는 알고리즘일 수 있다. 또한, 윈도우 NAF 기법은 바이너리 기법에 알고리즘을 활용하여 포인트 에디션 연산을 줄일 수 있다. 윈도우 NAF 기법은, 에 해당하는 타원곡선 상의 점들을 미리 계산하여 저장할 수 있다. 따라서 윈도우 NAF 기법은 의 크기에 따라 미리 계산한(pre-computation) 값들을 저장할 메모리가 요구될 수 있다. 윈도우 NAF 기법의 상세 동작 과정은 도 1h의 제5 알고리즘에 나타낸 바와 같다. 윈도우 NAF 기법을 이용한 연산 예로서, 일 때, 이고, 일 수 있다. 또한, 윈도우 NAF 기법을 이용한 연산 예로서, 일 때, 이고, 일 수 있다.
도 1i는 슬라이딩 윈도우(Sliding Window) 기법을 설명하기 위한 도면이다. 슬라이딩 윈도우 기법은 에 대한 와 타원곡선 상의 점 을 미리 계산하여 결과를 저장하기 때문에 에 따라 미리 계산한(pre- computation) 값들을 저장할 메모리가 요구될 수 있다. 그리고 슬라이딩 윈도우 기법은 부터 윈도우 NAF 기법에 비해 미리 계산한 값(pre-computation)이 많은 단점이 있지만, 일반적으로 사용하는 크기인 인 경우에 포인트 에디션 연산 횟수가 줄어든다는 장점이 있을 수 있다. 또한, 슬라이딩 윈도우 기법은 0,1로만 표현되는 일반적인 이진 표현을 사용할 수 있지만 이 경우는 타원곡선 상의 점 을 미리 계산하기 때문에 메모리 요구가 훨씬 증가할 수 있다. 따라서, 슬라이딩 윈도우 기법은 를 로 변환하여 사용함으로써, 효율을 증가시킬 수 있다. 슬라이딩 윈도우 기법의 상세 동작 과정은 도 1i의 제6 알고리즘에 나타낸 바와 같다.
도 2는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 나타내는 블록도이다.
본 발명의 고속의 NAF 변환 장치(200, 이하, NAF 변환 장치)는 설정부(210) 및 처리부(220)를 포함할 수 있다. 또한, 실시예에 따라, NAF 변환 장치(200)는 변경부(230), 연산부(240) 및 판단부(250)를 추가하여 구성할 수 있다.
설정부(210)는 윈도우의 값을 설정한다. 즉, 설정부(210)는 양의 정수인 윈도우의 값을 설정할 수 있다. 예를 들면, 설정부(210)는 2 이상의 정수 중 적어도 하나의 값을 윈도우의 값으로 설정할 수 있다.
처리부(220)는 공개키의 LSB(Least Significant Bit)를 기준으로, 상기 설정된 값을, 길이로 갖는 윈도우를, 상기 공개키의 적어도 일부에 제1 세팅한다. 즉, 처리부(220)는 제1 세팅으로서, 설정부(210)에 의해 설정된 값만큼 공개키의 일부분에 윈도우를 세팅할 수 있다. 예를 들면, 윈도우의 값이 3으로 설정된 경우, 처리부(220)는 공개키 중 LSB로부터 3 비트만큼을 제1 세팅할 수 있다.
또한, 처리부(220)는 상기 공개키 내 암호화 대상이 되는 타깃 비트가, 상기 윈도우의 밖에 있는 경우, 상기 타깃 비트가 포함되도록 상기 윈도우를, ω-비트 오른쪽 이동(ω-bit right shift)(상기 ω은 자연수)시켜, 상기 윈도우를 제2 세팅한다. 즉, 처리부(220)는 타깃 비트를 윈도우에 포함시키기 위하여, 윈도우의 값인 -비트만큼 이동시켜 윈도우를 제2 세팅할 수 있다. 예를 들면, 윈도우의 값이 3으로 설정된 경우, 처리부(220)는 윈도우를 3-비트 이동시켜 타깃 비트가 포함되도록 세팅할 수 있다.
설명의 이해를 돕기 위하여, 이하 도 3a, 도 3b, 도 4a, 및 도 4b를 참조하면서 도 2에서의 NAF 변환 장치(200)를 설명하고자 한다.
도 3a 및 도 3b는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 이용한 구현예를 설명하기 위한 도면이다.
도 3a 및 도 3b에 도시된 바와 같이, 처리부(220)는 에 대해 으로 설정되면, 알고리즘에서 가 홀수인 경우(즉, LSB가 1인 경우)의 윈도우를, 제1 세팅할 수 있다(회색 음영 부분, 311).
변경부(230)는 상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트를 모두 '0'으로 변경할 수 있다. 즉, 변경부(230)는 제1 세팅된 비트에 대하여 모두 '0'으로 변경할 수 있다. 도 3a의 일례에서, 변경부(230)는 윈도우에 포함된(즉, 회색 음영 부분) 비트를 모두 '0'으로 변경할 수 있다(312).
연산부(240)는 상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트에 대한 환산값을 산출할 수 있다. 도 3a의 일례에서, 연산부(240)는 가장 오른쪽의 3-비트가 011이라면 제3 알고리즘에서의 항목(2.1)인 에 대하여 을 산출할 수 있다.
이때, 변경부(230)는 산출된 상기 환산값이 선정된 기준값을 넘는지를 확인하여, 정해진 수를 가산 또는 감산하여, 상기 환산값을 '0'을 만들 수 있다. 예를 들어, 기준값이 로 선정된다면, 변경부(230)는 환산값 가 인지를 확인할 수 있다. 도 3a의 일례에서, 변경부(230)는 값이 제3 알고리즘에서의 항목(2.1.1)의 를 만족시키지 않으므로, 를 수행할 수 있다. 이때, 변경부(230)는 가 3이므로 을 수행하여 가장 오른쪽의 3-비트가 000이 되도록 할 수 있다(312).
이때, 처리부(220)는 상기 ω을 '1'로 결정하고, 상기 윈도우를, 1-비트 오른쪽 이동(1-bit right shift)시키되, 상기 타깃 비트가 상기 윈도우에 포함될 때까지 상기 1-비트 오른쪽 이동을 반복하여 상기 제2 세팅할 수 있다. 도 3a의 일례에서, 처리부(220)는 제3 알고리즘의 항목(2.3)을 수행하여 값을 2로 나누어 오른쪽으로 1-비트 이동시킬 수 있다(313). 즉, 도 3a에 도시된 바와 같이, 가장 오른쪽 3-비트를 표시하는 회색 음영은 이동될 수 있다.
여기서, NAF 변환 장치(200)는 알고리즘을 통해, 도 3a 및 도 3b와 같은 동작을 수행한 후 오른쪽으로 1-비트 이동시키는 과정에서, 현재 번째 비트를 본다고 가정할 때 번째 비트부터 번째 비트는 모두 0으로 바뀌는 것을 알 수 있다.
또한, 처리부(220)는 상기 윈도우의 1-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 이동할 수 있다. 도 3a에 도시된 바와 같이, 처리부(220)는 값을 1 증가시킴으로써, LSB를 가리키는 화살표를 이동시킬 수 있다.
또한, 처리부(220)는 상기 1-비트 오른쪽 이동 후, 상기 윈도우에서 이탈되는 비트값 '0'의 비트를 제거할 수 있다. 즉, 처리부(220)는 이전에(단계311, 312) LSB로 지정되었던 비트를 실제로 사라지도록 제거할 수 있다. 예를 들면, 도 3a에서, 단계(313)에 도시된 바와 같이, 처리부(220)는 윈도우에서 이탈된 부분(회색 음영이 아닌 부분)의 비트값을 제거할 수 있다.
도 3b의 일례에 대해 설명하면, 먼저, 단계(311)에서 설명한 바와 같이 처리부(220)는 으로 설정되면, 윈도우를 제1 세팅할 수 있다(회색 음영 부분, 321). 다음으로, 변경부(230)는 가장 오른쪽의 3-비트가 101이라면 제3 알고리즘에서의 항목(2.1)인 에 대하여 으로 할 수 있다. 이때, 변경부(230)는 값이 항목(2.1.1)의 를 만족시키므로, 값이 인 -3이 되고, 항목(2.1.2)의 를 수행할 수 있다. 변경부(230)는 가 -3이므로 을 수행하면 가장 오른쪽의 3-비트가 000이 되도록 할 수 있는데(322), 이때 전환(carry)이 발생할 수 있다. 본 명세서에서, 전환이 발생하는 것은 0 또는 1(0 or 1)이 1 또는 0(1 or 0)으로 바뀌는 것으로 표현하지만, 이에 한정되지는 않는다.
그 다음으로, 처리부(220)는 제3 알고리즘의 항목(2.3)을 수행하여 값을 2로 나누어 오른쪽으로 1-비트 이동시킬 수 있다(323). 또한, 처리부(220)는 값을 1증가시킴으로써, LSB를 가리키는 화살표를 이동시킬 수 있다.
실시예에 따라, NAF 변환 장치(200)는 알고리즘에 슬라이딩 윈도우 개념을 적용하고, 알고리즘에서 의 값이 반드시 보다 작은 양의 홀수가 된다는 특성을 활용할 수 있다. 예를 들어, 인 경우, NAF 변환 장치(200)는 001 및 011인 1 및 3만이 의 값이 될 수 있다는 특성을 활용할 수 있다. 또한, NAF 변환 장치(200)는 010, 100 및 110과 같은 짝수의 경우, LSB가 1이 될 때까지 오른쪽으로 이동하여 001 및 011의 형태가 되고, 101 및 111의 경우에는 전환(carry)가 발생하여 1000이 된 다음 LSB가 1이 될 때까지 오른쪽으로 이동하여 001의 형태가 될 수 있다는 특성을 활용할 수 있다. 따라서, NAF 변환 장치(200)는 의 값이 반드시 보다 작은 양의 홀수가 되는 특성을 활용할 수 있다.
도 4a 및 도 4b는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 이용한 구현예를 설명하기 위한 도면이다.
도 4a 및 도 4b에 도시된 바와 같이, 처리부(220)는 에 대해 으로 설정되면, 알고리즘에서 가 홀수인 경우(즉, LSB가 1인 경우)의 윈도우를, 제1 세팅할 수 있다(회색 음영 부분, 411, 421).
판단부(250)는 산출된 상기 환산값이 선정된 기준값을 넘는지를 판단할 수 있다. 즉, 연산부(240)에 의해 산출된 환산값에 대하여, 판단부(250)는 기준값을 기준으로 판단할 수 있다. 예를 들면, 판단부(250)는 기준값 을 기준으로, 환산값이 기준값을 넘는지를 판단할 수 있다.
이때, 처리부(220)는 상기 판단 결과, 넘지 않는 경우, 상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정할 수 있다. 즉, 처리부(220)는 기준값 보다 환산값이 작은 경우, 제1 세팅된 윈도우 크기(ω)만큼을, ω 비트만큼 오른쪽 이동시킬 수 있다. 도 4a에 도시된 바와 같이, 처리부(220)는 인 경우 오른쪽으로 ω-비트 이동시킬 수 있다(413). 단계(413)에서, ω-비트 이동한 후, NAF 변환 장치(200)는 윈도우가 이동한 비트의 값을 체크할 수 있다. 즉, 처리부(220)는 윈도우 크기가 3으로 제1 세팅된 경우, 윈도우 크기가 3인 윈도우를 3-비트만큼 오른쪽 이동시킬 수 있다. 3-비트 이동한 후, NAF 변환 장치(200)는 윈도우에 포함된 비트에 대하여, 0 또는 1 중 하나를 비트값으로 체크할 수 있다. 이 과정에서, 처리부(220)는 알고리즘의 연산 과정을 생략할 수 있다.
또한, 처리부(220)는 상기 판단 결과, 넘는 경우, 상기 타깃 비트의 비트값을 전환(carry)하고, 상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정할 수 있다. 즉, 처리부(220)는 전환(carry)을 발생시킴에 따라, 대신 를 수행할 수 있다(422). 또한, 처리부(220)는 비트값을 전환한 후, 도 4b에 도시된 바와 같이, 윈도우 크기가 ω인 윈도우를 ω 비트만큼 오른쪽 이동시킬 수 있다(423). 단계(423)에서, ω-비트 이동한 후, NAF 변환 장치(200)는 윈도우가 이동한 비트의 값을 체크할 수 있다. 예를 들면, 처리부(220)는 제1 세팅된 윈도우 크기가 3인 윈도우를 3-비트만큼 오른쪽 이동시킬 수 있다. 3-비트 이동한 후, NAF 변환 장치(200)는 윈도우에 포함된 비트에 대하여, 0 또는 1 중 하나를 비트값으로 체크할 수 있다.
또한, 처리부(220)는 상기 윈도우의 ω-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 상기 타깃 비트로 조정할 수 있다. 즉, 도 4a 및 도 4b에 도시된 바와 같이, 처리부(220)는 오른쪽으로 ω-비트 이동을 하여 번째 비트로 이동함으로써, LSB를 가리키는 화살표를 이동시킬 수 있다.
또한, NAF 변환 장치(200)는 NAF 변환 시, (은 양의 정수 의 이진수 변환에 따른 비트 수)이 증가하거나 홀수인 경우를 발생시키는 패턴이 많이 존재하는 경우에 NAF 변환 시간을 단축할 수 있다(은 양의 정수 의 이진수 변환에 따른 비트 수, 는 윈도우 크기).
도 5는 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 구현하기 위한 알고리즘을 도시한 도면이다.
도 5에 도시된 바와 같이, NAF 변환 장치(200)는 제7 알고리즘(알고리즘)으로서 수도 코드(pseudo code)로 표현될 수 있다. NAF 변환 장치(200)는 제7 알고리즘의 항목(2)에서의 While문의 수행 조건을 으로 설정하지 않을 수 있다. 그 이유는, 의 값이 반드시 보다 작은 양의 홀수가 되므로 NAF 변환 장치(200)는 와일(While)문의 중단 여부를 항목(2.3.1)에서만 판단하도록 할 수 있다. 항목(2.1)의 와일(While)문은 연속된 0을 빠르게 처리하기 위한 코드일 수 있다. 와일(While)문을 빠져 나와 항목(2.2)에 왔을 때는 는 반드시 홀수인 정수가 될 수 있다.
제7 알고리즘에서의 항목(2.3.2)는 도 4a의 동작 과정을 코드로 표현한 것이다. 이때, NAF 변환 장치(200)는 제3 알고리즘의 항목(2.1.2)과 '0임을 확신할 수 있는 -비트에 대한 1-비트씩 이동(shift) 하는 과정'을 생략할 수 있다. 즉, NAF 변환 장치(200)는 를 만큼 증가시키고 를 만큼 오른쪽으로 이동할 수 있다.
제7 알고리즘에서의 항목(2.4)는 도 4b의 동작 과정을 코드로 표현한 것이다. 이 경우, NAF 변환 장치(200)는 알고리즘에서 전환(carry)이 발생하기 때문에 를 수행할 수 있다. NAF 변환 장치(200)는 나머지 부분에 대하여 항목(2.3.2)와 같이 수행할 수 있다.
도 6 내지 도 11은 본 발명의 일실시예에 따른 고속의 NAF 변환 장치를 구현하기 위한 알고리즘의 성능 평가를 설명하기 위한 도면이다.
알고리즘(제7 알고리즘)의 성능 평가를 도시한 도면이다. 알고리즘에 대한 성능 평가는 입력 값 와 에 대해 를 계산하는 데에 걸리는 사이클 카운터(Cycle Counter)를 알고리즘과 비교하는 방식으로 평가할 수 있다. 알고리즘과 알고리즘은 의 길이 이 늘어나면 전체 사이클 카운터가 증가할 수 있다. 두 알고리즘은 오른쪽 이동(right shift)하는 과정에서 홀수인 경우가 증가할수록 사이클 카운터가 증가할 수 있다.
예를 들면, 의 길이가 8이고 가 2일 때, 100000002 은 홀수인 경우가 1번 발생하지만 와 은 홀수인 경우가 4번 발생하기 때문에 사이클 카운터가 더 클 수 있다. 이 홀수인 경우가 4번이 되는 이유는 도 6에 도시된 바와 같이, 일 때 발생하는 전환(Carry)에 의해 -비트 앞에 1이 발생하기 때문일 수 있다.
따라서, 본원의 성능 평가에서는 의 길이 에 대한 사이클 카운터 비교를 할 수 있다. 그뿐만 아니라, 본원의 성능 평가에서는 홀수의 경우가 발생하는 횟수에 대한 비교도 포함할 수 있다. 즉, 본원의 성능 평가에서는 0과 1로 조합되는 0,1,01,001,011,101 등과 같은 패턴들의 반복 횟수에 대해서 크기가 2인 경우와 3인 경우를 저성능 8-비트 마이크로프로세서 아트메가128(ATmega128)에서 구현하고 사이클 카운터를 측정하여 성능 평가를 수행할 수 있다.
의 이진수 비트수는 RSA에서 1024-비트 이상, ECC에서 160-비트 이상이 사용되며, 이러한 비트들은 0과 1에 의한 다양한 패턴들의 반복이라고 볼 수 있다. 따라서, 도 7에 도시된 바와 같이, 3-비트 이하에서 발생 가능한 다양한 반복 패턴에 따른 알고리즘 대비 알고리즘의 평균 및 편차 이득을 요약하여 도시한다. 알고리즘에 비해 알고리즘의 평균 사이클 카운터가 약 20% 정도 감소하고 편차 또한 30% 이상 감소한 것을 확인할 수 있다. 특히, 알고리즘은 알고리즘에 비해 편차에서 우수한 성능을 나타낼 수 있다. 이는, 알고리즘이 의 길이 이 늘어나더라도 사이클 카운터 증가량이 알고리즘 보다 작아서 다양한 입력 패턴에 대해 일정한 성능을 나타낼 수 있음을 의미할 수 있다.
또한, 본원에서는 두 알고리즘의 성능에 영향을 미치는 주요한 반복 패턴인 1과 01 비트 패턴에서의 반복 횟수에 따른 두 알고리즘의 사이클 카운터를 상세히 분석한 결과를 도 8 및 도 9에 도시한다. 도 8 및 도 9에 도시된 바와 같이, 알고리즘은 알고리즘에 비해 각각 평균 이득이 18.6%와 19.4%, 편차 이득이 31.3%와 31.8% 성능 향상을 나타낼 수 있다. 또한, 도 10 및 도 11에 도시된 바와 같이, 알고리즘은 알고리즘에 비해 각각 평균 이득이 11.8%와 14.3%, 편차 이득이 26.7%와 29.9% 성능 향상을 나타낼 수 있다.
도 11에 도시된 바와 같이, 반복 회수가 2에서 3으로(또는, 5에서 6으로) 증가함에 따라 클락 카운터(Clock Counter)가 증가하지 않는 이유는 -비트 이동(shift) 횟수가 동일하기 때문일 수 있다. 예를 들어, 일 때, 0101은 전환(carry)이 발생해 1000로 변환된 후 3 오른쪽 이동(right shift)을 한 다음 0001을 처리하기 때문에 한 번의 -비트 이동(shift)이 발생할 수 있다. 010101도 전환(carry)이 발생해 011000으로 변환된 후 오른쪽으로 3-비트 이동(shift)을 한 다음 011을 처리하기 때문에 이동(shift)이 한 번 발생할 수 있다. 반면에, 01010101은 전환(carry)이 발생하여 01011000으로 변환된 후 오른쪽으로 3-비트 이동(shift)을 한 다음 01011이 되고, 다시 01000으로 변환된 후 오른쪽으로 3-비트 이동(shift)을 하여 01을 처리하기 때문에 이동(shift)이 두 번 발생할 수 있다. 따라서, 01의 연속 횟수가 2번일 때와 3번일 때의 사이클 카운터는 동일하지만 4번일 때는 사이클 카운터가 증가하게 될 수 있다.
도 12는 본 발명의 일실시예에 따른 고속의 NAF 변환 방법을 구체적으로 도시한 작업 흐름도이다.
우선 본 실시예에 따른 고속의 NAF 변환 방법은 상술한 NAF 변환 장치(200)에 의해 수행될 수 있다.
먼저, NAF 변환 장치(200)는 윈도우의 값을 설정한다(1210). 즉, 단계(1210)는 양의 정수인 윈도우의 값을 설정하는 과정일 수 있다. 예를 들면, NAF 변환 장치(200)는 2 이상의 정수 중 적어도 하나의 값을 윈도우의 값으로 설정할 수 있다.
다음으로, NAF 변환 장치(200)는 공개키의 LSB(Least Significant Bit)를 기준으로, 상기 설정된 값을, 길이로 갖는 윈도우를, 상기 공개키의 적어도 일부에 제1 세팅한다(1220). 즉, 단계(1220)는 제1 세팅으로서, 단계(1210)에서 설정된 값만큼 공개키의 일부분에 윈도우를 세팅할 수 있다. 예를 들면, 윈도우의 값이 3으로 설정된 경우, NAF 변환 장치(200)는 공개키 중 LSB로부터 3 비트만큼을 제1 세팅할 수 있다.
다음으로, NAF 변환 장치(200)는 상기 공개키 내 암호화 대상이 되는 타깃 비트가, 상기 윈도우의 밖에 있는 경우, 상기 타깃 비트가 포함되도록 상기 윈도우를, ω-비트 오른쪽 이동(ω-bit right shift)(상기 ω은 자연수)시켜, 상기 윈도우를 제2 세팅한다(1230). 즉, NAF 변환 장치(200)는 타깃 비트를 윈도우에 포함시키기 위하여, 윈도우의 값인 ω-비트만큼 이동시켜 윈도우를 제2 세팅할 수 있다. 예를 들면, 윈도우의 값이 3으로 설정된 경우, NAF 변환 장치(200)는 윈도우를 3-비트 이동시켜 타깃 비트가 포함되도록 세팅할 수 있다.
실시예에 따라, NAF 변환 장치(200)는 상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트를 모두 '0'으로 변경할 수 있다. 즉, NAF 변환 장치(200)는 제1 세팅된 비트에 대하여 모두 '0'으로 변경할 수 있다.
실시예에 따라, NAF 변환 장치(200)는 상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트에 대한 환산값을 산출할 수 있다. 예를 들면, NAF 변환 장치(200)는 가장 오른쪽의 3-비트가 011이라면 제3 알고리즘에서의 항목(2.1)인 에 대하여 을 산출할 수 있다.
상기 '0'으로 변경하는 단계는, 산출된 상기 환산값이 선정된 기준값을 넘는지를 확인하여, 정해진 수를 가산 또는 감산하여, 상기 환산값을 '0'을 만드는 과정일 수 있다. 예를 들어, 기준값이 로 선정된다면, NAF 변환 장치(200)는 환산값 가 인지를 확인할 수 있다. NAF 변환 장치(200)는 값이 제3 알고리즘에서의 항목(2.1.1)의 를 만족시키지 않으므로, 를 수행할 수 있다. 이때, NAF 변환 장치(200)는 가 3이므로 을 수행하여 가장 오른쪽의 3-비트가 000이 되도록 할 수 있다.
이때, 단계(1230)는 상기 ω을 '1'로 결정하고, 상기 윈도우를, 1-비트 오른쪽 이동(1-bit right shift)시키되, 상기 타깃 비트가 상기 윈도우에 포함될 때까지 상기 1-비트 오른쪽 이동을 반복하여 상기 제2 세팅하는 과정일 수 있다. 예를 들면, NAF 변환 장치(200)는 제3 알고리즘의 항목(2.3)을 수행하여 값을 2로 나누어 오른쪽으로 1-비트 이동시킬 수 있다.
또한, 단계(1230)는 상기 1-비트 오른쪽 이동 후, 상기 윈도우에서 이탈되는 비트값 '0'의 비트를 제거하는 과정일 수 있다. 즉, NAF 변환 장치(200)는 이전에 LSB로 지정되었던 비트를 실제로 사라지도록 제거할 수 있다. 예를 들면, NAF 변환 장치(200)는 윈도우에서 이탈된 부분의 비트값을 제거할 수 있다.
또한, 단계(1230)는 상기 윈도우의 1-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 이동하는 과정일 수 있다. 예를 들면, NAF 변환 장치(200)는 값을 1 증가시킴으로써, LSB를 이동할 수 있다.
실시예에 따라, NAF 변환 장치(200)는 산출된 상기 환산값이 선정된 기준값을 넘는지를 판단할 수 있다. 즉, 상기 환산값을 산출하는 단계에서 산출된 환산값에 대하여, NAF 변환 장치(200)는 기준값을 기준으로 판단할 수 있다. 예를 들면, NAF 변환 장치(200)는 기준값 을 기준으로, 환산값이 기준값을 넘는지를 판단할 수 있다.
실시예에 따라, NAF 변환 장치(200)는 상기 판단 결과, 넘지 않는 경우, 상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정할 수 있다. 즉, NAF 변환 장치(200)는 기준값 보다 환산값이 작은 경우, 제1 세팅된 윈도우 크기(ω)만큼을 ω 비트만큼 오른쪽 이동시킬 수 있다. NAF 변환 장치(200)는 인 경우 오른쪽으로 ω-비트 이동시킬 수 있다. ω-비트 이동한 후, NAF 변환 장치(200)는 윈도우가 이동한 비트의 값을 체크할 수 있게 된다. 예를 들면, NAF 변환 장치(200)는 윈도우 크기가 3으로 제1 세팅된 경우, 윈도우 크기가 3인 윈도우를 3-비트만큼 오른쪽 이동시킬 수 있다. 3-비트 이동한 후, NAF 변환 장치(200)는 윈도우에 포함된 비트에 대하여, 0 또는 1 중 하나를 비트값으로 체크할 수 있다. 이 과정에서, NAF 변환 장치(200)는 알고리즘의 연산 과정을 생략할 수 있다.
실시예에 따라, NAF 변환 장치(200)는 상기 판단 결과, 넘는 경우, 상기 타깃 비트의 비트값을 전환(carry)하고, 상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정할 수 있다. 즉, NAF 변환 장치(200)는 전환(carry)을 발생시킴에 따라, 대신 를 수행할 수 있다. 또한, NAF 변환 장치(200)는 비트값을 전환한 후, 윈도우 크기가 ω인 윈도우를 ω 비트만큼 오른쪽 이동시킬 수 있다. ω-비트 이동한 후, NAF 변환 장치(200)는 윈도우가 이동한 비트의 값을 체크할 수 있다. 예를 들면, NAF 변환 장치(200)는 제1 세팅된 윈도우 크기가 3인 윈도우를 3-비트만큼 오른쪽 이동시킬 수 있다. 3-비트 이동한 후, NAF 변환 장치(200)는 윈도우에 포함된 비트에 대하여, 0 또는 1 중 하나를 비트값으로 체크할 수 있다.
실시예에 따라, NAF 변환 장치(200)는 상기 윈도우의 ω-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 상기 타깃 비트로 조정할 수 있다. 예를 들면, NAF 변환 장치(200)는 오른쪽으로 ω-비트 이동을 하여 번째 비트로 이동함으로써, LSB를 가리키는 화살표를 이동시킬 수 있다.
이러한, NAF 변환 방법은 번의 비교 연산 과정을 수행함으로써, 번의 비트 비교 연산 과정을 수행하는 알고리즘의 연산 처리 속도를 최적화 할 수 있다(은 양의 정수 의 이진수 변환에 따른 비트 수, 는 윈도우 크기).
또한, NAF 변환 방법은 NAF 변환 시, (은 양의 정수 의 이진수 변환에 따른 비트 수)이 증가하거나 홀수인 경우를 발생시키는 패턴이 많이 존재하는 경우에 NAF 변환 시간을 단축할 수 있다.
본 발명의 실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.
Claims (16)
- 윈도우의 값을 설정하는 설정부;공개키의 LSB(Least Significant Bit)를 기준으로, 상기 설정된 값을, 길이로 갖는 윈도우를, 상기 공개키의 적어도 일부에 제1 세팅하고, 상기 공개키 내 암호화 대상이 되는 타깃 비트가, 상기 윈도우의 밖에 있는 경우, 상기 타깃 비트가 포함되도록 상기 윈도우를, ω-비트 오른쪽 이동(ω-bit right shift)(상기 ω은 자연수)시켜, 상기 윈도우를 제2 세팅하는 처리부를 포함하는 고속의 NAF 변환 장치.
- 제1항에 있어서,상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트를 모두 '0'으로 변경하는 변경부를 더 포함하고,상기 처리부는,상기 ω을 '1'로 결정하고, 상기 윈도우를, 1-비트 오른쪽 이동(1-bit right shift)시키되, 상기 타깃 비트가 상기 윈도우에 포함될 때까지 상기 1-비트 오른쪽 이동을 반복하여 상기 제2 세팅하는고속의 NAF 변환 장치.
- 제2항에 있어서,상기 처리부는,상기 1-비트 오른쪽 이동 후, 상기 윈도우에서 이탈되는 비트값 '0'의 비트를 제거하는고속의 NAF 변환 장치.
- 제2항에 있어서,상기 처리부는,상기 윈도우의 1-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 이동하는고속의 NAF 변환 장치.
- 제2항에 있어서,상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트에 대한 환산값을 산출하는 연산부를 더 포함하고,상기 변경부는,산출된 상기 환산값이 선정된 기준값을 넘는지를 확인하여, 정해진 수를 가산 또는 감산하여, 상기 환산값을 '0'을 만드는고속의 NAF 변환 장치.
- 제1항에 있어서,상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트에 대한 환산값을 산출하는 연산부; 및산출된 상기 환산값이 선정된 기준값을 넘는지를 판단하는 판단부를 더 포함하고,상기 처리부는,상기 판단 결과, 넘지 않는 경우,상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정하는고속의 NAF 변환 장치.
- 제6항에 있어서,상기 판단 결과, 넘는 경우,상기 처리부는,상기 타깃 비트의 비트값을 전환(carry)하고, 상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정하는고속의 NAF 변환 장치.
- 제6항 또는 제7항에 있어서,상기 처리부는,상기 윈도우의 ω-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 상기 타깃 비트로 조정하는고속의 NAF 변환 장치.
- 윈도우의 값을 설정하는 단계;공개키의 LSB(Least Significant Bit)를 기준으로, 상기 설정된 값을, 길이로 갖는 윈도우를, 상기 공개키의 적어도 일부에 제1 세팅하는 단계; 및상기 공개키 내 암호화 대상이 되는 타깃 비트가, 상기 윈도우의 밖에 있는 경우,상기 타깃 비트가 포함되도록 상기 윈도우를, ω-비트 오른쪽 이동(ω-bit right shift)(상기 ω은 자연수)시켜, 상기 윈도우를 제2 세팅하는 단계를 포함하는 고속의 NAF 변환 방법.
- 제9항에 있어서,상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트를 모두 '0'으로 변경하는 단계를 더 포함하고,상기 제2 세팅하는 단계는,상기 ω을 '1'로 결정하는 단계; 및상기 윈도우를, 1-비트 오른쪽 이동(1-bit right shift)시키되, 상기 타깃 비트가 상기 윈도우에 포함될 때까지 상기 1-비트 오른쪽 이동을 반복하여 상기 제2 세팅하는 단계를 포함하는 고속의 NAF 변환 방법.
- 제10항에 있어서,상기 제2 세팅하는 단계는,상기 1-비트 오른쪽 이동 후, 상기 윈도우에서 이탈되는 비트값 '0'의 비트를 제거하는 단계를 더 포함하는 고속의 NAF 변환 방법.
- 제10항에 있어서,상기 제2 세팅하는 단계는,상기 윈도우의 1-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 이동하는 단계를 더 포함하는 고속의 NAF 변환 방법.
- 제10항에 있어서,상기 NAF 변환 방법은,상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트에 대한 환산값을 산출하는 단계를 더 포함하고,상기 '0'으로 변경하는 단계는,산출된 상기 환산값이 선정된 기준값을 넘는지를 확인하여, 정해진 수를 가산 또는 감산하여, 상기 환산값을 '0'을 만드는 단계를 포함하는 고속의 NAF 변환 방법.
- 제9항에 있어서,상기 제1 세팅된 윈도우에 포함되는, 상기 공개키 내 비트에 대한 환산값을 산출하는 단계;산출된 상기 환산값이 선정된 기준값을 넘는지를 판단하는 단계; 및상기 판단 결과, 넘지 않는 경우,상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정하는 단계를 더 포함하는 고속의 NAF 변환 방법.
- 제14항에 있어서,상기 판단 결과, 넘는 경우,상기 타깃 비트의 비트값을 전환(carry)하는 단계; 및상기 윈도우를 상기 ω-비트 오른쪽 이동시켜, 상기 윈도우의 세팅 위치를 상기 타깃 비트로 조정하는 단계를 더 포함하는 고속의 NAF 변환 방법.
- 제14항 또는 제15항에 있어서,상기 윈도우의 ω-비트 오른쪽 이동에 연동하여, 상기 공개키의 LSB를 상기 타깃 비트로 조정하는 단계를 더 포함하는 고속의 NAF 변환 방법.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2016-0154192 | 2016-11-18 | ||
| KR1020160154192A KR101817879B1 (ko) | 2016-11-18 | 2016-11-18 | 고속의 naf 변환 장치 및 고속의 naf 변환 방법 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| WO2018092981A2 true WO2018092981A2 (ko) | 2018-05-24 |
| WO2018092981A3 WO2018092981A3 (ko) | 2018-08-02 |
Family
ID=61004065
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2017/001113 Ceased WO2018092981A2 (ko) | 2016-11-18 | 2017-02-02 | 고속의 naf 변환 장치 및 고속의 naf 변환 방법 |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR101817879B1 (ko) |
| WO (1) | WO2018092981A2 (ko) |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020057796A1 (en) * | 1998-12-24 | 2002-05-16 | Lambert Robert J. | Method for accelerating cryptographic operations on elliptic curves |
| KR101309797B1 (ko) * | 2006-12-01 | 2013-09-23 | 삼성전자주식회사 | 성긴 w-NAF 키 생성방법,이를 이용한 연산 방법 및암호화 방법 |
| CA2631276C (en) * | 2008-05-14 | 2014-12-09 | Patrick Longa | Exponentiation method using multibase number representation |
| US8549299B2 (en) * | 2011-02-28 | 2013-10-01 | Certicom Corp. | Accelerated key agreement with assisted computations |
| EP2815623B1 (en) | 2012-02-14 | 2018-08-29 | Nokia Technologies Oy | Device to device security using naf key |
| FR3001315B1 (fr) * | 2013-01-18 | 2016-05-06 | Inside Secure | Procede de cryptographie comprenant une operation de multiplication par un scalaire ou une exponentiation |
-
2016
- 2016-11-18 KR KR1020160154192A patent/KR101817879B1/ko not_active Expired - Fee Related
-
2017
- 2017-02-02 WO PCT/KR2017/001113 patent/WO2018092981A2/ko not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| KR101817879B1 (ko) | 2018-01-11 |
| WO2018092981A3 (ko) | 2018-08-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112865954B (zh) | 用于Paillier解密的加速器、芯片及系统 | |
| Lu et al. | A novel division algorithm for the residue number system | |
| WO2014126322A1 (ko) | 클라우드 컴퓨팅을 위한 효율적인 자원 배분 장치 | |
| WO2023120875A1 (ko) | 속성 기반 접근 제어를 지원하는 실시간 iot 데이터 공유 시스템 및 그 방법 | |
| CN108875416B (zh) | 椭圆曲线多倍点运算方法和装置 | |
| Tsmots et al. | Neural-like methods and hardware structures for real-time data encryption and decryption | |
| CN113467752B (zh) | 用于隐私计算的除法运算装置、数据处理系统及方法 | |
| JPH07253752A (ja) | 疑似乱数生成装置と該装置により生成された疑似乱数に基づく暗号文を用いる通信方法とその装置 | |
| US3878985A (en) | Serial-parallel multiplier using booth{3 s algorithm with combined carry-borrow feature | |
| Tynymbayev et al. | Devices for multiplying modulo numbers with analysis of the lower bits of the multiplier | |
| WO2018092981A2 (ko) | 고속의 naf 변환 장치 및 고속의 naf 변환 방법 | |
| KR20040095526A (ko) | 저전력 모듈로 곱셈을 수행하는 연산장치 | |
| JP3660075B2 (ja) | 除算装置 | |
| US12250303B2 (en) | Protection of a cryptographic operation | |
| TWI843313B (zh) | 模乘器、安全晶片、電子設備及加密方法 | |
| US3489888A (en) | Floating point look-ahead binary multiplication system utilizing two's complement notation for representing negative numbers | |
| Cho et al. | High-speed modular multiplication algorithm for RSA cryptosystem | |
| Liao et al. | A new implementation of 16-bit parallel prefix adder for high speed and low area | |
| CA2324621A1 (en) | Accelerated finite field operations on an elliptic curve | |
| CN115276994B (zh) | 加密数据处理方法、装置、电子设备和存储介质 | |
| US20070050442A1 (en) | Method, apparatus, and program for modular arithmetic | |
| Tynymbayev et al. | Devices for Modularizing Numbers into a Square in Applications based on Public-Key Cryptography | |
| Premananda et al. | Design of area and power efficient complex number multiplier | |
| Kapilavai et al. | VLSI Implementation of High-Performance Ternary Operand PPA for Fir Filter Application | |
| SU234753A1 (ru) | Арифметическое устройство специализированной цифровой вычислительной машины |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17872512 Country of ref document: EP Kind code of ref document: A2 |
|
| NENP | Non-entry into the national phase in: |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17872512 Country of ref document: EP Kind code of ref document: A2 |
