KR20020049659A - add modular multiplication - Google Patents

add modular multiplication Download PDF

Info

Publication number
KR20020049659A
KR20020049659A KR1020000078871A KR20000078871A KR20020049659A KR 20020049659 A KR20020049659 A KR 20020049659A KR 1020000078871 A KR1020000078871 A KR 1020000078871A KR 20000078871 A KR20000078871 A KR 20000078871A KR 20020049659 A KR20020049659 A KR 20020049659A
Authority
KR
South Korea
Prior art keywords
mod
calculation
modular
result
multiplier
Prior art date
Application number
KR1020000078871A
Other languages
Korean (ko)
Inventor
김동훈
Original Assignee
김동훈
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 김동훈 filed Critical 김동훈
Priority to KR1020000078871A priority Critical patent/KR20020049659A/en
Publication of KR20020049659A publication Critical patent/KR20020049659A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/723Modular exponentiation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/722Modular multiplication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/728Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic using Montgomery reduction

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE: A method and an apparatus for performing a modular multiplication using a modular result value estimated are provided to perform a modular power calculation at high speed by completing a modular multiplication through an addition of an estimated modular value calculated in case that the modular multiplication is performed. CONSTITUTION: Each calculation of multiplier is expressed in the form of a binary number. An S*S mod N form of calculation can be performed according to each characteristic of binary bit. Or, an S*S mod N and an S*M mod N form of calculation can be performed. These ways of calculation are repeatedly performed. Therefore, all modular power calculation is completed. The S*S mod N and the S*M mod N calculation are effectively performed. According to that, the time for calculation can be reduced.

Description

계산된 모듈라 결과값을 이용한 모듈라 곱셈방법 및 그 장치{add modular multiplication}Modular multiplication method and apparatus thereof using calculated modular results {add modular multiplication}

본 발명은 공통 피승수 곱셈을 이용한 고속 멱승 방법에서 사용되는 모듈라 곱셈의 계산속도를 높여 고속으로 계산된 결과를 통해 계산속도와 계산성능을 향상시키고 이 방법을 회로화 하여 구성하는 방법을 통해 산업적으로 이를 활용하는 것에 관한 것이다.The present invention improves the computational speed and the computational performance through the result of high speed calculation by increasing the computational speed of the modular multiplication used in the fast multiplication method using the common multiplicative multiplication. It's about using.

통상 공개키 암호화 시스템에서 사용되는 계산에서 큰 수의 모듈라 멱승계산과 이를 구성하는 모듈라 곱셈의 계산이 필요하다. 그러나 이때 모듈라 곱셈 계산은 곱셈과 나눗셈의 계산구조이므로 계산량이 크고 시간이 많이 걸리게 되어 이를 해결하는 게 중요한 과제이다.In a calculation used in a public key encryption system, a large number of modular power multiplication calculations and modular multiplications constituting the same are required. However, since modular multiplication calculation is a calculation structure of multiplication and division, it is important to solve this problem because the calculation amount is large and time consuming.

이 계산을 해결하는 효과적인 방법으로 제안되고 사용되는 기술로 현재까지 가장 뛰어난 것은 몽고메리 모듈라 방법과 이를 응용한 공통 몽고메리 모듈라 방법이다. 이 방법은 최근 국내에서도 특허 10-256776-0000 로 특허된 예가 있는데 그계산방법을 보면 각 모듈라 곱셈의 수를 몽고메리형의 수로 변환하고, 이를 곱셈과 덧셈을 반복하여 자릿수를 줄여 가는 계산과 그 계산의 반복을 통한 멱승 계산으로 구성하는 것을 기본으로 하고 있다.The most prominent technique proposed and used to solve this calculation is the Montgomery Modular method and the common Montgomery Modular method to which it is applied. This method has recently been patented in Korea as patent 10-256776-0000. In the calculation method, each modular multiplication is converted into a Montgomery type, and the multiplication and addition are repeated to reduce the number of digits and calculate the calculation. Basically, it is composed of a power calculation through repetition of.

본 발명이 이루고자 하는 기술적 과제는 모듈라 곱셈계산시 미리 계산된 일부분의 모듈라 예상값의 덧셈을 통해 모든 모듈라 곱셈계산을 완료하고, 이를 통해 고속 모듈라 멱승 방법을 제공하는 것이다.The technical problem to be achieved by the present invention is to complete all the modular multiplication calculation by the addition of a predetermined part of the modular expected value during the modular multiplication calculation, thereby providing a fast modular power multiplication method.

도 1은 본 발명중 상위값으로 부터 축소화는 계산방법을 장치화한 경우의 구성 블럭도이다.Fig. 1 is a block diagram showing the configuration of a method for calculating a reduction from the higher value in the present invention.

도 2은 본 발명중 병렬 덧셈을 통한 모듈라 축소화 하는 방법의 장치화된 경우에 대한 구성블럭도이다.FIG. 2 is a block diagram illustrating an apparatus of a method of modular reduction through parallel addition according to the present invention.

도 3은 도1의 장치의 모듈라 축소기에서의 계산양태를 도시한 도면이다.FIG. 3 shows a computational aspect in the modular reducer of the device of FIG. 1.

도 4은 본 발명이전에 가장 뛰어난 것으로 인정되던 몽고메리 모듈라 장치의 블럭 순서도이다.4 is a block flow diagram of a Montgomery modular apparatus, which was previously considered to be the most outstanding.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

도 1의 1... 입력값 입력Enter input value of 1 ... of FIG.

도 1의 2...값의 모듈라 축소기로의 입력1 of 2 ... Input to Modular Reducer of Values

도 1의 3...모듈라 축소기로의값 입력To the modulator reducer of FIG. Value input

도 1의 4...고속 메모리 장치로의의 값 입력4 to the high-speed memory device Enter a value for

도 1의 5...모듈라 축소기로의mod N값 입력To the 5 ... modular reducer of FIG. enter mod N value

도 1의 6... 결과값 출력Output of 6 ... result of FIG.

도 2의 1...값을 고속 메모리로 입력1 of FIG. Enter value into fast memory

도 2의 2...값을 고속 메모리로 입력2 of FIG. Enter value into fast memory

도 2의 3...값을 고속 메모리로 입력3 of FIG. Enter value into fast memory

도 2의 4....이하의 값 입력4. of FIG. Enter the following value

도 2의 5.... 덧셈 결과에서 뽑은형태의 값을 고속 메모리로 입력5 ... pulled from the addition result Input the value of type into high speed memory

도 2의 6... 덧셈 결과중이하 값만을 하부 덧셈기로 입력In the addition result of FIG. Enter less than value only with lower adder

도 2의 7... 임시 결과 값을 출력Output the 7 ... temporary result value of FIG.

본 발명은 상기 기술적 과제를 달성하기 위하여, 주어진 수 T, M, S, N에 대해서, (a) 모듈라곱셈을=S*M mod N,=S*S mod N이라 할 때 상기 계산을 각각 S*M과 S*S의 곱셈과 그 결과값에 대한 mod N계산으로 분리하여형태의 기수(radix)b에 대해 다음과 같이 변형하는 단계The present invention, in order to achieve the above technical problem, for a given number T, M, S, N, (a) modular multiplication = S * M mod N, = S * S mod N Deforming the radix b of the form

S*S mod N=S( + +......+ ) mod NS * S mod N = S ( + + ...... + ) mod N

S*S=S( + +......+ )S * S = S ( + + ...... + )

S*S=( + +......+ )*( + +......+ )= S * S = ( + + ...... + ) * ( + + ...... + ) =

S*S==**+**+**+**+.....+** S * S == * * + * * + * * + * * + ..... + * *

S*S mod N=mod NS * S mod N = mod N

S*M mod N=S( + +......+ ) mod NS * M mod N = S ( + + ...... + ) mod N

S*M=S( + +......+ )S * M = S ( + + ...... + )

S*M=( + +......+ )*( + +......+ )= S * M = ( + + ...... + ) * ( + + ...... + ) =

S*M==**+**+**+**+.....+** S * M == * * + * * + * * + * * + ..... + * *

S*M mod N=mod NS * M mod N = mod N

(b) 모듈라 곱셈에서 S*S계산을 공통곱셈 부분은 한번의 곱셈으로 변환하고, S*M계산은 모든 곱셈을 하여 결과를 더해 나타내는 다음과 같이 변환하는 단계(b) In modular multiplication, converting S * S calculation to common multiplication part by one multiplication, and S * M calculation by multiplying all the results and adding the result as follows.

S*S=(**)+ 2 * (**)S * S = ( * * ) + 2 * ( * * )

S*M= (**)S * M = ( * * )

(c) N보다 큰 가장 작은 b의 승수에 대해 아래와 같이 예상되는 모듈라값의 일부분을 계산하여 미리 메모리에 저장하여 두는 단계(c) multiplier of smallest b greater than N Computing a part of the expected modular value for and storing in memory in advance

Q()= mod NQ ( ) = mod N

(d) 그 값을 활용하여 예상되는 모듈라 값을 활용하여 모듈라 축소화 계산을 덧셈으로 변환하여 정수계산을 반복하는 단계(d) repeating integer calculation by converting the modular reduction calculation to addition using the expected modular value using the value.

for i=2n-1 to i=k step -1for i = 2n-1 to i = k step -1

{{

U=T/ U = T /

T=T mod T = T mod

T=T+Q(U)* T = T + Q (U) *

}}

(e) (d)의 결과값인 T가보다 큰 경우 (T-N)한 결과를 T에 대입하는 단계(e) T, the result of (d) Substituting (TN) results into T for greater than

(f)모든 모듈라 멱승 계산이 완료된 경우 그 결과 T가 T>N이 되는 경우 T mod N을 다시 계산하여 결과를 구하는 방법(f) If all modular power calculations have been completed, and the result T is T> N, calculate T mod N again to get the result.

(g) S*S와 S*M을 곱셈과 덧셈기로 구성된 (b)계산을 구하는 곱셈장치와 덧셈과 고속 메모리 모듈을 통해 (d)계산을 이루는 모듈라장치를 통해 계산하는 도 1과 같은 모듈라 곱셈장치(g) Modular multiplication as shown in FIG. 1 which calculates S * S and S * M by multiplication and adder consisting of multiplication and addition; Device

(h) N보다 큰 가장 작은 b의 승수에 대해 아래의 식과 같이 계산하는 방법(h) multiplier of smallest b greater than N How to calculate for

T= + +......+ + + +.....+ T = + + ...... + + + + ..... +

T mod N=( + +......+ mod N + mod NT mod N = ( + + ...... + mod N + mod N

+ mod N+.....+ mod N) mod N+ mod N + ..... + mod N) mod N

(i) (h)와 같은 계산을 미리 계산된 예상모듈라 값이 저장된 고속 메모리 장치와 이들의 덧셈장치로 구성된 도 2와 같은 구성의 모듈라 축소장치(i) A modular reduction apparatus having a configuration as shown in FIG. 2, comprising a high-speed memory device storing an expected modular value calculated in advance, and adding them.

이하 본 발명의 내용과 구성을 구체적으로 설명하기로 한다.Hereinafter, the content and configuration of the present invention will be described in detail.

현재 이용되고 있는 모듈라 멱승 계산에서는 각 승수에 대한 계산을 2진수의 형태로 표시하고, 각 2진 비트의 특성에 따라 S*S mod N 형의 계산만을 하는 경우 또는 S*S mod N과 S*M mod N 형의 두개의 계산을 다하는 경우 등 두 가지의 유형의 계산을 썩어서 반복적으로 계산하여 모든 모듈라 멱승 계산을 완성하는 방법이 널리 쓰인다.(특허 10-257124-0000 참조)Currently used modular power calculations show the calculation for each multiplier in binary form, and only perform S * S mod N type calculations or S * S mod N and S * depending on the characteristics of each binary bit. It is widely used to complete all modular power calculations by rotating and repeatedly calculating two types of calculations, such as M mod N two calculations (see Patent 10-257124-0000).

당해 발명은 이 두 가지 유형에 대한 계산에서 쓰이는 S*S mod N, S*M mod N의 계산을 효과적으로 계산하여 계산시간을 축소하는 기술과 이를 구현할 수 있는 회로의 구성방법에 대한 것이다. 우선 당해 발명은 S*S와 S*M의 곱셈 계산과 그 결과 값의 mod N의 계산을 분리하여 계산한다.The present invention relates to a technique for reducing the calculation time by efficiently calculating the calculation of S * S mod N, S * M mod N used in the calculation of the two types and a method of constructing a circuit that can implement the same. First, the present invention calculates separately the multiplication calculation of S * S and S * M and the calculation of mod N of the resulting value.

S*M은 위 (b) 와 같이 계산 할 수 있으므로 n*n 개의 곱셈과 그에 따른 덧셈으로 표현 될 수 있고, S*S는 공통 계산부분을 한번만 계산하면 n(n+1)/2개의 곱셈 계산과 그에 따른 덧셈 계산 그리고 공통계산부분의 결과 값을 비트 쉬프트로 2배하는 계산으로 이뤄 질 수 있다.Since S * M can be calculated as in (b) above, it can be expressed as n * n multiplications and additions, and S * S multiplies n (n + 1) / 2 multiplications once the common calculation part is calculated. The calculations can be made with the addition, the addition calculations, and the calculations that double the result value of the common calculation part by bit shift.

당해 발명의 mod N계산은 복잡한 나눗셈 계산을 미리 계산된 모듈라 예상값을 통한 덧셈으로 변형하여 계산하게 되는데 이를 설명하기 위해서는 아래와 같은 이해가 필요하다.In the mod N calculation of the present invention, the complex division calculation is transformed into addition through a pre-calculated modular expected value.

S*S와 S*M유형의 계산 결과값이 T라 할 때When the calculation result of S * S and S * M type is T

T= + +......+ + + +.....+ T = + + ...... + + + + ..... +

라 표현할 수 있고 ,Can be expressed as

N보다 큰 가장 작은 b의 승수가 존재할 때 아래와 같이 표현된다.Multiplier of smallest b greater than N Is present when:

T mod N=(( + +......) mod N+ mod N+ mod N+ mod N+.....+ mod N) mod NT mod N = (( + + ......) mod N + mod N + mod N + mod N + ..... + mod N) mod N

이때 에 대해서만 생각하면At this time Just think about

mod N= (( mod N)*b )mod N mod N = (( mod N) * b) mod N

이 된다. 이를 통해 상위 자릿수에 대한 수도 변환하면Becomes This converts the number of high digits

mod N=(( mod N )*) mod N mod N = (( mod N) * ) mod N

......................

mod N=(( mod N)*)mod N mod N = (( mod N) * mod N

mod N=(( mod N)*b) mod N mod N = (( mod N) * b) mod N

형태가 되고 mod N의 계산결과가보다 작아야 되므로 가 mod N계산을 취함으로써 b자릿수만큼 축소됨을 알 수 있다.( mod N< N <<= <단 1 << b)Form mod N Should be less than Can be reduced by b digits by taking the mod N calculation. mod N <N < <= < Only 1 < <b)

이를 통해 아래의 식이 옳음을 알 수 있고,This shows that the equation below is correct,

( mod N+ mod N) mod N=( +( mod N )*b) mod N=( +( mod N )*) mod N( mod N + mod N) mod N = ( + ( mod N) * b) mod N = ( + ( mod N) * ) mod N

바로 위식과 같은 형태로 차례로 최 상위 b의 승수로 부터 mod N 계산을 활용하여 기수 b만큼의 자릿수를 줄여가면서 덧셈으로 계산하여 그 결과를보다 작게 하는 도 3과 같은 양태로 한번의 모듈라 곱셈 계산을 완료할 수 있다.From the top b multiplier Use mod N calculation to reduce the number of digits in base b and add the result 3, the modular multiplication calculation can be completed.

그러나 이 계산에 몇 가지 생각해야 하는 문제가 있다.However, there are some issues to think about in this calculation.

첫 번째 문제로는 한번의 모듈라 곱셈 계산이 N<를 만족하는 만큼만 줄이므로 이렇게 줄인 값은 T mod N + K *N형태가 되어 문제가 될 것 같지만,(단 K는 임의의 수) 이 값은 모든 모듈라 멱승계산이 완료되면 다시 mod N하면 K *N에 의해확대된 값이 축소할 수 있게 되므로 큰 문제는 없다.The first problem is that one modular multiplication calculation is N < Since this decreases only as much as satisfying, this reduced value becomes T mod N + K * N, but it seems to be a problem (where K is an arbitrary number). Since the value expanded by N can be reduced, there is no big problem.

두 번째 문제는 mod N은 어떻게 매번 구하는가가 문제이다. 하지만 그 부분은 미리 모든 에 대해 계산된 값을 메모리에 넣어 두고, 계산에 이용하면 되므로 별 어려움이 없다.The second problem is The problem is how to get mod N each time. But that part is all in advance There is no difficulty because the value calculated for is stored in memory and used for calculation.

세 번째 문제는 마지막 모듈라 축소 계산이 완료 되었을 때 한자리수의 오름이 일어나보다 큰 수가 결과 값이 될 때 어떻게 해야 될 것인가가 문제이다. 이때는에 해당하는 비트를 지우고-N을 한 값을 더해 주면 된다. 이때 다시 한자리수 오름은 일어나지 않는다The third problem is that when the last modular reduction calculation is completed, The question is what to do when a larger number becomes the result. At this time Clear the bit corresponding to Just add -N. At this time, no single digit rise occurs.

마지막 모듈라 축소 계산의 결과값을 TM이라 하고 아래와 같이 증명하면If the result of the last modular reduction calculation is called TM,

< TM <= (-1)+(N-1) <TM <= ( -1) + (N-1)

(TM-+mod N )<= (TM-+- N) <=-2(TM- + mod N) <= (TM- + -N) <= -2

이 모든 계산을 통해 모듈라 멱승 계산에 들어 있는 S*S mod N형의 계산만이 존재하는 경우와, S*S mod N, S*M mod N형의 두 가지 계산이 존재하는 경우 이 둘의 계산량을 기존의 방법과 비교해 보면 S*S mod N형의 계산만이 존재하는 경우는 앞에서 설명하였듯이 공통계산을 한번만 곱셈하면 n(n+1)/2 번의 곱셈과 이에 따른 덧셈 그리고 모듈라 축소과정에서 이뤄지는 덧셈으로 구성된다. 이는 기존의 방법으로 가장 뛰어난 기술인 몽고메리 계산방법이 도 4와 같은 곱셈으로 2n*n +n번의 곱셈인데 비해 곱셈수를 혁신적으로 줄일 수 있고, 그 반면 덧셈계산이 늘어나는 약점이 있으나, 곱셈은 덧셈과는 달리 하드웨어로 만들기 어렵운 많은 계산량이 필요한 장치로서 계산시간이 많이 걸리고, 하드웨어설계가 어려운 단점이 있어 본 발명의 방법과 그에 따른 장치가 더 효과적이라 할 수 있다.With all these calculations, if there are only S * S mod N calculations in the modular power calculation, and there are two calculations, S * S mod N and S * M mod N, both Compared to the conventional method, if only S * S mod N type calculations exist, as described above, multiplying the common calculation once requires n (n + 1) / 2 multiplication and subsequent addition and modular reduction. It consists of addition. This is the Montgomery calculation method, which is the most advanced method of the conventional method, which is 2n * n + n multiplications as shown in FIG. Unlike other devices that require a large amount of calculation, which is difficult to make with hardware, it takes a lot of computation time and has a disadvantage in that hardware design is difficult, and thus, the method and the device according to the present invention are more effective.

S*S mod N, S*M mod N 둘 다 존재하는 계산의 경우에는 몽고메리 계산방법이 공통 계산부분을 생략하고, 계산하는 경우 도 4와 같은 계산을 통해 3n*n+3n 번의 곱셈 계산을 하게 됨에 비해 당해 발명은 n(n+1)/2 + n*n 번의 곱셈과 그에 따른 덧셈 그리고 모듈라를 위한 덧셈으로 모든 계산이 완료된다. 이 계산에서 몽고메리 모듈라 방법으로 계산할 때 3n*n+3n번의 곱셈보다 곱셈수에서 이익이 있으나 덧셈이 많아져 계산 시간적인 이익이 줄어들게 된다. 그러나 암호화에 사용되는 모듈라 멱승 방법에서 S*S mod N, S*M mod N 둘다 존재하는 계산보다 S*S mod N계산만 있는 경우가 월등하게 많으므로 성능향상이 이뤄지게 되는 것이다.In the case of calculations with both S * S mod N and S * M mod N, the Montgomery calculation method omits the common calculation part, and in the case of calculation, 3n * n + 3n multiplication calculation is performed through the calculation as shown in FIG. In the present invention, all calculations are completed by multiplying n (n + 1) / 2 + n * n times, adding accordingly, and adding for modulus. In this calculation, the Montgomery Modular method yields more benefits than multiplying 3n * n + 3n times, but adds more and reduces computational time. However, in the modular powering method used for encryption, there are many cases where only S * S mod N calculation is more than the calculations that exist in both S * S mod N and S * M mod N, thereby improving performance.

이 계산방법을 활용한 모듈라 곱셈계산장치의 구조와 관련 된 (g)를 구체적으로 설명하면 (b)와 같은 곱셈계산을 이루는 1개 이상의 곱셈기와 덧셈기로 구성된 곱셈장치와 이 곱셈결과를 미리 계산하여 고속 메모리에 저장하여 둔 mod N 형태의 계산값의 덧셈을 통해 축소화하는 모듈라 축소기로 구성된 그림 1와 같은 구성의 모듈라 곱셈 계산장치이다. 이때 기존의 몽고메리 모듈라 곱셈계산장치의 경우 순차적인 곱셈과 덧셈으로 이뤄져 있어 병렬로 계산 할 수 없는 한계가 있다. 그러나 본 발명의 장치는 곱셈장치가 계산하는 동안 다른 계산블럭을 모듈라 축소기를 통해 계산하는 병렬 적인 계산을 할 수 있어 계산기를 효율적으로 설계하여 더욱 빠른 계산을 이루게 할 수 있다.(G) related to the structure of the modular multiplication calculator using this calculation method is explained in detail. The multiplication device composed of one or more multipliers and adders forming a multiplication calculation as shown in (b) and the result of multiplication are calculated in advance. Stored in fast memory It is a modular multiplication calculation device as shown in Figure 1, which consists of a modular reducer that adds and modifies a mod N type of calculation. In this case, the conventional Montgomery modular multiplication calculator is composed of sequential multiplication and addition, and thus cannot be calculated in parallel. However, the device of the present invention can perform parallel calculations that calculate other calculation blocks through a modular reducer while the multiplication device calculates, thereby enabling a faster calculation by efficiently designing a calculator.

지금 까지 설명한 계산방법을 응용한 좀더 병렬적인 계산을 통한 고속 대형의 모듈라 축소기를 만드는 방법인 (h) 는 위에서 상술한 방법이 큰 수에서 부터 덧셈을 통해 축소화 시키는 방법으로 구현되는데 비해 (h)의 방법은 아래의 식과같이(H), which is a method of making a high-speed large-scale modular reducer through more parallel calculations applying the above-described calculation method, is implemented as a method of reducing the size by adding from a large number. The method is as shown below.

T= + +......+ + + +.....+ T = + + ...... + + + + ..... +

T mod N= + +......+ mod N + mod NT mod N = + + ...... + mod N + mod N

+ mod N+.....+ mod N+ mod N + ..... + mod N

형태 즉 모든 기수 b에 대한 승수의 값을 표현한The type, that is, the value of the multiplier for all radix b

T mod N=( mod N) mod N= ( + mod N) mod NT mod N = ( mod N) mod N = ( + mod N) mod N

형태로 계산한다.Calculate in the form

이 때At this time

Q(,k)= mod NQ ( , k) = mod N

Q(,k+1)= mod NQ ( , k + 1) = mod N

Q(,k+2)= mod NQ ( , k + 2) = mod N

........................

Q(,2n-1)= mod NQ ( , 2n-1) = mod N

이런 식으로 각이상의 값을 b의 승수 구간별로 분리하여 모듈라 계산을 한 값을 고속 메모리에 저장하고, 이를 아래와 같이 더하는 형태로 구한다.In this way each The above value is separated for each multiplier of b, and the modulated calculation is stored in a high speed memory, which is obtained by adding the following values.

+ mod N + mod N

이 결과값은 최대 (N-1)*n 값이 된다. 이 또한 다시 그 결과값에서이상의 자리의 값을 Q(,k)= mod N 형태로 모듈라를 구하여 메모리에 저장하고,이하의 자리에 해당하는 모든 값을 이 값과 더해서 그 결과를 구한다. 이때 자리 올림이 생기는 경우 다시에 해당하는 비트를 지우고- N한 값을 더하면 한번의 모듈라 축소를 할 수 있는 축소기가 된다.This result is the maximum (N-1) * n value. Again, from that result Q () , k) = Get the modula in mod N form and store it in memory, All the values below are added to this value and the result is obtained. If there is a lift at this time, Clear the bit corresponding to -If N is added, it becomes a reducer that can make one modular reduction.

이 장치는 한 단계의 덧셈을 하는 동안 다른 단계에선 다른 블럭의 모듈라 계산을 하는 병렬구조의 모듈라 축소기를 n+1개의 덧셈기와 다량의 고속 메모리를 통해 설계한 그림 2와 같이 만들 수 있고, 이를 통해 기존의 모듈라 축소기보다 빠르며 덧셈기로 이뤄져 단순화된 병렬 모듈라 축소기를 구성할 수 있게 된다.The device can create a parallel modular reducer that performs modular calculations of different blocks during one stage of addition, as shown in Figure 2, designed with n + 1 adders and a large amount of high-speed memory. It is faster than existing modular reducers and consists of adders, which enables the construction of simplified parallel modular reducers.

본 발명의 장치 그림 1을 기준으로 실시 예를 들어 설명하면 1024비트의 RSA암호화 처리를 위한 계산에서 32비트 곱셈기와 덧셈기 그리고 비트 쉬프트기로 된 곱셈장치와 64비트 덧셈기로된 모듈라 축소기로 구성된 (g)의 장치의 경우 S*S의 계산은 32*33/2번의 곱셈과 그에 따른 덧셈,S*M의 계산의 경우 32*32번의 곱셈과 그에 따른 덧셈으로 곱셈 계산이 완료된다. 즉 S*S는 528번의 곱셈계산과 그에 따른 덧셈과 비트 계산이 필요하고, S*M의 계산은 1024번의 곱셈계산과 그에 따른 덧셈으로 구성된다. 모듈라 축소기에서 b즉 기수를 16비트로 한다고 하면*1024/8바이트의 메모리 즉 16 MB의 고속 메모리와 (1024/16)*(1024/64) + 1번의 덧셈과 그 케리 덧셈으로 모든 계산이 완료된다. 이는 1025번의 덧셈과 그케리 덧셈으로 구성됨을 의미한다.Referring to the embodiment of the present invention with reference to Fig. 1, (g) consisting of a 32-bit multiplier, an adder, a multiplier with a bit shifter, and a modular reducer with a 64-bit adder in the calculation for RSA encryption processing of 1024 bits. For the device of S * S, the calculation of S * S is 32 * 33/2 multiplication and subsequent addition, In the case of S * M calculation, the multiplication calculation is completed by 32 * 32 multiplications and the addition. In other words, S * S needs 528 multiplications and the addition and bit calculation. S * M calculation consists of 1024 multiplications and the addition. If you say that the base is 16 bits, All calculations are completed with 1024/8 bytes of memory, 16 MB of high speed memory, and (1024/16) * (1024/64) + 1 addition and its carry addition. This means that it consists of 1025 additions and calvary additions.

만일 메모리의 여유가 없다면 8비트의 b를 결정해서 계산할 수 있는데 이때 덧셈은 (1024/8)*(1024/64)+1번의 덧셈계산과 그 케리비트 덧셈 그리고,64KB의 메모리로 구성된다. 이는 2049번의 덧셈과 그 케리덧셈으로 구성됨을 의미한다. 이때곱셈기가 암호 블럭 1개를 곱셈하는 동안 모듈라 축소기는 다른 암호 블럭을 1개를 계산 할 수 있어 가용성이 크다 하겠다.If there is no memory available, 8-bit b can be determined and calculated, where the addition consists of (1024/8) * (1024/64) +1 addition calculations, its carrybit addition, and 64KB of memory. This means that it consists of 2049 additions and their kerry additions. In this case, while the multiplier multiplies one cipher block, the modular reducer is highly available because it can calculate another cipher block.

(h)와 같은 구조의 1024비트 RSA암호화 처리 장치에 대해 설명하면A description will be given of a 1024-bit RSA encryption processing unit having the same structure as (h).

16비트 단위로 b를 결정하여 덧셈기와 메모리를 배치하는 그림과 같은 회로를 구성한다고 하면 8MB * (1024/16)의 메모리 양과 (1024/16)+1개의 덧셈기로 모듈라 축소기를 구성할 수 있다.If you configure the circuit as shown in the figure that determines the b in 16-bit units and arranges the adder and memory, the modular reducer can be configured with 8MB * (1024/16) of memory and (1024/16) + 1 adder.

상술한 바와 같이, 본 발명은 암호화를 위한 계산에서 사용되는 모듈라 곱셈에서 곱셈부분과 모듈라 축소부분을 분리하여 모듈라 축소부분을 이미 계산된 모듈라 예상값을 이용하여 덧셈을 통해 모듈라 축소 계산을 하는 방법을 통해 기존의 기술보다 계산속도를 높이고, 이를 하드웨어화 하여 산업적으로 이용하는 효과가 있다. 따라서 본 발명은 RSA등 암호화 시스템에 효과적으로 사용 될 수 있다.As described above, the present invention provides a method of performing a modular reduction calculation by adding a modular reduction part by using a modular expected value by separating the multiplication part and the modular reduction part from the modular multiplication used in the calculation for encryption. Through this, the computational speed is higher than that of the existing technology, and the hardware is used to industrialize it. Therefore, the present invention can be effectively used in encryption systems such as RSA.

Claims (4)

사용자정보를 보호하고 안전하게 유지시키면서 비밀통신을 수행하기 위하여 암호,신분인증,디지털서명,전자상거래등에 이용되는 공개키암호시스템의 주전산기 또는 저 메모리 암호IC카드의 곱셈기회로에서 모듈라 멱승에 이용되는 S*S mod N, S*M mod N유형의 연산에서S * used for modular multiplication in the multiplier circuit of the low-key cryptographic IC card or the main computer of the public key cryptosystem used for cryptography, identity authentication, digital signature, electronic commerce, etc. to perform confidential communication while protecting user information and keeping it safe. In operations of type S mod N, S * M mod N (a) 모듈라 곱셈=S*S mod N ,=S*M mod N에서 S*S, S*M형의 계산과 mod N계산을 분리하는 단계(a) modular multiplication = S * S mod N, Separating the calculation of S * S, S * M type and mod N calculation from S * M mod N (b) S*S, S*M형의 계산을 아래와 같이 2의 승수인 기수 b(radix)에 대해 다음과 같이 변형하여 구하는 단계(b) calculating the calculations of S * S, S * M types as follows for radix b (radix), which is a multiplier of 2, as follows: S= S = M= M = S*S=( +)S * S = ( + ) S*M= S * M = (c) N보다 큰 가장 작은 b의 승수값가 존재할 때(c) multiplier of smallest b greater than N Is present Q()= mod N (단 0<=<2* b 인 모든 정수)Q ( ) = mod N (where 0 <= Any integer <2 * b) 인 모든에 대해 계산 전에 미리 계산하여 메모리에 입력하여 두는 단계Phosphorus all Precomputation and entering into memory before calculation for (d) (b)의 결과 값을 T라 할 때 (c)와 같이 미리 계산해 둔 값으로 모듈라 축소화하는 아래와 같은 정수 계산단계(d) When the result value of (b) is T, the following integer calculation step is used for modular reduction to pre-calculated value as in (c). for i=2n-1 to k step=-1for i = 2n-1 to k step = -1 {{ U=T/ U = T / T= T mod T = T mod T=T+Q(T)* T = T + Q (T) * }} (e) (d) 의 결과가보다 클 때 T에서비트를 지우고 T+(-N)계산을 통해 덧셈으로 결과를 얻는 단계(e) the result of (d) At greater than T Clear the bit and press T + ( -N) to get the result by addition through calculation 1항의 (b)를 구현하는 덧셈기와 곱셈기, 비트 쉬프트기로 구성된 곱셈기와 그 결과 값을 1항의 (c)의 결과를 저장하는 고속 메모리장치와 1항의 (d)의 기능을 하는 덧셈기를 통해 모듈라 축소기능을 하는 모듈라 축소기로 구성된 모듈라 곱셈장치Modular reduction using a multiplier consisting of an adder, a multiplier and a bit shifter, which implements paragraph (b), and a high-speed memory device that stores the result of paragraph (c), and an adder that functions as paragraph (d). Modular multiplier consisting of modular reducers S*S, S*M의 결과값을 T라 할 때 기수(radix) b에 대해 아래와 같은 방법으로 구하는 방법When the result of S * S, S * M is T, the following method is obtained for radix b. T=+......++.....++ T = + ...... + + ..... + + T mod N=(+......+mod N+.....+mod N+mod N)mod NT mod N = ( + ...... + mod N + ..... + mod N + mod N) mod N 3항의 각mod N에 대해 미리 구해진 값을 고속 메모리 장치에 입력하여 두었다가 그 결과값을 청구항 3과 같이 n+1개의 덧셈기를 통해 구현하는 장치Each of paragraph 3 A device that inputs a value obtained for mod N into a high speed memory device and implements the result through n + 1 adders as in claim 3
KR1020000078871A 2000-12-20 2000-12-20 add modular multiplication KR20020049659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000078871A KR20020049659A (en) 2000-12-20 2000-12-20 add modular multiplication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000078871A KR20020049659A (en) 2000-12-20 2000-12-20 add modular multiplication

Publications (1)

Publication Number Publication Date
KR20020049659A true KR20020049659A (en) 2002-06-26

Family

ID=27683619

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000078871A KR20020049659A (en) 2000-12-20 2000-12-20 add modular multiplication

Country Status (1)

Country Link
KR (1) KR20020049659A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9811318B2 (en) 2014-03-31 2017-11-07 Samsung Electronics Co., Ltd. Montgomery multiplication method for performing final modular reduction without comparison operation and montgomery multiplier
CN113190211A (en) * 2021-05-19 2021-07-30 哈尔滨理工大学 Four-input FIOS modular multiplication algorithm and architecture design for bilinear pairings

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9811318B2 (en) 2014-03-31 2017-11-07 Samsung Electronics Co., Ltd. Montgomery multiplication method for performing final modular reduction without comparison operation and montgomery multiplier
CN113190211A (en) * 2021-05-19 2021-07-30 哈尔滨理工大学 Four-input FIOS modular multiplication algorithm and architecture design for bilinear pairings

Similar Documents

Publication Publication Date Title
US5742530A (en) Compact microelectronic device for performing modular multiplication and exponentiation over large numbers
JP3784156B2 (en) Modular multiplication method
EP1708081B1 (en) Method and device for calculating a Montgomery conversion parameter
KR101269737B1 (en) Encryption processing apparatus, encryption processing method, and computer program medium
CN101216754B (en) Modular multiplication based data encryption and decryption processing method and device
WO2007080652A1 (en) Montgomery’s algorithm multiplication remainder calculator
Aoki et al. Elliptic curve arithmetic using SIMD
US7050579B1 (en) Cryptographic methods and apparatus using word-wise montgomery multiplication
KR100457177B1 (en) Serial-Parallel Multiplier to Multiply Two Elements in the Finite Field
CN101809638A (en) Arithmetic operation method and arithmetic operation device
JP4423900B2 (en) Scalar multiplication calculation method, apparatus and program for elliptic curve cryptography
US7113593B2 (en) Recursive cryptoaccelerator and recursive VHDL design of logic circuits
KR20020049659A (en) add modular multiplication
Arazi et al. On calculating multiplicative inverses modulo $2^{m} $
Bansal et al. Implementation of modular exponentiation using montgomery algorithms
US20020114449A1 (en) Modular multiplier and an encryption/decryption processor using the modular multiplier
US7403965B2 (en) Encryption/decryption system for calculating effective lower bits of a parameter for Montgomery modular multiplication
JP3626315B2 (en) Remainder calculation apparatus, information processing apparatus, and remainder calculation method
Anoop et al. Performance analysis of montgomery multiplier
KR20020086005A (en) Inverse operator for elliptic curve cryptosystems
CN104731552B (en) The hardware structure and method that ECC point adds are carried out using affine Jacobi Coordinate is mixed
Nedjah et al. Simulation model for hardware implementation of modular multiplication
KR20000008153A (en) Modular processing device and method
KR100451570B1 (en) Method and apparatus for implementing elliptic curve cryptosystem resisting against simple power attacks
JP3999554B2 (en) Multiplication residue calculation method and calculation device

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination