KR100858559B1 - Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary - Google Patents

Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary Download PDF

Info

Publication number
KR100858559B1
KR100858559B1 KR1020060119654A KR20060119654A KR100858559B1 KR 100858559 B1 KR100858559 B1 KR 100858559B1 KR 1020060119654 A KR1020060119654 A KR 1020060119654A KR 20060119654 A KR20060119654 A KR 20060119654A KR 100858559 B1 KR100858559 B1 KR 100858559B1
Authority
KR
South Korea
Prior art keywords
addition
binary
carry
value
island
Prior art date
Application number
KR1020060119654A
Other languages
Korean (ko)
Other versions
KR20080049266A (en
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 KR1020060119654A priority Critical patent/KR100858559B1/en
Publication of KR20080049266A publication Critical patent/KR20080049266A/en
Application granted granted Critical
Publication of KR100858559B1 publication Critical patent/KR100858559B1/en

Links

Images

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/729Methods 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 representation by a residue number system
    • 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/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods 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/50Adding; Subtracting
    • G06F7/501Half or full adders, i.e. basic adder cells for one denomination
    • G06F7/503Half or full adders, i.e. basic adder cells for one denomination using carry switching, i.e. the incoming carry being connected directly, or only via an inverter, to the carry output under control of a carry propagate signal
    • 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/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods 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/52Multiplying; Dividing
    • 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/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods 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/57Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations
    • G06F7/575Basic arithmetic logic units, i.e. devices selectable to perform either addition, subtraction or one of several logical operations, using, at least partially, the same circuitry

Landscapes

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

Abstract

잉여 이진수의 덧셈 방법, 잉여 이진수의 곱셈 방법, 잉여 이진수 덧셈기 및 잉여 이진수 곱셈기가 개시된다.A method of adding a redundant binary number, a method of multiplying a redundant binary number, a redundant binary adder, and a redundant binary multiplier is disclosed.

본 발명은 승수를 Y, 피승수를 X, 모듈러 값을 M이라고 할때, 임의의 잉여 이진수 X, Y의 곱셈을 수행하는 암호화 시스템의 곱셈기에 있어서, 상기 X의 최하위 비트부터 순서대로 바이너리 값으로 변환하는 배럴 레지스터 전가산기, 상기 변환된 X의 비트 값에 따라 상기 Y, 상기 M, 상기 Y와 M을 더한 값 또는 0 중 어느 하나를 선택하는 멀티플렉서, 상기 선택된 값과 상기 X에 대한 바이너리 값을 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하고, 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 X에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하며, 상기 배럴 레지스터 전가산기가 상기 X의 최상위 비트를 바이너리 값으로 변환할 때까지 상기 잉여 이진수 덧셈기가 상기 제1덧셈 및 상기 제2덧셈을 반복 수행하는 잉여 이진수 덧셈기 및 상기 제1덧셈 및 상기 제2덧셈의 반복 수행 중에 상기 제2덧셈의 결과를 상기 X에 대한 바이너리 값 및 상기 X에 대한 음의 수에 적용하는 어큐뮬레이터를 포함한다.The present invention is a multiplier of an encryption system that performs a multiplication of arbitrary redundant binary numbers X and Y when a multiplier is Y, a multiplier is X, and a modular value is M, and converts the binary values in order from the least significant bit of X. A barrel register full adder, a multiplexer for selecting any one of the Y, the M, the Y plus M, or 0 according to the bit value of the converted X, the binary value for the selected value and X Performing a first addition to generate a result of the first addition consisting of a carry value that is a binary value and an island that is a negative number, and carry a carry of the previous digit among the carry of the first addition, the island of the first addition, and the negative for X Performing a second addition that adds the number of to generate a result of the second addition consisting of a carry, which is a negative number, and an island, which is a binary value, wherein the full barrel register adds the most significant bit of X. The surplus binary adder repeats the first and second additions and converts the result of the second addition during the repetition of the first and second additions until the binary binary adder converts the binary value. And an accumulator that applies to binary values for X and negative numbers for X.

본 발명에 의하면, 캐리 전파 없이 결합기의 기능을 하는 덧셈기를 제공할 수 있고, 몽고메리 곱셈의 대부분의 임계 경로 지연 시간을 차지하는 세 피연산자 의 덧셈을 수행하는 부분에 잉여 이진수 개념을 도입하고 새롭게 제안된 잉여 이진수 덧셈기를 사용하여 공간 복잡도 및 시간 복잡도를 줄일 수 있으며, 반복하는 모듈러 곱셈으로 이루어진 RSA 암호 시스템과 곱셈기에서 중요 구성 기능 블록인 여러 시스템들이 간단하게 구현될 수 있게 한다.According to the present invention, it is possible to provide an adder that functions as a combiner without carry propagation, and introduces a surplus binary concept to the part performing addition of three operands that occupy most of the critical path delay time of Montgomery multiplication and newly proposed surplus. Binary adders can be used to reduce space and time complexity, simplifying the implementation of RSA cryptosystems with repeating modular multiplications and several critical building blocks of functionality in multipliers.

Description

잉여 이진수의 덧셈 방법, 잉여 이진수의 곱셈 방법, 잉여 이진수 덧셈기 및 잉여 이진수 곱셈기 {Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary}Addition method of redundant binary, multiplication method of redundant binary, redundant binary adder and redundant binary multiplier {Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary}

도 1a는 본 발명에 적용되는 잉여 이진수 덧셈기의 개략적인 블럭도이다.1A is a schematic block diagram of a redundant binary adder applied to the present invention.

도 1b는 본 발명에 따른 잉여 이진수의 곱셈기의 블럭도이다.1B is a block diagram of a multiplier of redundant binary numbers in accordance with the present invention.

도 2a는 도 1a의 잉여 이진수 덧셈기의 상세 블럭도이다.FIG. 2A is a detailed block diagram of the redundant binary adder of FIG. 1A. FIG.

도 2b는 도 1a의 잉여 이진수 덧셈기의 동작 흐름도이다.2B is a flowchart of operation of the redundant binary adder of FIG. 1A.

도 3은 도 1a의 배럴 레지스터 전가산기의 블럭도이다.3 is a block diagram of the barrel register full adder of FIG. 1A.

도 4는 도 3에 적용되는 MFA의 상세 블럭도이다.4 is a detailed block diagram of an MFA applied to FIG. 3.

도 5는 본 발명에 따른 잉여 이진수의 덧셈 방법의 흐름도이다.5 is a flowchart of a method for adding a redundant binary number according to the present invention.

도 6은 본 발명에 따른 잉여 이진수의 곱셈 방법의 흐름도이다.6 is a flowchart of a multiplication method of a redundant binary number according to the present invention.

본 발명은 이진수 덧셈기 및 곱셈기에 관한 것으로서, 특히, 데이터 보안을 위한 암호화 시스템에서, 잉여 이진수의 덧셈 방법, 잉여 이진수의 곱셈 방법, 잉여 이진수 덧셈기 및 잉여 이진수 곱셈기에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to binary adders and multipliers, and more particularly, to a method of adding redundant binary numbers, a method of multiplying redundant binary numbers, a redundant binary adder, and a redundant binary multiplier in an encryption system for data security.

RSA 암호 시스템은 Diffie, Hellman이 제안한 공개키 암호 시스템에 대한 개념을 가장 충실히 반영한 것으로 알려져 있다. RSA 암호 시스템은 매우 큰 정수에 대한 소인수분해가 어렵고 해를 찾아내는데 많은 시간을 요구한다는 점을 이용한 암호 시스템이다. 일반전으로 RSA 암호 시스템은 시스템의 안전성을 높이기 위해 1,024비트 이상의 큰 수를 기반으로 한 모듈러 지수승 연산을 수행한다. 모듈러 지수승 연산은 반복된 모듈러 곱셈으로 구성되어 있으므로 효율적인 모듈러 곱셈 알고리즘의 하드웨어 구현은 암호 시스템의 효율성을 향상시킨다.The RSA cryptosystem is known to most closely reflect the concept of a public key cryptosystem proposed by Diffie and Hellman. RSA cryptosystems are cryptosystems that take advantage of the difficulty of factoring very large integers and requiring a lot of time to find solutions. As a general war, the RSA cryptosystem performs modular exponential operations based on large numbers of more than 1,024 bits in order to increase the safety of the system. Since modular exponentiation consists of repeated modular multiplications, the hardware implementation of efficient modular multiplication algorithms improves the efficiency of cryptographic systems.

모듈러 곱셈 알고리즘 중 몽고메리 곱셈 알고리즘은 모듈러 연산을 반복적으로 수행하는 RSA 암호 시스템 구현에 널리 사용되고 있다. 몽고메리 곱셈 알고리즘에서 연산 속도를 결정짓는 클럭 주기에 가장 큰 영향을 미치는 세 피연산자의 덧셈을 효율적으로 수행하기 위해 캐리 저장 덧셈기(Carry Save Adder, CSA)와 잉여 이진수 덧셈기(Redundant Binary Adder, RBA)가 제시되었다. CSA를 이용한 방법은 다음 곱셈의 입력 값으로 사용하기 위해 출력 결과 캐리 C와 합 S를 (C,S)형태로 보존한다. 이 경우 캐리를 저장할 레지스터가 추가로 필요하지만 덧셈을 수행하지 않으므로 고속 연산에 적합하다. Among the modular multiplication algorithms, Montgomery multiplication algorithms are widely used to implement RSA cryptosystems that perform modular operations repeatedly. The Carry Save Adder (CSA) and the Redundant Binary Adder (RBA) are presented to efficiently perform the addition of the three operands that have the greatest influence on the clock cycles that determine the operation speed in the Montgomery multiplication algorithm. It became. The CSA method preserves the output carry C and the sum S in the form (C, S) for use as the input value of the next multiplication. In this case, an additional register is needed to store the carry, but it is not suitable for high speed operation because no addition is performed.

대표적인 공개키 암호 시스템인 RSA 암호 시스템은 키의 길이에 비례하여 안정성이 높아지나 상대적으로 연산 속도는 늦어진다. 주 연산인 모듈러 지수승 연산은 반복된 모듈러 곱셈으로 이루어져 있으므로 고속 모듈러 곱셈 알고리즘의 설계는 이 분야의 연구 초점이다.The RSA cryptosystem, a representative public key cryptosystem, is more stable in proportion to the length of the key, but the computation speed is relatively slow. Modular exponential operation, which is the main operation, consists of repeated modular multiplication, so the design of a fast modular multiplication algorithm is the focus of research in this field.

그러나, 종래의 곱셈기는 곱셈의 결과를 다음 곱셈의 입력 값으로 사용하기 위해 결합기를 사용해야 하므로 하드웨어 구조 설계시의 공간 복잡도가 커질 수밖에 없고, 시간 복잡도가 증가하는 문제점이 있다.However, since a conventional multiplier needs to use a combiner to use the result of multiplication as an input value of the next multiplication, the space complexity in hardware design is inevitably increased, and the time complexity increases.

본 발명이 이루고자 하는 첫번째 기술적 과제는 암호화 시스템에서 캐리 전파 없이 결합기의 기능을 하는 덧셈기를 제공할 수 있고, 공간 복잡도 및 시간 복잡도를 줄일 수 있는 잉여 이진수의 덧셈 방법을 제공하는데 있다.The first technical problem to be achieved by the present invention is to provide an adder functioning as a combiner without carry propagation in the encryption system, and to provide a method for adding redundant binary numbers that can reduce space complexity and time complexity.

본 발명이 이루고자 하는 두번째 기술적 과제는 몽고메리 곱셈의 대부분의 임계 경로 지연 시간을 차지하는 세 피연산자의 덧셈을 수행하는 부분에 잉여 이진수 개념을 도입하고 새롭게 제안된 잉여 이진수 덧셈기를 사용하여 공간 복잡도 및 시간 복잡도를 줄일 수 있으며, 반복하는 모듈러 곱셈으로 이루어진 RSA 암호 시스템과 곱셈기에서 중요 구성 기능 블록인 여러 시스템들이 간단하게 구현될 수 있도록 하는 잉여 이진수의 곱셈 방법을 제공하는데 있다.The second technical task of the present invention is to introduce a redundant binary concept to the part of the addition of three operands that occupy most of the critical path delay time of Montgomery multiplication, and to use the newly proposed redundant binary adder to solve the spatial and temporal complexity. The present invention provides an RSA cryptosystem with repeatable modular multiplication and a redundant binary multiplication method that allows simple implementation of multiple systems, which are important building blocks of functionality in multipliers.

본 발명이 이루고자 하는 세번째 기술적 과제는 상기의 잉여 이진수의 덧셈 방법을 적용한 잉여 이진수 덧셈기를 제공하는데 있다.The third technical problem to be achieved by the present invention is to provide a redundant binary adder to which the method of adding a redundant binary number is applied.

본 발명이 이루고자 하는 네번째 기술적 과제는 상기의 잉여 이진수의 곱셈 방법을 적용한 잉여 이진수 곱셈기를 제공하는데 있다. The fourth technical problem to be achieved by the present invention is to provide a redundant binary multiplier to which the multiplication method of the redundant binary numbers is applied.

상기의 첫번째 기술적 과제를 이루기 위하여, 본 발명은 임의의 잉여 이진수 X, Y, Z의 논리 게이트를 이용한 암호화 시스템의 덧셈 방법에 있어서, 상기 X에 대한 잉여 이진수와 상기 Y에 대한 바이너리 값을 더하는 제1덧셈을 수행하여 바이 너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하는 단계 및 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 Z에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하는 단계를 포함하는 잉여 이진수의 덧셈 방법을 제공한다.In order to achieve the first technical problem, the present invention provides a method for adding an encryption system using a logical gate of any redundant binary numbers X, Y, and Z, and adding a redundant binary number for X and a binary value for Y. Performing a first addition to generate a result of the first addition comprising a carry value of a binary value and an island of a negative number; and a carry of a previous position among the carry of the first addition, the island of the first addition, and the Z. And performing a second addition by adding a negative number to generate a result of the second addition comprising a carry as a negative number and an island as a binary value.

상기의 두번째 기술적 과제를 이루기 위하여, 본 발명은 승수를 Y, 피승수를 X, 모듈러 값을 M이라고 할때, 임의의 잉여 이진수 X, Y의 논리 게이트를 이용한 암호화 시스템의 곱셈 방법에 있어서, 상기 X의 최하위 비트부터 순서대로 바이너리 값으로 변환하는 단계, 상기 변환된 X의 비트 값에 따라 상기 Y, 상기 M, 상기 Y와 M을 더한 값 또는 0 중 어느 하나를 선택하는 단계, 상기 선택된 값과 상기 X에 대한 바이너리 값을 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하는 단계 및 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 X에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하는 단계를 포함하고, 상기 제2덧셈의 결과를 상기 X에 대한 바이너리 값 및 상기 X에 대한 음의 수에 적용하여 상기 과정을 반복 수행하는 것을 특징으로 하는 잉여 이진수의 곱셈 방법을 제공한다.In order to achieve the second technical problem, the present invention, in the multiplication method of the encryption system using a logic gate of any redundant binary X, Y when the multiplier is Y, the multiplier is X, the modular value M, the X Converting to a binary value in order from the least significant bit of, selecting one of the Y, the M, the Y plus M, or 0 according to the converted bit value of X, the selected value and the Performing a first addition on the binary value for X to generate a result of the first addition consisting of a carry value, which is a binary value, and an island with a negative number, and a carry of a previous position among the carry of the first addition, and the first addition. Performing a second addition that adds an island of and a negative number for X to generate a result of the second addition consisting of a carry, which is a negative number, and an island, which is a binary value; Applying the result of the second addition the number of notes on the binary value and the X relative to the X, and provides the multiplication method of the surplus, it characterized in that the binary number to repeat performing the above process.

상기의 세번째 기술적 과제를 이루기 위하여, 본 발명은 임의의 잉여 이진수 X, Y, Z의 덧셈을 수행하는 암호화 시스템의 덧셈기에 있어서, 상기 X에 대한 잉여 이진수와 상기 Y에 대한 바이너리 값을 더하는 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하는 제1덧셈 블럭 및 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 Z에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하는 제2덧셈 블럭을 포함하는 잉여 이진수 덧셈기를 제공한다.In order to achieve the third technical problem, the present invention provides an adder of an encryption system that performs addition of arbitrary redundant binary numbers X, Y, and Z, and includes: a first value of adding a redundant binary number for X and a binary value for Y; A first addition block for generating a result of the first addition consisting of a carry as a binary value and an island with a negative number, and a carry of a previous position among the carry of the first add, the island of the first add and the Z A second binary adder including a second addition block that generates a result of the second addition consisting of a carry of a negative number and an island of a binary value is performed by performing a second addition that adds a negative number to.

상기의 네번째 기술적 과제를 이루기 위하여, 본 발명은 승수를 Y, 피승수를 X, 모듈러 값을 M이라고 할때, 임의의 잉여 이진수 X, Y의 곱셈을 수행하는 암호화 시스템의 곱셈기에 있어서, 상기 X의 최하위 비트부터 순서대로 바이너리 값으로 변환하는 배럴 레지스터 전가산기, 상기 변환된 X의 비트 값에 따라 상기 Y, 상기 M, 상기 Y와 M을 더한 값 또는 0 중 어느 하나를 선택하는 멀티플렉서, 상기 선택된 값과 상기 X에 대한 바이너리 값을 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하고, 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 X에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하며, 상기 배럴 레지스터 전가산기가 상기 X의 최상위 비트를 바이너리 값으로 변환할 때까지 상기 잉여 이진수 덧셈기가 상기 제1덧셈 및 상기 제2덧셈을 반복 수행하는 잉여 이진수 덧셈기 및 상기 제1덧셈 및 상기 제2덧셈의 반복 수행 중에 상기 제2덧셈의 결과를 상기 X에 대한 바이너리 값 및 상기 X에 대한 음의 수에 적용하는 어큐뮬레이터를 포함하는 잉여 이진수 곱셈기를 제공한다.In order to achieve the fourth technical problem, the present invention provides a multiplier of an encryption system that performs a multiplication of an arbitrary redundant binary number X and Y when a multiplier is Y, a multiplier is X, and a modular value is M. A barrel register full adder for converting from the least significant bit to a binary value sequentially, a multiplexer for selecting any one of the Y, the M, the sum of Y and M, or 0 according to the bit value of the converted X, the selected value And performing a first addition on the binary value for X to generate a result of the first addition comprising a carry value, which is a binary value, and an island having a negative number, and carry the first position of the carry of the first addition, the first carry. Performing a second addition that adds an island of addition and a negative number for the X to produce a result of the second addition consisting of a carry of negative number and an island of binary value, the barrel The redundant binary adder and the first and second additions repeating the redundant binary adder repeatedly performing the first and second additions until a register full adder converts the most significant bit of the X into a binary value. A redundant binary multiplier comprising an accumulator that applies the result of the second addition to the binary value for X and the negative number for X during execution.

본 발명에서는 새로운 덧셈 규칙을 적용하여 잉여 이진수 덧셈기(RBA) 로직 구조를 재구성하여 효율성을 향상시킨다. 또한, 본 발명에 따른 잉여 이진수 덧셈기(NRBA)는 주연산인 덧셈뿐만 아니라 결합기의 역할을 수행할 수 있도록 설계한다. 따라서 공간 복잡도가 늘어나는 문제를 해결할 수 있다.In the present invention, a new addition rule is applied to reconstruct a redundant binary adder (RBA) logic structure to improve efficiency. In addition, the redundant binary adder (NRBA) according to the present invention is designed to perform the role of the combiner as well as the addition of the main operation. Therefore, the problem of increasing space complexity can be solved.

본 발명은 몽고메리 곱셈 알고리즘에서 클럭의 주기에 가장 큰 영향을 미치는 세 피연산자의 덧셈을 효율적으로 수행하기 위해 캐리 저장 덧셈기(Carry Save Adder, 이하 CSA)와 잉여 이진수 덧셈기(Redundant Binary Adder, 이하 RBA)를 제공한다. The present invention uses a Carry Save Adder (CSA) and a Redundant Binary Adder (RBA) to efficiently add the three operands that have the greatest influence on the clock cycle in the Montgomery multiplication algorithm. to provide.

본 발명에서는 새로운 잉여 이진수 덧셈기(NRBA)를 설계하고 몽고메리 곱셈 알고리즘에 적용한다. 또한, 본 발명은 이렇게 설계된 몽고메리 곱셈 알고리즘을 사용하여 고속화된 RSA 암호 시스템을 제공할 수 있다.In the present invention, we design a new redundant binary adder (NRBA) and apply it to the Montgomery multiplication algorithm. In addition, the present invention can provide a faster RSA cryptosystem using the Montgomery multiplication algorithm designed as such.

본 발명은 종래의 4-2 CSA 몽고메리 곱셈 구조를 기반으로 한다. 이때, 4-2 CSA는 새로운 덧셈 규칙을 접목한 잉여 이진수 덧셈기(NRBA)로 대체된다. 그로 인해 입력 값은 잉여 이진수 X,Y와 이진수 M으로 구성되고 출력 값은 잉여 이진수 A가 된다. 또한 Y의 덧셈 여부를 결정하는 Xi 값을 정확히 연산하기 위해 사용되는 배럴 레지스터 전가산기는 본 발명에 따른 배럴 레지스터 전가산기(MBRFA)로 대체한다.The present invention is based on the conventional 4-2 CSA Montgomery multiplication structure. At this time, the 4-2 CSA is replaced by a redundant binary adder (NRBA) incorporating a new addition rule. As a result, the input value consists of the redundant binary numbers X, Y and binary M, and the output value becomes the redundant binary A. In addition, the barrel register full adder used to accurately calculate the Xi value for determining whether to add Y is replaced by the barrel register full adder (MBRFA) according to the present invention.

4-2 CSA 몽고메리 곱셈 구조는 입력 값 Y, M의 덧셈을 반복 구문이 시작하기 전에 연산되고 저장된다. 배럴 레지스터 전가산기는 캐리와 섬으로 표현된 X의 최하위 비트부터 FA를 사용하여 정확한 Xi값을 생성한다. Xi값과 ui=(ac0+as0)+Xi*y0 mod2 값에 따라 Y+M, Y, M, 0에서 선택하여 부분 결과 값과 덧셈을 수행한다. 최종 결과는 캐리 Ac와 섬 As으로 출력한다. 4-2 The CSA Montgomery multiply structure computes and stores the addition of the input values Y and M before the recursive syntax begins. The barrel register full adder uses the FA from the least significant bit of X, represented by the carry and island, to produce the correct Xi value. Partial result and addition are performed by selecting from Y + M, Y, M, and 0 according to Xi value and ui = (ac0 + as0) + Xi * y0 mod2 value. The final result is output in Cary Ac and Island As.

몽고메리 곱셈기의 구조는 다음과 같다. 이하에서는 M을 n-비트 모듈러스라고 가정한다. 주어진 M보다 작은 정수 U,V에 대하여 몽고메리 곱셈을 수행하기 위해서

Figure 112006088918970-pat00001
을 이용하여 수학식 1을 통해 몽고메리 도메인의 원소인 X,Y로 변환시킨다.The structure of the Montgomery multiplier is In the following, it is assumed that M is n-bit modulus. To perform Montgomery multiplication on integers U and V less than a given M
Figure 112006088918970-pat00001
Using Equation
1 is converted into X, Y elements of the Montgomery domain.

X=U×R(mod M), Y=V×R(mod M),X = U × R (mod M), Y = V × R (mod M),

Figure 112006088918970-pat00002
을 모듈러 M에 대하여 R의 역원이라 할 때, X,Y의 몽고메리 곱셈은 수학식 2와 같이 정의한다.
Figure 112006088918970-pat00002
When is the inverse of R with respect to the modular M, Montgomery multiplication of X, Y is defined as in Equation 2.

Figure 112006088918970-pat00003
Mont(X,Y)=X×Y× = U×V×R(mod M)
Figure 112006088918970-pat00003
Mont (X, Y) = X × Y × = U × V × R (mod M)

곱셈을 단지 한 번 수행한다고 할 때, 이 과정에서 소요되는 복잡도는 일반전인 곱셈에 비해 크다. 그러나 몽고메리 곱셈은 RSA 암호 시스템에서의 지수승 연산과 같이 반복적인 모듈러 곱셈을 요구되는 환경에서 효율적이다. 지수승 연산에 적합하도록 몽고메리 곱셈 알고리즘을 보다 효율적으로 구성할 수 있다. 몽고메리 곱셈 알고리즘에서 수행되는 비교 연산과 뺄셈은 큰 연산량을 차지하게 되므로 X와 Y의 범위를 종래의 0≤X,Y<M에서 0≤X,Y<2M으로 대체함으로써 제거될 수 있다. 이는 입력 값과 출력 값의 크기를 동일하게 하므로 출력 값을 다음 단계의 입력 값하여 반복적인 곱셈 연산을 수행할 수 있도록 한다. Given that the multiplication is performed only once, the complexity of this process is higher than that of the general multiplication. However, Montgomery multiplication is efficient in environments that require iterative modular multiplication, such as exponential multiplication in RSA cryptosystems. Montgomery multiplication algorithms can be configured more efficiently for exponential power operations. Since the comparison operation and the subtraction performed by the Montgomery multiplication algorithm occupy a large amount of calculation, it can be removed by replacing the range of X and Y with the conventional 0≤X, Y <M from 0≤X, Y <2M. This makes the input and output values the same size, so that the output value can be repeated by the input value of the next step.

변형된 몽고메리 곱셈의 알고리즘(이하 "알고리즘 1"이라 한다)은 다음과 같다.The modified Montgomery multiplication algorithm (hereinafter referred to as "Algorithm 1") is as follows.

Figure 112006088918970-pat00004
Figure 112006088918970-pat00004

Figure 112006088918970-pat00005
Figure 112006088918970-pat00005

Figure 112006088918970-pat00006
Figure 112006088918970-pat00006

따라서 X와 Y는 한 비트 늘어난 n+1비트가 되고, 반복 연산이 증가한다. 중간 결과 A의 크기를 0≤A<2M로 만들기 위해 X의 최상위 비트

Figure 112006088918970-pat00007
을 0이라 하고 반복 연산을 한 번 더 수행한다. 반복 연산이 두 번 더 수행되지만 곱셈기의 구성상 종래 방법보다 효율적이다. 또한 Y를 한 비트 늘려 최하위 비트를 0으로 만들어 반복 연산을 한 번 더 수행함으로써 몽고메리 곱셈 알고리즘의
Figure 112006088918970-pat00008
의 연산을 보다 간단히 수행할 수 있다.Therefore, X and Y become n + 1 bits increased by one bit, and repeat operation increases. Most significant bit of X to make the intermediate result A size 0≤A <2M
Figure 112006088918970-pat00007
Is 0 and repeat operation is performed once more. The iterative operation is performed twice but is more efficient than the conventional method due to the construction of the multiplier. In addition, by increasing Y by one bit to make the least significant bit zero, iterates one more iteration of the Montgomery multiplication algorithm.
Figure 112006088918970-pat00008
The operation of can be done more simply.

변형된 몽고메리 곱셈 알고리즘의 임계 경로 지연 시간은 세 피연산자의 연 산에서 발생하는

Figure 112006088918970-pat00009
에서 세 연산자의 덧셈과정에서 발생하는 캐리 전파를 처리하는 과정이 알고리즘 지연 시간의 대부분을 차지한다.The critical path delay time of the modified Montgomery multiplication algorithm results from the operation of the three operands.
Figure 112006088918970-pat00009
In Carrier propagation, which takes place during the addition of the three operators, takes most of the algorithm delay time.

Figure 112006088918970-pat00010
Figure 112006088918970-pat00010

수학식 3과 같이 알고리즘 1에서 단계 2.2의 세 입력 값에 대한 덧셈을 수행하는 과정이 알고리즘 1의 시간 복잡도에서 가장 큰 부분을 차지한다. 그러나 이 문제는 CSA 또는 잉여 이진수 덧셈기(RBA)를 사용하여 효율적인 연산을 수행할 수 있다.As shown in Equation 3, the addition of the three input values of Step 2.2 in Algorithm 1 occupies the largest part of Algorithm 1's time complexity. However, this problem can be efficiently performed using CSA or redundant binary adder (RBA).

첫 번째 해결 방법은 세 개의 입력 값에 대하여 덧셈을 수행하고 두 개의 값(캐리:

Figure 112006088918970-pat00011
, 합:
Figure 112006088918970-pat00012
)을 출력하는 덧셈기인 CSA를 이용한 방법이다.
Figure 112006088918970-pat00013
의 연산 결과는 CSA를 이용하여 캐리
Figure 112006088918970-pat00014
와 합
Figure 112006088918970-pat00015
으로 나타낼 수 있고,
Figure 112006088918970-pat00016
는 다음 곱셈의 입력으로 사용되므로 Y 또한
Figure 112006088918970-pat00017
으로 표현 한다. 따라서
Figure 112006088918970-pat00018
의 연산은
Figure 112006088918970-pat00019
를 X의 i번째 비트라 할 때
Figure 112006088918970-pat00020
으로 나타낼 수 있으므로 다섯 개의 입력 값과 두 개의 출력 값을 갖는 McIvor의 1 방법이 된다. The first solution is to add over three input values and carry two values (Carry:
Figure 112006088918970-pat00011
, Sum:
Figure 112006088918970-pat00012
It is a method using CSA, which is an adder that outputs.
Figure 112006088918970-pat00013
The result of the operation is carried using CSA
Figure 112006088918970-pat00014
Sum with
Figure 112006088918970-pat00015
Can be represented as
Figure 112006088918970-pat00016
Is used as the input for the next multiplication, so Y is
Figure 112006088918970-pat00017
Express as therefore
Figure 112006088918970-pat00018
The operation of
Figure 112006088918970-pat00019
Is the i th bit of X
Figure 112006088918970-pat00020
This is McIvor's 1 method with five input values and two output values.

Figure 112006088918970-pat00021
Figure 112006088918970-pat00022
의 연산에서
Figure 112006088918970-pat00023
Figure 112006088918970-pat00024
의 값에 따라 덧셈에 필요한 피 연산자의 조합은 달라진다.
Figure 112006088918970-pat00025
인 경우 단지
Figure 112006088918970-pat00026
의 연산이 되고
Figure 112006088918970-pat00027
인 경우
Figure 112006088918970-pat00028
의 연산이 되며
Figure 112006088918970-pat00029
의 경우
Figure 112006088918970-pat00030
의 연산이 된다. 하지만
Figure 112006088918970-pat00031
의 경우 다섯 개의 피 연산자로 구성된
Figure 112006088918970-pat00032
의 연산을 수행하게 된다. 피 연산자의 항의 개수가 증가하는 문제점을 해결하기 위하여 사전 연산을 통해 그림 1과 같이 항의 개수를 줄인 McIvor의 2 방법이 제안되었다. 곱셈이 시작하기 전 사전 연산을 통하여
Figure 112006088918970-pat00033
Figure 112006088918970-pat00034
의 연산을 수행하고 그 결과 캐리
Figure 112006088918970-pat00035
와 합
Figure 112006088918970-pat00036
를 저장한 후
Figure 112006088918970-pat00037
를 이용하여
Figure 112006088918970-pat00038
Figure 112006088918970-pat00039
의 경우에 선택적으로 사용하는 방법이다.
Figure 112006088918970-pat00021
Figure 112006088918970-pat00022
In the operation of
Figure 112006088918970-pat00023
Wow
Figure 112006088918970-pat00024
The combination of operands for addition depends on the value of.
Figure 112006088918970-pat00025
If just
Figure 112006088918970-pat00026
Is the operation of
Figure 112006088918970-pat00027
If
Figure 112006088918970-pat00028
Is the operation of
Figure 112006088918970-pat00029
In the case of
Figure 112006088918970-pat00030
Is the operation of. However
Figure 112006088918970-pat00031
Consists of five operands
Figure 112006088918970-pat00032
Will perform the operation of. In order to solve the problem of increasing the number of terms of the operands, McIvor's 2 method is proposed, which reduces the number of terms through the dictionary operation as shown in Figure 1. Before the multiplication begins,
Figure 112006088918970-pat00033
Figure 112006088918970-pat00034
Perform the operation of and carry the result
Figure 112006088918970-pat00035
Sum with
Figure 112006088918970-pat00036
After saving
Figure 112006088918970-pat00037
Using
Figure 112006088918970-pat00038
Wow
Figure 112006088918970-pat00039
In this case, it is used selectively.

암호 시스템 구성에 적합한 4-2 CSA 몽고메리 곱셈은 CSA가 주된 연산을 이룬다. 4-2 CSA의 입력 값은 (A1,A2)와 (D1,D2)이다. A=(A1+A2)이고 D=(D1+D2)이므로 캐리 전파 없이 덧셈 행이 가능하다면 입력 값은 두 개가 될 것이다. 4-2 CSA Montgomery Multiplication Suitable for Cryptographic Systems The CSA is the main operation. 4-2 Input values for CSA are (A1, A2) and (D1, D2). Since A = (A1 + A2) and D = (D1 + D2), if the addition row is possible without carry propagation, there will be two input values.

캐리 전파 문제를 해결하는 방법에는 이진 수 체계(Binary Number System)가 아닌 잉여 이진 수 체계(Redundant Binary Number System)로 확장하여 부호 비트를 표현하는 방식이 있다. There is a method of solving the carry propagation problem by expressing the code bit by extending the redundant binary number system instead of the binary number system.

도 1a는 본 발명에 적용되는 잉여 이진수 덧셈기의 개략적인 블럭도이다.1A is a schematic block diagram of a redundant binary adder applied to the present invention.

간단한 예를 들면 두 비트

Figure 112006088918970-pat00040
,
Figure 112006088918970-pat00041
에 대하여 덧셈을 수행할 때 경우의 수는 표 1과 같다.Simple example two bits
Figure 112006088918970-pat00040
,
Figure 112006088918970-pat00041
Table 1 shows the number of cases when addition is performed for.

Figure 112006088918970-pat00042
Figure 112006088918970-pat00042
Figure 112006088918970-pat00043
Figure 112006088918970-pat00043
Figure 112006088918970-pat00044
Figure 112006088918970-pat00044
Figure 112006088918970-pat00045
Figure 112006088918970-pat00045
00 00 00 00 00 1One 1One
Figure 112006088918970-pat00046
Figure 112006088918970-pat00046
1One 00 1One
Figure 112006088918970-pat00047
Figure 112006088918970-pat00047
1One 1One 1One 00

Figure 112006088918970-pat00048
와 합
Figure 112006088918970-pat00049
이 모두 1인 경우 캐리가 발생할 수 있다. 따라서 표 1과 같이 수행하면 캐리 전파를 제거할 수 있다. 그러나
Figure 112006088918970-pat00050
을 나타내기 위해서는 부호 비트를 사용해야 한다. 잉여 이진수 덧셈기(RBA)는 입력 값이 두 개이고 출력 값이 한 개이지만 부호 비트를 포함하므로 4-2 CSA와 동일한 형태를 갖추지만 내부 구조를 간단히 하여 효율성을 높일 수 있다는 장점을 갖는다.
Figure 112006088918970-pat00048
Sum with
Figure 112006088918970-pat00049
If both are 1, a carry may occur. Therefore, the carry propagation can be removed as shown in Table 1. But
Figure 112006088918970-pat00050
The sign bit must be used to indicate. The redundant binary adder (RBA) has the same form as 4-2 CSA because it has two input values and one output value but contains sign bits, but it has the advantage of increasing efficiency by simplifying the internal structure.

이하에서는, 아래 첨자가 "sign" 이거나 윗 첨자가 "s" 인 경우에는 부호 비트, 아래 첨자가 "value" 이거나 윗 첨자가 "v"인 경우에는 비트 값을 의미하며, 아래 첨자

Figure 112008010743748-pat00173
는 단계별로 입력되는 비트값을 구분하기 위한 단계별 식별자를 의미한다.Hereinafter, the sign bit if the subscript is "sign" or the superscript is "s", and the bit value if the subscript is "value" or the superscript is "v", the subscript
Figure 112008010743748-pat00173
Denotes a step identifier for distinguishing bit values input step by step.

SD 수 체계와 일반전인 수 체계는 각 자리 수에 따른 표현 방식에 차이가 있다. r진법에서 일반전인 수 체계는 {0,1,2,...,r-1}의 r개의 원소로 표현되는 반면, SD 수 체계는 {-(r-1),-(r-2),....,0,..,r-2,r-1}을 이용한다. SD 수 체계에서 각 자리들이 양의 값뿐만 아니라 음의 값도 가지게 함으로써 SD 수 체계는 하나의 수가 서로 다르게 표현될 수 있는 잉여한 특성을 가지게 된다. 일반전인 수 체계에서는 음수를 표현하기 위해 수의 부호와 크기를 구분해 표현하는 부호-크기 표현 방식, 1의 보수 표현 방식, 또는 2의 보수 표현 방식 등을 사용하나 SD 수 체계는 각각의 자리가 부호에 대한 정보를 함께 가지게 된다. The SD number system and the general number system differ in how they are represented for each digit. In r notation, the general number system is represented by r elements of {0,1,2, ..., r-1}, while the SD number system is {-(r-1),-(r-2) , ...., 0, .., r-2, r-1}. By allowing each digit in the SD number system to have a positive value as well as a negative value, the SD number system has a surplus characteristic that one number can be expressed differently. The general number system uses a code-size representation, a one's complement representation, or a two's complement representation to distinguish negative numbers and sizes. It has information about the sign.

Figure 112006088918970-pat00051
Figure 112006088918970-pat00051

중간 합과 이전 캐리가 동시에 1 또는

Figure 112006088918970-pat00052
이 되는 경우를 방지함으로써 캐리의 수평적 전달을 방지한다. 따라서 표 2의 덧셈 규칙을 따름으로써 SD 수 체계의 장점인 캐리 전파 제거 특성을 이진 SD 수 체계에서도 유지시킬 수 있다. Intermediate sum and previous carry equals 1 or
Figure 112006088918970-pat00052
This prevents the carry from being horizontally transferred. Thus, by following the addition rules in Table 2, the carry propagation rejection characteristic of the SD number system can be maintained in the binary SD number system.

본 발명에 따른 잉여 이진수 곱셈기는 구성요소인 본 발명에 따른 잉여 이진수 덧셈기의 입출력 표현을 새로 정의하여 효율적인 구조 설계를 가능하게 한다.The redundant binary multiplier according to the present invention newly defines the input and output representation of the redundant binary adder according to the present invention, which is a component, thereby enabling efficient structure design.

이하에서는 도면을 참조하여 본 발명의 바람직한 실시예를 설명하기로 한다. 그러나, 다음에 예시하는 본 발명의 실시예는 여러 가지 다른 형태로 변형될 수 있으며, 본 발명의 범위가 다음에 상술하는 실시예에 한정되는 것은 아니다.Hereinafter, with reference to the drawings will be described a preferred embodiment of the present invention. However, embodiments of the present invention illustrated below may be modified in many different forms, and the scope of the present invention is not limited to the embodiments described below.

이하에서 사용하는 연산을 다음과 같이 정의한다. 즉,

Figure 112006088918970-pat00053
는 A와 B의 OR 연산,
Figure 112006088918970-pat00054
는 A와 B의 AND 연산,
Figure 112006088918970-pat00055
, A와 B의 XOR 연산,
Figure 112006088918970-pat00056
는 A의 전환(Invert) 연산이다.The operation used below is defined as follows. In other words,
Figure 112006088918970-pat00053
Is an OR operation of A and B,
Figure 112006088918970-pat00054
Is an AND operation of A and B,
Figure 112006088918970-pat00055
, The XOR operation of A and B,
Figure 112006088918970-pat00056
Is an invert operation of A.

도 1b는 본 발명에 따른 잉여 이진수의 곱셈기의 블럭도이다.1B is a block diagram of a multiplier of redundant binary numbers in accordance with the present invention.

입력 버퍼(Input Buffer, 110) 및 출력 버퍼(Output Buffer, 170)는 4-2 CSA에 일반적으로 사용되는 버퍼와 동일하다.Input Buffer 110 and Output Buffer 170 are the same buffers commonly used for 4-2 CSAs.

배럴 레지스터 전가산기(MBRFA, 120)는 X의 최하위 비트부터 순서대로 바이너리 값으로 변환한다.The barrel register full adder (MBRFA) 120 converts the binary values in order from the least significant bit of X.

멀티플렉서(140)는 변환된 X의 비트 값에 따라 Y, M, Y와 M을 더한 값 또는 0 (130) 중 어느 하나를 선택한다.The multiplexer 140 selects one of Y, M, Y plus M, or 0 130 according to the converted bit value of X.

잉여 이진수 덧셈기(NRBA, 150)는 선택된 값과 X에 대한 바이너리 값을 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 제1덧셈의 결과를 생성한다. 잉여 이진수 덧셈기(150)는 또한, 제1덧셈의 캐리 중 이전 자리의 캐리, 제1덧셈의 섬 및 X에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 제2덧셈의 결과를 생성한다. 이때, 잉여 이진수 덧셈기(150) 중 제1덧셈을 수행하는 논리 게이트들의 블럭을 제1덧셈 블럭, 제2덧셈을 수행하는 논리 게이트들의 블럭을 제2덧셈 블럭으로 정의한다.The redundant binary adder (NRBA) 150 performs a first addition on the selected value and the binary value for X to generate a result of the first addition consisting of a carry value, which is a binary value, and an island, which is a negative number. The redundant binary adder 150 also consists of a carry that is a negative number and an island that is a binary value by performing a second addition that adds a carry of the previous digit among the carry of the first addition, an island of the first addition, and a negative number for X. Produces the result of the second addition being made. In this case, the block of logic gates performing the first addition of the redundant binary adder 150 is defined as the first addition block, and the block of the logic gates performing the second addition is defined as the second addition block.

잉여 이진수 덧셈기(150)는 배럴 레지스터 전가산기(120)가 X의 최하위 비트부터 시작하여 최상위 비트를 바이너리 값으로 변환할 때까지 제1덧셈 및 제2덧셈을 반복 수행한다. 이때, 덧셈의 반복 수행중의 출력은 어큐뮬레이터(160)에 저장되었다가 다음 회차의 덧셈 입력으로 인가된다.The redundant binary adder 150 repeats the first addition and the second addition until the barrel register full adder 120 converts the most significant bit into a binary value starting from the least significant bit of X. At this time, the output during the repetition of the addition is stored in the accumulator 160 and applied to the next input of the addition.

어큐뮬레이터(160)는 제1덧셈 및 상기 제2덧셈의 반복 수행 중에 제2덧셈의 결과를 X에 대한 바이너리 값 및 X에 대한 음의 수에 적용한다.Accumulator 160 applies the result of the second addition to the binary value for X and the negative number for X during the iteration of the first and second additions.

도 2a는 도 1a의 잉여 이진수 덧셈기(150)의 상세 블럭도이다.FIG. 2A is a detailed block diagram of the redundant binary adder 150 of FIG. 1A.

본 발명에 따른 잉여 이진수 덧셈기(NRBA)는 종래 Sign+Sign->Sign이 아닌 Sign+Binary+Negative->Negative+Binary 방법이다.The redundant binary adder (NRBA) according to the present invention is a Sign + Binary + Negative-> Negative + Binary method rather than the conventional Sign + Sign-> Sign.

본 발명에 따른 잉여 이진수의 덧셈 방법은 다음 두 단계로 구성된다.The method of adding redundant binary numbers according to the present invention consists of the following two steps.

1단계 :

Figure 112008010743748-pat00174
즉,
Figure 112008010743748-pat00058
을 수행하여 캐리
Figure 112008010743748-pat00059
와 합
Figure 112008010743748-pat00060
을 생성한다. 이 연산을 정리하면 하기의 표 3a 및 표 3b와 같다.Stage 1 :
Figure 112008010743748-pat00174
In other words,
Figure 112008010743748-pat00058
Carry by
Figure 112008010743748-pat00059
Sum with
Figure 112008010743748-pat00060
Create This operation is summarized in Tables 3a and 3b below.

2단계 :

Figure 112008010743748-pat00175
즉,
Figure 112008010743748-pat00062
과 1단계에서 생성된
Figure 112008010743748-pat00063
와 이전 자리의 캐리
Figure 112008010743748-pat00064
의 덧셈을 수행하여 캐리
Figure 112008010743748-pat00065
와 합
Figure 112008010743748-pat00066
을 생성한다. 이 연산을 정리하면 하기의 표 4a 및 표 4b와 같다.Step 2:
Figure 112008010743748-pat00175
In other words,
Figure 112008010743748-pat00062
Created in step 1
Figure 112008010743748-pat00063
And carry of the previous seat
Figure 112008010743748-pat00064
Carry by Doing Addition
Figure 112008010743748-pat00065
Sum with
Figure 112008010743748-pat00066
Create This operation is summarized in Tables 4a and 4b below.

이때, Sig는 잉여 이진수, Bin은 바이너리 값, Neg는 음의 수를 의미한다.In this case, Sig means a redundant binary number, Bin means a binary value, and Neg means a negative number.

Figure 112008010743748-pat00176
이라 하고 이때 발생하는 캐리
Figure 112008010743748-pat00068
, 합
Figure 112008010743748-pat00069
라 할 때, 1단계에서 발생할 수 있는 경우의 수는 표 3a와 같이 총 6가지가 된다. 알고리즘을 효율적으로 구성하기 위해 표 3a의
Figure 112008010743748-pat00070
Figure 112008010743748-pat00071
대신 각각의 전환한 값을 적용하면, 즉
Figure 112008010743748-pat00072
Figure 112008010743748-pat00073
를 적용하면 표 3b와 같다.
Figure 112008010743748-pat00176
Carrying this happens
Figure 112008010743748-pat00068
, Sum
Figure 112008010743748-pat00069
In this case, the number of cases that can occur in the first stage is a total of six as shown in Table 3a. In order to configure the algorithm efficiently,
Figure 112008010743748-pat00070
Wow
Figure 112008010743748-pat00071
Instead of applying each converted value, i.e.
Figure 112008010743748-pat00072
Wow
Figure 112008010743748-pat00073
If applied, it is as Table 3b.

Figure 112008010743748-pat00177
Figure 112008010743748-pat00177

Figure 112008010743748-pat00178
Figure 112008010743748-pat00178

Figure 112006088918970-pat00076
Figure 112006088918970-pat00077
는 표 3의 경우를 고려하면 수학식 4와 같이 연산된다.
Figure 112006088918970-pat00076
Wow
Figure 112006088918970-pat00077
Considering the case of Table 3 is calculated as shown in Equation 4.

Figure 112008010743748-pat00179
Figure 112008010743748-pat00179

수학식 4에서

Figure 112006088918970-pat00079
이므로 두 번째 단계는
Figure 112006088918970-pat00080
의 연산이 된다.
Figure 112006088918970-pat00081
이라 하고, 이때 발생하는 캐리
Figure 112006088918970-pat00082
, 합
Figure 112006088918970-pat00083
이라 할때 경우의 수는 표 4a와 같다. 1단계와 마찬가지 로 알고리즘을 효율적으로 구성하기 위해 표 4a의
Figure 112006088918970-pat00084
Figure 112006088918970-pat00085
대신 각각의 전환한 값을 적용하면, 즉
Figure 112006088918970-pat00086
Figure 112006088918970-pat00087
를 적용하면 표 4b와 같다.In equation (4)
Figure 112006088918970-pat00079
So the second step is
Figure 112006088918970-pat00080
Is the operation of.
Figure 112006088918970-pat00081
This is the carry that occurs
Figure 112006088918970-pat00082
, Sum
Figure 112006088918970-pat00083
The number of cases is shown in Table 4a. As in step 1, to efficiently configure the algorithm,
Figure 112006088918970-pat00084
Wow
Figure 112006088918970-pat00085
Instead of applying each converted value, i.e.
Figure 112006088918970-pat00086
Wow
Figure 112006088918970-pat00087
If applied, it is as Table 4b.

Figure 112006088918970-pat00088
Figure 112006088918970-pat00088

Figure 112006088918970-pat00089
Figure 112006088918970-pat00089

Figure 112006088918970-pat00090
Figure 112006088918970-pat00091
는 수학식 5와 같이 연산된다.
Figure 112006088918970-pat00090
Wow
Figure 112006088918970-pat00091
Is calculated as in Equation 5.

Figure 112008010743748-pat00180
Figure 112008010743748-pat00180

입력 값

Figure 112006088918970-pat00094
(단,
Figure 112006088918970-pat00095
Figure 112006088918970-pat00096
,
Figure 112006088918970-pat00097
에 대한 덧셈의 결과로
Figure 112006088918970-pat00098
를 출력하는 덧셈은 다음의 알고리즘(이하 "알고리즘 2"라고 한다)와 같다.Input value
Figure 112006088918970-pat00094
(only,
Figure 112006088918970-pat00095
Wow
Figure 112006088918970-pat00096
,
Figure 112006088918970-pat00097
As a result of addition to
Figure 112006088918970-pat00098
The addition that prints is equivalent to the following algorithm (hereinafter referred to as "Algorithm 2").

Figure 112006088918970-pat00099
Figure 112006088918970-pat00099

Figure 112008010743748-pat00181
Figure 112008010743748-pat00181

한 자리 덧셈에 대한 하드웨어 구조는 삼성 STD130 0.18um 1.8V CMOS 셀 라이브러리에서 제공되는 6개의 셀로 구성될 수 있다. The hardware architecture for single digit addition can consist of six cells provided by the Samsung STD130 0.18um 1.8V CMOS cell library.

A, B는

Figure 112006088918970-pat00101
이며 A는 전환 형태
Figure 112006088918970-pat00102
를 가진다. 이 두 값은 곱 셈에서 중간 결과로써 사용된다. 그러나 다음 곱셈의 입력으로 재사용되기 위해서는 A, B를 하나의 Sig 값으로 생성하는 결합기(Coupler)를 사용해야 한다. A and B are
Figure 112006088918970-pat00101
And A is the transition form
Figure 112006088918970-pat00102
Has These two values are used as the intermediate result in multiplication. However, to be reused as the input of the next multiplication, you must use a combiner that generates A and B as a single Sig value.

그러나 본 발명에 따른 잉여 이진수 덧셈기(NRBA)는 추가적인 하드웨어 없이 한 번의 반복 동작으로 결합기의 역할을 수행한다. 덧셈 결과의 두 출력 값

Figure 112008010743748-pat00103
에 대해, 두 값을 하나의 값
Figure 112008010743748-pat00182
로 결합한다고 할 때 경우의 수는 표 5와 같다.However, the redundant binary adder (NRBA) according to the present invention serves as a combiner in one iteration without additional hardware. Two outputs of the addition result
Figure 112008010743748-pat00103
For two values, one value
Figure 112008010743748-pat00182
Suppose that the number of cases are shown in Table 5.

Figure 112006088918970-pat00105
Figure 112006088918970-pat00105
Figure 112006088918970-pat00106
Figure 112006088918970-pat00106
Figure 112006088918970-pat00107
Figure 112006088918970-pat00107
Figure 112006088918970-pat00108
Figure 112006088918970-pat00108
1One 00 1One 00 1One 1One 1One 1One 00 00 00 1One 00 1One 1One 00

표 5는 표 4b에서

Figure 112008010743748-pat00109
인 경우 오른쪽 4열과 동일함을 알 수 있다. 따라서
Figure 112008010743748-pat00110
를 고정하고
Figure 112008010743748-pat00111
Figure 112008010743748-pat00112
를 대입하
Figure 112008010743748-pat00113
Figure 112008010743748-pat00114
를 대입하면 결합기의 역할을 수행할 수 있게 된다. 또한 입력 값
Figure 112008010743748-pat00115
를 고정하면
Figure 112008010743748-pat00116
Figure 112008010743748-pat00117
값이 출력되고,
Figure 112008010743748-pat00118
Figure 112008010743748-pat00119
값이 출력된다. 따라서 최하위 자리에서
Figure 112008010743748-pat00120
을 대입하고
Figure 112008010743748-pat00121
을 대입한다.
Figure 112008010743748-pat00122
을 대입하면
Figure 112008010743748-pat00123
Figure 112008010743748-pat00124
이 되고
Figure 112008010743748-pat00125
Figure 112008010743748-pat00126
가 된다. 따라서 덧셈의 2단계의 경우의 수와 동일하게 되므로 결합기의 역할을 수행할 수 있다. Table 5 shows in Table 4b
Figure 112008010743748-pat00109
If it is the same as the right 4 columns. therefore
Figure 112008010743748-pat00110
And fix it
Figure 112008010743748-pat00111
on
Figure 112008010743748-pat00112
Substitute
Figure 112008010743748-pat00113
on
Figure 112008010743748-pat00114
Substituting can act as a combiner. Also input value
Figure 112008010743748-pat00115
When fixed
Figure 112008010743748-pat00116
Is
Figure 112008010743748-pat00117
Value is output,
Figure 112008010743748-pat00118
Is
Figure 112008010743748-pat00119
The value is output. So at the lowest position
Figure 112008010743748-pat00120
Substituting
Figure 112008010743748-pat00121
Replace with
Figure 112008010743748-pat00122
If you substitute
Figure 112008010743748-pat00123
silver
Figure 112008010743748-pat00124
Become this
Figure 112008010743748-pat00125
silver
Figure 112008010743748-pat00126
Becomes Therefore, since it is equal to the number of cases in the second step of addition, it can serve as a combiner.

도 2b는 도 1a의 잉여 이진수 덧셈기(150)의 동작 흐름도이다.FIG. 2B is a flowchart of operation of the redundant binary adder 150 of FIG. 1A.

잉여 이진수(signed digit)을 표현할 때, 다음의 두 가지 표현 방법이 있다. When expressing a signed digit, there are two ways to express it.

부호-비트값(sign-value) 방법은

Figure 112006088918970-pat00127
로 표시한다. 예를 들어, (0,0)=0, (0,1)=1, (1,1)=-1 이다. 포지티브-네가티브(positive-negative) 방법은
Figure 112006088918970-pat00128
로 표시한다. 예를 들어, (0,0)=(1,1)=0, (1,0)=1, (0,1)=-1 이다.The sign-value method is
Figure 112006088918970-pat00127
To be displayed. For example, (0,0) = 0, (0,1) = 1, (1,1) =-1. Positive-negative methods
Figure 112006088918970-pat00128
To be displayed. For example, (0,0) = (1,1) = 0, (1,0) = 1, (0,1) =-1.

도 2b에서, 입력에서

Figure 112006088918970-pat00129
는 멀티플렉서(Multiplexer, 140)를 통한 값으로 부호-비트값(sign-value)으로 표현되어 있고,
Figure 112006088918970-pat00130
는 어큐뮬레이터(accumulator, 160)로서, 포지티브-네가티브(positive-negative)로 표현되어 있다. In Figure 2b, at the input
Figure 112006088918970-pat00129
Is a value through a multiplexer (140), expressed as a sign-value,
Figure 112006088918970-pat00130
Is an accumulator 160, which is expressed as positive-negative.

포지티브-네가티브(positive-negative) 표현은 곱셈기 내부에서만 사용되고 외부로의 출력은 부호-비트값(sign-value) 표현으로 변환된다. 변환시켜주는 컨버터가 따로 존재할 경우 추가적인 하드웨어가 소요되지만, 본 발명에서는 잉여 이진수 덧셈기를 컨버터로 사용한다. 이처럼 곱셈기의 최종 결과는 부호-비트값(sign-value) 표현으로 출력되어, 다음 곱셈에서도 직접 사용할 수 있도록 설계된다.Positive-negative representations are used only inside the multiplier and output to the outside is converted to a sign-value representation. If there is a separate converter to convert additional hardware is required, the present invention uses a redundant binary adder as a converter. As such, the final result of the multiplier is output as a sign-value representation and is designed for direct use in the next multiplication.

도 3은 도 1a의 배럴 레지스터 전가산기(120)의 블럭도이다.3 is a block diagram of the barrel register full adder 120 of FIG. 1A.

본 발명에 따른 배럴 레지스터 전가산기(Modified Barrel Register Full Adder)는 잉여 이진수(signed digit)로 표현된

Figure 112006088918970-pat00131
들을 바이너리(binary) 수로 바꾸는 역할을 수행한다. Modified Barrel Register Full Adder according to the present invention is represented by a signed digit.
Figure 112006088918970-pat00131
It converts them into binary numbers.

본 발명에 따른 배럴 레지스터 전가산기는 도 3과 같이, MFA(121)와 레지스터(122)로 구성되고, 최하위 디지트(digit)부터 쉬프트되어 입력되는

Figure 112008010743748-pat00132
를 입력으로 한다. 한편, MFA(121)는 도 4의 구조를 가지며, 도 4의 MFA(121)를 수학식으로 표현하면, 상기 수학식 4와 같다.The barrel register full adder according to the present invention is composed of the MFA 121 and the register 122, as shown in Figure 3, shifted from the lowest digit (digit) is input
Figure 112008010743748-pat00132
As input. Meanwhile, the MFA 121 has the structure of FIG. 4, and the MFA 121 of FIG. 4 is represented by Equation 4 as shown in Equation 4 above.

바이너리(binary) 수 상에서 Y의 덧셈 여부를 결정하는

Figure 112006088918970-pat00133
가 잉여 이진수(signed digit)으로 표현될 경우 더 많은 레지스터를 사용해야 하고 더 많은 경우의 수를 고려해야 하기 때문에 종래의 배럴 레지스터 전가산기의 수정이 필요한 것이다.Determines whether Y is added on binary number
Figure 112006088918970-pat00133
Is represented as a signed digit, it is necessary to modify the conventional barrel register full adder because more registers must be used and more cases must be taken into account.

본 발명에 따른 배럴 레지스터 전가산기는 Y의 덧셈 여부를 결정하는 X가 잉여 이진수이므로 -Y 또는 -Y+M의 연산이 필요하게 되고 그에 대한 레지스터 및 연산의 횟수가 증가하므로 복잡도를 줄이기 위하여 음수가 아닌 X를 이진수로 변환하는 역할을 한다.In the barrel register full adder according to the present invention, since X for determining whether to add Y is a redundant binary number, the operation of -Y or -Y + M is required, and the number of registers and operations for the same increases. Converts X to binary.

본 발명의 곱셈기는 4-2 CSA 몽고메리 곱셈기에 덧셈 부분을 잉여 이진수 덧셈기(RBA)로 대체하고 그에 따르는 배럴 레지스터 전가산기를 본 발명에 따른 배럴 레지스터 전가산기로 대체한다. 종래의 이진수 입력 값과 출력 값은 잉여 이진수로 표현한다.The multiplier of the present invention replaces the addition portion with a redundant binary adder (RBA) to the 4-2 CSA Montgomery multiplier and replaces the barrel register full adder with the barrel register full adder according to the present invention. Conventional binary input values and output values are represented by redundant binary numbers.

X=Σ

Figure 112006088918970-pat00134
는 최하위 디지트(digit)부터 곱셈기가 루프를 반복할 때마다 쉬프트 되면서 계산하므로 추가적인 시간을 요구하지 않는다. X = Σ
Figure 112006088918970-pat00134
Does not require additional time since the multiplier calculates the shift from the lowest digit each time the loop repeats.

반전된(Invert) 값을 사용하는 것은 게이트 표현을 더 간단히 하기 위하여 사용한 것이다. 지수승 연산이 수행될 때 반전된(Invert) 값을 처음부터 사용하므로 곱셈기에서는 Invert 비용이 따로 들지 않는다.Using an Invert value is used to simplify the gate representation. When the exponentiation operation is performed, the multiplier uses Invert value from the beginning, so the multiplier does not cost Invert separately.

본 발명에 따른 곱셈기는 덧셈 수행 부분에 두가지 표현 방법을 동시에 사용한다.The multiplier according to the present invention uses two expression methods at the same time in the addition part.

도 4는 도 3에 적용되는 MFA(121)의 상세 블럭도이다.4 is a detailed block diagram of the MFA 121 applied to FIG. 3.

도 3의 MFA(121)는 도 4에서와 같이, 2개의 OR 게이트, 1개의 AND 게이트, 2개의 NAND 게이트로 구성될 수 있다.As shown in FIG. 4, the MFA 121 of FIG. 3 may include two OR gates, one AND gate, and two NAND gates.

도 5는 본 발명에 따른 잉여 이진수의 덧셈 방법의 흐름도이다.5 is a flowchart of a method for adding a redundant binary number according to the present invention.

먼저, 임의의 잉여 이진수 X, Y, Z에 대하여, X에 대한 잉여 이진수와 Y에 대한 바이너리 값을 더하는 제1덧셈을 수행한다. 이때, 제1덧셈의 결과는 바이너리 값인 캐리 및 음의 수인 섬으로 구성되게 한다(530 과정).First, a first addition is performed for any redundant binary numbers X, Y, and Z by adding a redundant binary number for X and a binary value for Y. In this case, the result of the first addition includes a carry, which is a binary value, and an island, which is a negative number, in operation 530.

다음, 제1덧셈의 캐리 중 이전 자리의 캐리, 제1덧셈의 섬 및 Z에 대한 음의 수를 더하는 제2덧셈을 수행한다. 이때, 제2덧셈의 결과는 음의 수인 캐리 및 바이너리 값인 섬으로 구성되게 한다(540 과정). 이와 같이 하면, 캐리 전파 없이 하나의 잉여 이진수 출력을 얻을 수 있다.Next, a second addition is performed by adding a carry of the previous position among the carry of the first addition, an island of the first addition, and a negative number for Z. In this case, the result of the second addition includes a carry, which is a negative number, and an island, which is a binary value, in operation 540. In this way, one redundant binary output can be obtained without carry propagation.

도 6은 본 발명에 따른 잉여 이진수의 곱셈 방법의 흐름도이다.6 is a flowchart of a multiplication method of a redundant binary number according to the present invention.

승수를 Y, 피승수를 X, 모듈러 값을 M이라고 할때, 임의의 잉여 이진수 X, Y의 논리 게이트를 이용한 곱셈을 가정한다.When multiplying Y, multiplicand X, and modular value M, a multiplication using a logic gate of arbitrary redundant binary numbers X and Y is assumed.

먼저, X의 최하위 비트부터 순서대로 바이너리 값으로 변환한다(610 과정).First, a binary value is converted in order from the least significant bit of X (step 610).

다음, 변환된 X의 비트 값에 따라 Y, 상기 M, Y와 M을 더한 값 또는 0 중 어느 하나를 선택한다(620 과정).Next, one of Y, M, Y, and M or 0 is selected according to the converted bit value of X (step 620).

다음, 선택된 값과 X에 대한 바이너리 값을 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 제1덧셈의 결과를 생성한다(630 과정).Next, a first addition is performed on the selected value and the binary value for X to generate a result of the first addition including a carry value, which is a binary value, and an island, which is a negative number, in operation 630.

제1덧셈의 결과가 생성되면, 제1덧셈의 캐리 중 이전 자리의 캐리, 제1덧셈의 섬 및 X에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 제2덧셈의 결과를 생성한다(640 과정).When the result of the first addition is generated, a second addition is performed by adding a carry of the first place among the carry of the first addition, an island of the first addition, and a negative number for X, thereby forming a carry which is a negative number and an island having a binary value. In operation 640, the result of the second addition is generated.

다음, 제2덧셈의 결과를 어큐뮬레이터에 저장하고, 다음 제1덧셈의 수행시에 입력으로 인가한다(650 과정).Next, the result of the second addition is stored in the accumulator and applied as an input when the next first addition is performed (step 650).

마지막으로, 제2덧셈의 결과를 X에 대한 바이너리 값 및 X에 대한 음의 수에 적용하면서 위의 과정(610-650 과정)을 반복 수행한다. 이때, X의 최상위 비트가 바이너리 값으로 변환되고, 이에 따라 제1덧셈 및 제2덧셈이 수행되었으면, 모든 과정을 종료한다(660 과정).Finally, the above steps (steps 610-650) are repeated while applying the result of the second addition to the binary value for X and the negative number for X. At this time, if the most significant bit of X is converted into a binary value, and thus the first and second additions are performed, all processes are terminated (step 660).

일반적으로 RSA 암호화 및 복호화 함수는 X가 평문, C가 암호문, M이 n비트 모듈러스라 하고 e,d가 공개 및 비밀 지수라 할 때, 각각

Figure 112006088918970-pat00135
Figure 112006088918970-pat00136
와 같다. 또한
Figure 112006088918970-pat00137
이고
Figure 112006088918970-pat00138
가 약
Figure 112006088918970-pat00139
비트 수라 할 때,
Figure 112006088918970-pat00140
를 만족해야 한다. In general, the RSA encryption and decryption functions are given when X is plaintext, C is ciphertext, M is n-bit modulus, and e, d is public and secret index, respectively.
Figure 112006088918970-pat00135
Wow
Figure 112006088918970-pat00136
Same as Also
Figure 112006088918970-pat00137
ego
Figure 112006088918970-pat00138
About
Figure 112006088918970-pat00139
Speaking of beats,
Figure 112006088918970-pat00140
Must be satisfied.

본 발명에 따른 잉여 이진수 몽고메리 곱셈을 적용한 지수승 연산은 다음의 알고리즘과 같다.The exponential power operation using surplus binary Montgomery multiplication according to the present invention is as follows.

Figure 112006088918970-pat00141
Figure 112006088918970-pat00141

Figure 112006088918970-pat00142
Figure 112006088918970-pat00142

이하에서는 본 발명에 따른 잉여 이진수 곱셈기의 효율성을 설명한다. Hereinafter, the efficiency of the redundant binary multiplier according to the present invention.

본 발명에 의하면, 4-2 CSA에 비해 약 18.5%의 공간 복잡도 감소와 약 25.3%의 시간 복잡도 감소를 보인다. 또한 종래의 RBA에 비해 최대 약 39.8%, 최소 약 14%의 시간 복잡도 감소를 보인다. 공간 복잡도 또한 종래의 RBA에 비해 최대 약 62.7%, 최소 약 6.3%의 감소를 보인다. 또한, 종래의 RBA와 비교시 공간 복잡도는 44.3%, 시간 복잡도는 2.8%의 감소한다. According to the present invention, the spatial complexity is reduced by about 18.5% and the time complexity is reduced by about 25.3% compared to 4-2 CSA. In addition, the time complexity is reduced by up to about 39.8% and at least about 14% compared to the conventional RBA. The spatial complexity is also reduced by up to about 62.7% and at least about 6.3% compared to conventional RBA. In addition, compared to the conventional RBA, the space complexity is 44.3%, the time complexity is reduced by 2.8%.

표 7은 4-2 CS 몽고메리 곱셈기와 종래의 잉여 이진수 몽고메리 곱셈기 및 본 발명에 따른 잉여 이진수 몽고메리 곱셈기를 비교한 결과이다.Table 7 shows a result of comparing the 4-2 CS Montgomery multiplier, the conventional redundant binary Montgomery multiplier, and the redundant binary Montgomery multiplier according to the present invention.

알고리즘algorithm 클럭 사이클Clock cycle 임계경로지연 시간Critical Path Delay Time 공간 복잡도Spatial complexity 4-2 CSA 몽고메리 곱셈기4-2 CSA Montgomery Multiplier n+4n + 4 2FA+4:1MUX+1xo22FA + 4: 1MUX + 1xo2 9Register+4:1MUX+1xo2+2FA9Register + 4: 1MUX + 1xo2 + 2FA 종래 잉여 이진수 몽고메리 곱셈기 1Conventional Surplus Binary Montgomery Multiplier 1 n+4n + 4 1RBA+4:1MUX+1xo21RBA + 4: 1MUX + 1xo2 9Register+4:1MUX+1xo2+1RBA9Register + 4: 1MUX + 1xo2 + 1RBA 종래 잉여 이진수 몽고메리 곱셈기 2Conventional Surplus Binary Montgomery Multiplier 2 n+6n + 6 1RBA+4:1MUX+1xo21RBA + 4: 1MUX + 1xo2 9Register+4:1MUX+1xo2+1RBA+1Coupler* 9Register + 4: 1MUX + 1xo2 + 1RBA + 1Coupler * 본 발명에 따른 잉여 이진수 몽고메리 곱셈기Surplus Binary Montgomery Multiplier According to the Invention n+6n + 6 1NRBA+4:1MUX+1xo21NRBA + 4: 1MUX + 1xo2 9Register+4:1MUX+1xo2+1RBA9Register + 4: 1MUX + 1xo2 + 1RBA 1Coupler* = 2nr2+1nd2+1nr2b+1iv1Coupler * = 2nr2 + 1nd2 + 1nr2b + 1iv

4-2 CS 몽고메리 곱셈기와 종래의 잉여 이진수 몽고메리 곱셈기는 클럭 사이클이 n+4임에 반해 본 발명에 따른 잉여 이진수 몽고메리 곱셈기는 n+6이다. 그 이유는 본 발명에 따른 잉여 이진수 몽고메리 알고리즘에서 결합기의 역할도 수행하기 때문이다. The 4-2 CS Montgomery multiplier and the conventional redundant binary Montgomery multiplier have a clock cycle of n + 4, whereas the redundant binary Montgomery multiplier according to the present invention is n + 6. This is because the redundant binary Montgomery algorithm according to the present invention also serves as a combiner.

비록, 본 발명에 따른 잉여 이진수 덧셈기(NRBA)를 몽고메리 곱셈기에 적용할 경우, 4-2 CSA 몽고메리 곱셈기와 종래의 잉여 이진수 몽고메리 곱셈기에 비해 클럭 사이클 수는 2회 더 증가하나 이는 1,024비트 또는 2,048비트 연산에서 비중이 크지 않다. 즉, 1024비트 또는 2048비트 곱셈에서 곱셈의 단위 시간이 가장 짧으므로 반복 회수 2회는 크게 비중을 차지하지 않는다. 공간 복잡도 또한 비교 대상과 동일한 레지스터 수, 멀티플렉서(MUX) 및 게이트를 가지고 있으므로 2FA와 1RBA에 비해 크기가 작은 1본 발명에 따른 잉여 이진수 덧셈기는 비트의 수가 증가할수록 큰 의미를 가진다.Although the redundant binary adder (NRBA) according to the present invention is applied to a Montgomery multiplier, the number of clock cycles is increased two more times compared to the 4-2 CSA Montgomery multiplier and the conventional redundant binary Montgomery multiplier, which is 1,024 bits or 2048 bits. The weight is not large in the operation. That is, since the unit time of multiplication is the shortest in 1024-bit or 2048-bit multiplication, the number of repetitions is not significant. Since the spatial complexity also has the same register number, multiplexer (MUX) and gate as the comparison object, the redundant binary adder according to the present invention, which is smaller in size than 2FA and 1RBA, has a significant meaning as the number of bits increases.

또한, 동일한 레지스터 수와 멀티플렉서(MUX) 및 게이트를 사용하며 덧셈기의 크기는 작고 단위 시간은 짧으므로 반복된 곱셈으로 이루어진 RSA 암호 시스템과 같은 정수 기반 암호 시스템에서 효율성을 크게 발휘할 수 있고 하드웨어 칩으로 구현할 경우 다양한 환경에서 사용될 수 있다.In addition, the same register count, multiplexer (MUX) and gates, and the small adder size and short unit time, can be very efficient in integer-based cryptographic systems such as RSA cryptosystems with repeated multiplication, and can be implemented with hardware chips. Can be used in a variety of environments.

본 발명은 소프트웨어를 통해 실행될 수 있다. 소프트웨어로 실행될 때, 본 발명의 구성 수단들은 필요한 작업을 실행하는 코드 세그먼트들이다. 프로그램 또는 코드 세그먼트들은 프로세서 판독 가능 매체에 저장되거나 전송 매체 또는 통신망에서 반송파와 결합된 컴퓨터 데이터 신호에 의하여 전송될 수 있다.The invention can be implemented via software. When implemented in software, the constituent means of the present invention are code segments that perform the necessary work. The program or code segments may be stored on a processor readable medium or transmitted by a computer data signal coupled with a carrier on a transmission medium or network.

컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 테이터가 저장되는 모든 종류의 기록 장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 장치의 예로는 ROM, RAM, CD-ROM, DVD±ROM, DVD-RAM, 자기 테이프, 플로피 디스크, 하드 디스크(hard disk), 광데이터 저장장치 등이 있다. 또한, 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 장치에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The computer-readable recording medium includes all kinds of recording devices in which data is stored which can be read by a computer system. Examples of computer-readable recording devices include ROM, RAM, CD-ROM, DVD ± ROM, DVD-RAM, magnetic tape, floppy disks, hard disks, optical data storage devices, and the like. The computer readable recording medium can also be distributed over network coupled computer devices so that the computer readable code is stored and executed in a distributed fashion.

본 발명은 도면에 도시된 일 실시예를 참고로 하여 설명하였으나 이는 예시적인 것에 불과하며 당해 분야에서 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 실시예의 변형이 가능하다는 점을 이해할 것이다. 그러나, 이와 같은 변형은 본 발명의 기술적 보호범위 내에 있다고 보아야 한다. 따라서, 본 발명의 진정한 기술적 보호범위는 첨부된 특허청구범위의 기술적 사상에 의해서 정해져야 할 것이다.Although the present invention has been described with reference to one embodiment shown in the drawings, this is merely exemplary and will be understood by those of ordinary skill in the art that various modifications and variations can be made therefrom. However, such modifications should be considered to be within the technical protection scope of the present invention. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.

상술한 바와 같이, 본 발명에 의하면, 캐리 전파 없이 결합기의 기능을 하는 덧셈기를 제공할 수 있고, 몽고메리 곱셈의 대부분의 임계 경로 지연 시간을 차지하는 세 피연산자의 덧셈을 수행하는 부분에 잉여 이진수 개념을 도입하고 새롭게 제안된 잉여 이진수 덧셈기를 사용하여 공간 복잡도 및 시간 복잡도를 줄일 수 있으며, 반복하는 모듈러 곱셈으로 이루어진 RSA 암호 시스템과 곱셈기에서 중요 구성 기능 블록인 여러 시스템들이 간단하게 구현될 수 있도록 하는 효과가 있다. As described above, according to the present invention, it is possible to provide an adder that functions as a combiner without carry propagation, and introduces the concept of a redundant binary number in the part performing addition of three operands that occupy most of the critical path delay time of Montgomery multiplication. The new proposed redundant binary adder can reduce the space and time complexity, and it is possible to simplify the implementation of the RSA cryptosystem with repeating modular multiplication and the important components of the functional block in the multiplier. .

Claims (10)

임의의 잉여 이진수 X, Y, Z의 논리 게이트를 이용한 암호화 시스템의 덧셈 방법에 있어서,In the method of adding an encryption system using a logical gate of arbitrary redundant binary numbers X, Y, and Z, 상기 X에 대한 잉여 이진수와 상기 Y에 대한 바이너리 값을 더하는 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하는 단계; 및Performing a first addition by adding a redundant binary number for X and a binary value for Y to generate a result of the first addition consisting of a carry value, which is a binary value, and an island with a negative number; And 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 Z에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하는 단계를 포함하는 잉여 이진수의 덧셈 방법.The second addition of the carry of the first addition, the second addition of the carry of the first position, the island of the first addition and the negative number for the Z to perform a second addition consisting of a carry of a negative number and the island of a binary value A method of adding a redundant binary number comprising generating a result. 제 1 항에 있어서,The method of claim 1, 상기 X에 대한 잉여 이진수는The surplus binary number for X is i번째 비트가 부호 비트
Figure 112006088918970-pat00143
와 비트 값
Figure 112006088918970-pat00144
으로 구성되는 것을 특징으로 하는 잉여 이진수의 덧셈 방법.
i bit is the sign bit
Figure 112006088918970-pat00143
And bit values
Figure 112006088918970-pat00144
Addition method of the binary number, characterized in that consisting of.
제 2 항에 있어서,The method of claim 2, 상기 제1덧셈의 결과를 생성하는 단계는Generating the result of the first addition is 상기 제1덧셈의 캐리를
Figure 112008010743748-pat00145
, 상기 제1덧셈의 섬을
Figure 112008010743748-pat00146
라고 할 때, 하기 식 4
The carry of the first addition
Figure 112008010743748-pat00145
, The island of the first addition
Figure 112008010743748-pat00146
When we say, expression 4
Figure 112008010743748-pat00183
(4)
Figure 112008010743748-pat00183
(4)
를 이용하는 단계인 것을 특징으로 하는 잉여 이진수의 덧셈 방법.The method of adding a redundant binary number, characterized in that the step of using.
제 3 항에 있어서,The method of claim 3, wherein 상기 제2덧셈의 결과를 생성하는 단계는Generating the result of the second addition 상기 제2덧셈의 캐리를
Figure 112008010743748-pat00148
, 상기 제2덧셈의 섬을
Figure 112008010743748-pat00149
, 상기 Z에 대한 음의 수를
Figure 112008010743748-pat00150
, 상기 제1덧셈의 캐리 중 이전 자리의 캐리를
Figure 112008010743748-pat00151
라고 할 때, 하기 식 5
Carry the second addition
Figure 112008010743748-pat00148
, The island of the second addition
Figure 112008010743748-pat00149
, The negative number for Z
Figure 112008010743748-pat00150
, The carry of the previous position among the carry of the first addition
Figure 112008010743748-pat00151
When we say, expression 5
Figure 112008010743748-pat00184
(5)
Figure 112008010743748-pat00184
(5)
를 이용하는 단계인 것을 특징으로 하는 잉여 이진수의 덧셈 방법.The method of adding a redundant binary number, characterized in that the step of using.
승수를 Y, 피승수를 X, 모듈러 값을 M이라고 할때, 임의의 잉여 이진수 X, Y의 논리 게이트를 이용한 암호화 시스템의 곱셈 방법에 있어서, In the multiplication method of the encryption system using a logical gate of arbitrary redundant binary X, Y, when the multiplier is Y, the multiplicand is X, and the modular value is M, 상기 X의 최하위 비트부터 순서대로 바이너리 값으로 변환하는 단계;Converting a binary value in order from the least significant bit of X; 상기 변환된 X의 비트 값에 따라 상기 Y, 상기 M, 상기 Y와 M을 더한 값 또 는 0 중 어느 하나를 선택하는 단계;Selecting any one of the Y, the M, the Y plus M, or 0 according to the converted bit value of X; 상기 선택된 값과 상기 X에 대한 바이너리 값을 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하는 단계; 및Performing a first addition of the selected value and the binary value for the X to generate a result of the first addition consisting of a carry, which is a binary value, and an island, which is a negative number; And 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 X에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하는 단계를 포함하고,The second addition of the carry of the first addition, the second addition of the carry of the previous position, the island of the first addition and the negative number for the X is performed by the carry of the negative number and the island of binary values Generating a result, 상기 제2덧셈의 결과를 상기 X에 대한 바이너리 값 및 상기 X에 대한 음의 수에 적용하여 상기 과정을 반복 수행하는 것을 특징으로 하는 잉여 이진수의 곱셈 방법.And repeating the process by applying the result of the second addition to a binary value for the X and a negative number for the X. 임의의 잉여 이진수 X, Y, Z의 덧셈을 수행하는 암호화 시스템의 덧셈기에 있어서,In the adder of an encryption system that performs addition of arbitrary redundant binary numbers X, Y, Z, 상기 X에 대한 잉여 이진수와 상기 Y에 대한 바이너리 값을 더하는 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하는 제1덧셈 블럭; 및A first addition block configured to perform a first addition by adding a redundant binary number for the X and a binary value for the Y to generate a result of the first addition including a carry value which is a binary value and an island which is a negative number; And 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 Z에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하는 제2덧셈 블럭을 포함하는 잉여 이진수 덧셈기.The second addition of the carry of the first addition, the second addition of the carry of the first position, the island of the first addition and the negative number for the Z to perform a second addition consisting of a carry of a negative number and the island of a binary value A redundant binary adder that includes a second addition block that produces a result. 제 6 항에 있어서,The method of claim 6, 상기 X에 대한 잉여 이진수는The surplus binary number for X is i번째 비트가 부호 비트
Figure 112006088918970-pat00154
와 비트 값
Figure 112006088918970-pat00155
으로 구성되는 것을 특징으로 하는 잉여 이진수 덧셈기.
i bit is the sign bit
Figure 112006088918970-pat00154
And bit values
Figure 112006088918970-pat00155
Redundant binary adder, characterized in that consisting of.
제 7 항에 있어서,The method of claim 7, wherein 상기 제1덧셈 블럭은The first addition block is 상기 제1덧셈의 캐리를
Figure 112008010743748-pat00156
, 상기 제1덧셈의 섬을
Figure 112008010743748-pat00157
라고 할 때, 하기 식 4
The carry of the first addition
Figure 112008010743748-pat00156
, The island of the first addition
Figure 112008010743748-pat00157
When we say, expression 4
Figure 112008010743748-pat00185
(4)
Figure 112008010743748-pat00185
(4)
를 논리 게이트에 적용하는 것을 특징으로 하는 잉여 이진수 덧셈기.A redundant binary adder, characterized by applying to a logic gate.
제 8 항에 있어서,The method of claim 8, 상기 제2덧셈 블럭은The second addition block is 상기 제2덧셈의 캐리를
Figure 112008010743748-pat00159
, 상기 제2덧셈의 섬을
Figure 112008010743748-pat00160
, 상기 Z에 대한 음의 수를
Figure 112008010743748-pat00161
, 상기 제1덧셈의 캐리 중 이전 자리의 캐리를
Figure 112008010743748-pat00162
라고 할 때, 하기 식 5
Carry the second addition
Figure 112008010743748-pat00159
, The island of the second addition
Figure 112008010743748-pat00160
, The negative number for Z
Figure 112008010743748-pat00161
, The carry of the previous position among the carry of the first addition
Figure 112008010743748-pat00162
When we say, expression 5
Figure 112008010743748-pat00186
(5)
Figure 112008010743748-pat00186
(5)
를 논리 게이트에 적용하는 것을 특징으로 하는 잉여 이진수 덧셈기.A redundant binary adder, characterized by applying to a logic gate.
승수를 Y, 피승수를 X, 모듈러 값을 M이라고 할때, 임의의 잉여 이진수 X, Y의 곱셈을 수행하는 암호화 시스템의 곱셈기에 있어서, In the multiplier of an encryption system that performs multiplication of arbitrary redundant binary numbers X and Y when multiplier Y, multiplicand X, and modular value M, 상기 X의 최하위 비트부터 순서대로 바이너리 값으로 변환하는 배럴 레지스터 전가산기;A barrel register full adder for converting the binary value into a binary value in order from the least significant bit of the X; 상기 변환된 X의 비트 값에 따라 상기 Y, 상기 M, 상기 Y와 M을 더한 값 또는 0 중 어느 하나를 선택하는 멀티플렉서;A multiplexer for selecting any one of the Y, the M, the value of Y and M, or 0 according to the converted bit value of X; 상기 선택된 값과 상기 X에 대한 바이너리 값을 제1덧셈을 수행하여 바이너리 값인 캐리 및 음의 수인 섬으로 구성되는 상기 제1덧셈의 결과를 생성하고, 상기 제1덧셈의 캐리 중 이전 자리의 캐리, 상기 제1덧셈의 섬 및 상기 X에 대한 음의 수를 더하는 제2덧셈을 수행하여 음의 수인 캐리 및 바이너리 값인 섬으로 구성되는 상기 제2덧셈의 결과를 생성하며, 상기 배럴 레지스터 전가산기가 상기 X의 최상위 비트를 바이너리 값으로 변환할 때까지 상기 잉여 이진수 덧셈기가 상기 제1덧셈 및 상기 제2덧셈을 반복 수행하는 잉여 이진수 덧셈기; 및Performing a first addition on the selected value and the binary value for the X to generate a result of the first addition consisting of a carry, which is a binary value, and an island, which is a negative number, a carry of a previous position among the carry of the first addition, Performing a second addition that adds the island of first addition and a negative number for X to generate a result of the second addition consisting of a carry, which is a negative number, and an island, which is a binary value, wherein the full barrel register adder A redundant binary adder, wherein the redundant binary adder repeats the first and second additions until the most significant bit of X is converted into a binary value; And 상기 제1덧셈 및 상기 제2덧셈의 반복 수행 중에 상기 제2덧셈의 결과를 상기 X에 대한 바이너리 값 및 상기 X에 대한 음의 수에 적용하는 어큐뮬레이터를 포 함하는 잉여 이진수 곱셈기.A redundant binary multiplier including an accumulator that applies the result of the second addition to the binary value for X and the negative number for X during the iteration of the first and second additions.
KR1020060119654A 2006-11-30 2006-11-30 Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary KR100858559B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060119654A KR100858559B1 (en) 2006-11-30 2006-11-30 Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060119654A KR100858559B1 (en) 2006-11-30 2006-11-30 Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary

Publications (2)

Publication Number Publication Date
KR20080049266A KR20080049266A (en) 2008-06-04
KR100858559B1 true KR100858559B1 (en) 2008-09-16

Family

ID=39805071

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060119654A KR100858559B1 (en) 2006-11-30 2006-11-30 Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary

Country Status (1)

Country Link
KR (1) KR100858559B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101590322B1 (en) 2009-05-15 2016-02-19 삼성전자주식회사 Modular multiplier with reduced operating critical path and the method for reducing the operating critical path

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050102276A (en) * 2004-04-21 2005-10-26 매그나칩 반도체 유한회사 Adder

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050102276A (en) * 2004-04-21 2005-10-26 매그나칩 반도체 유한회사 Adder

Also Published As

Publication number Publication date
KR20080049266A (en) 2008-06-04

Similar Documents

Publication Publication Date Title
JP4870932B2 (en) Extended Montgomery Modular Multiplier Supporting Multiple Precision
US5289397A (en) High-speed modulo exponentiator device
CN115344237B (en) Data processing method combining Karatsuba and Montgomery modular multiplication
KR100591761B1 (en) Montgomery Modular Multiplication Method Using Montgomery Modular Multiplier and Carry Store Addition
US20040215686A1 (en) Montgomery modular multiplier and method thereof using carry save addition
CN113467750A (en) Large integer bit width division circuit and method for SRT algorithm with radix of 4
Gutub et al. Scalable VLSI architecture for GF (p) Montgomery modular inverse computation
US7046800B1 (en) Scalable methods and apparatus for Montgomery multiplication
US7412474B2 (en) Montgomery modular multiplier using a compressor and multiplication method
US7240204B1 (en) Scalable and unified multiplication methods and apparatus
Gutub et al. Efficient scalable VLSI architecture for Montgomery inversion in GF (p)
KR100508092B1 (en) Modular multiplication circuit with low power
Brumley et al. Conversion algorithms and implementations for Koblitz curve cryptography
Tenca et al. A design framework for scalable and unified multipliers in GF (p) and GF (2m)
KR20080050226A (en) Modular multiplication device and method for designing modular multiplication device
KR100858559B1 (en) Method for adding and multipying redundant binary and Apparatus for adding and multipying redundant binary
O'Rourke et al. Achieving NTRU with Montgomery multiplication
Sreedhar et al. A fast large-integer extended GCD algorithm and hardware design for verifiable delay functions and modular inversion
Piestrak Design of multi-residue generators using shared logic
KR100836737B1 (en) Apparatus and method for modular multiplication using chhinese remainder theorem and carry save adder
KR100946256B1 (en) Scalable Dual-Field Montgomery Multiplier On Dual Field Using Multi-Precision Carry Save Adder
Tawalbeh Radix-4 asic design of a scalable montgomery modular multiplier using encoding techniques
Kavyashree et al. Design and implementation of different architectures of montgomery modular multiplication
KR20040055523A (en) APPARATUS OF FIELD MULTIPLICATION OVER GF(p) AND GF(2^m)
KR20040045152A (en) Apparatus for modular multiplication

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120615

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20130621

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee