KR102006222B1 - Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem - Google Patents

Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem Download PDF

Info

Publication number
KR102006222B1
KR102006222B1 KR1020180001873A KR20180001873A KR102006222B1 KR 102006222 B1 KR102006222 B1 KR 102006222B1 KR 1020180001873 A KR1020180001873 A KR 1020180001873A KR 20180001873 A KR20180001873 A KR 20180001873A KR 102006222 B1 KR102006222 B1 KR 102006222B1
Authority
KR
South Korea
Prior art keywords
data
key
elliptic curve
finite
memory
Prior art date
Application number
KR1020180001873A
Other languages
Korean (ko)
Other versions
KR20190083891A (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 KR1020180001873A priority Critical patent/KR102006222B1/en
Publication of KR20190083891A publication Critical patent/KR20190083891A/en
Application granted granted Critical
Publication of KR102006222B1 publication Critical patent/KR102006222B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves

Abstract

본 발명은 타원곡선 암호와 RSA 공개키 암호를 통합 구현하기 위한 연산장치 및 방법에 관한 것으로, 타원곡선 암호의 스칼라 곱셈과 RSA(Rivest-Shamir-Adleman) 암호의 모듈로 멱승 연산을 선택적으로 수행하는 유한체 연산기와, 유한체 연산에 필요한 모듈로 값을 저장하는 제1메모리와, 타원곡선 암호와 RSA 암호에 사용되는 파라미터와 중간 결과값을 저장하는 제2메모리와, 상기 유한체 연산기, 제1메모리 및 제2메모리를 제어하는 제어부를 포함한다.The present invention relates to an arithmetic unit and method for integrally implementing an elliptic curve cryptosystem and an RSA public key cryptosystem, and more particularly, to an arithmetic apparatus and method for integrally implementing an elliptic curve cryptosystem and an RSA public key cryptosystem using scalar multiplication of elliptic curve cryptosystem and modular exponentiation operation of RSA (Rivest-Shamir-Adleman) A first memory for storing a modulo value necessary for a finite field operation; a second memory for storing parameters and intermediate result values used for elliptic curve cryptosystem and RSA cryptosystem; And a control unit for controlling the memory and the second memory.

Description

타원곡선 암호와 RSA 공개키 암호를 통합 구현하기 위한 연산장치 및 방법{Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem}Technical Field [0001] The present invention relates to a computing device and a method for integrally implementing an elliptic curve cryptosystem and an RSA public key cryptosystem, and an RSA public-key cryptosystem,

본 발명은 타원곡선 암호와 RSA 공개키 암호를 통합 구현하기 위한 연산장치 및 방법에 관한 것으로, 더 상세하게는 타원곡선 암호와 RSA 공개키 암호를 단일 하드웨어에 통합 구현하기 위한 연산장치 및 방법에 관한 것이다.The present invention relates to a computing device and method for integrally implementing an elliptic curve cryptosystem and an RSA public key cryptosystem, and more particularly, to a computing apparatus and a method for integrating elliptic curve cryptosystem and RSA public key cryptography into a single hardware system. will be.

최근, 사물인터넷(IoT) 장치의 보급이 급속하게 확산되는 추세이며, 2025년까지 약 300억대 이상의 사물인터넷 장치가 사용될 것으로 추정된다. 그러나 약 70% 이상의 사물인터넷 장치가 암호화 없이 네트워크에 연결되고 있는 것으로 알려지고 있다. In recent years, the diffusion of Internet (IoT) devices is rapidly spreading, and it is estimated that more than 30 billion objects Internet devices will be used by 2025. However, more than 70% of Internet devices are known to be connected to the network without encryption.

사물인터넷 장치는 보안에 취약하여 사이버 공격의 대상이 될 뿐만 아니라 공격의 수단으로도 사용될 수 있기 때문에 인증(Authentication), 기밀성(Confidentiality), 그리고 무결성(Integrity) 검증 등의 다양한 보안 강화가 필요하다.Objects Internet devices are vulnerable to security and can be used as a means of attack as well as being subject to cyber attacks. Therefore, various security enhancements such as authentication, confidentiality, and integrity verification are required.

전자서명 알고리듬(Digital Signature Algorithm), RSA 서명 그리고 타원곡선 전자서명 알고리듬(Elliptic Curve Digital Signature Algorithm) 등이 대표적으로 사용되고 있다.  Digital Signature Algorithm, RSA Signature, and Elliptic Curve Digital Signature Algorithm.

DSA는 미국 국립표준기술연구소(NIST)에서 제정한 FIPS 186에 명시되어 있으며, 1,024~15,360-비트의 키 길이를 가지며 메시지 다이제스트 함수인 SHA-256/384/512 등을 이용하여 구성된다. RSA 서명은 ANSI X9.31 또는 PKCS#1 v1.5 이상의 문서에 명시되어 있으며 키 길이는 1,024-비트부터 256-비트씩 증가한다. ECDSA는 FIPS 186인 DSA를 타원 곡선에 적용한 것으로 ANSI X9.62로 표준화되어 있으며 국제적으로 가장 널리 사용되고 있다. 국내에서도 기존의 전자 서명 표준인 KCDSA의 타원 곡선 변형을 EC-KCDSA라는 이름으로 2006년 TTA 표준으로 제정한 바 있다. 또한, NIST에서 제정한 FIPS 186-2에서는 X9.62 표준을 그대로 따르며 최소 160-비트 이상의 키 길이를 가진다.The DSA is specified in FIPS 186 by the National Institute of Standards and Technology (NIST) and has a key length of 1,024 to 15,360 bits and is constructed using the message digest function SHA-256/384/512. RSA signatures are specified in ANSI X9.31 or PKCS # 1 v1.5 or later documents and the key length increases from 1,024-bits to 256-bits. ECDSA is a FIPS 186 DSA applied to an elliptic curve that is standardized in ANSI X9.62 and is the most widely used internationally. In Korea, the elliptic curve transformation of KCDSA, the existing electronic signature standard, was enacted as the TTA standard in 2006 under the name of EC-KCDSA. In addition, FIPS 186-2, established by NIST, follows the X9.62 standard and has a key length of at least 160 bits.

종래에는 등록특허 10-1707334호(효율적인 타원곡선 암호화 연산 장치 및 그 방법, 2017년 2월 9일 등록)와 같이 타원곡선 암호화를 위한 연산장치와 공개특허 10-2008-0035004호(회로 구조체, 마이크로컨트롤러, 데이터 처리 장치, 암호화 계산 수행 방법 및 프로그램을 구비하는 컴퓨터 판독가능한 매체)와 같이 RSA 서명의 연산을 위한 장치가 개별적으로 존재하였으며, 타원곡선 암호와 RSA 서명을 처리하기 위해서는 개별적인 하드웨어의 구성에 의해 시스템이 복잡하고, 비효율적이며, 비용이 많이 소요되는 문제점이 있었다.Conventionally, an arithmetic unit for encrypting an elliptic curve, such as a registered patent 10-1707334 (an efficient elliptic curve cryptographic computation unit and its method, registered on Feb. 9, 2017) A computer-readable medium having a program, a controller, a data processing device, a method of performing cryptographic computation, and a program). In order to process the elliptic curve cryptosystem and RSA signature, The system is complicated, inefficient, and expensive.

본 발명이 해결하고자 하는 기술적 과제는, 하나의 하드웨어를 이용하여 타원곡선 암호와 RSA 암호를 동시에 처리할 수 있는 연산장치 및 방법을 제공함에 있다.SUMMARY OF THE INVENTION It is an object of the present invention to provide an apparatus and method for simultaneously processing an elliptic curve cipher and an RSA cipher using one hardware.

본 발명의 일측면에 따른 연산장치는, 타원곡선 암호와 RSA 공개키 암호를 통합 구현하기 위한 연산장치 및 방법에 관한 것으로, 타원곡선 암호의 스칼라 곱셈과 RSA(Rivest-Shamir-Adleman) 암호의 모듈로 멱승 연산을 선택적으로 수행하는 유한체 연산기와, 유한체 연산에 필요한 모듈로 값을 저장하는 제1메모리와, 타원곡선 암호와 RSA 암호에 사용되는 파라미터와 중간 결과값을 저장하는 제2메모리와, 상기 유한체 연산기, 제1메모리 및 제2메모리를 제어하는 제어부를 포함한다.A computing device according to an aspect of the present invention relates to a computing device and method for integrally implementing an elliptic curve cryptosystem and an RSA public key cryptosystem, and more particularly, to a computing apparatus and a method for integrating an elliptic curve cryptosystem and a RSA (Rivest-Shamir-Adleman) A first memory for storing a modulo value required for a finite field operation; a second memory for storing parameters used for elliptic curve cryptosystem and RSA cryptosystem and an intermediate result value; And a control unit for controlling the finite field arithmetic unit, the first memory, and the second memory.

본 발명의 다른 측면에 따른 연산방법은, a) 초기단계에서 데이터를 입력받는 데이터 입력단계와, b) 입력된 데이터를 연산에 적합한 데이터로 매핑하는 단계와, c) 제어부의 제어에 따라 입력된 데이터의 모듈로 멱승 연산을 수행하여 RSA(Rivest-Shamir-Adleman) 암호를 처리하는 RSA 암호 처리단계와, d) 상기 c) 단계를 수행하거나 제어부의 제어에 따라 입력된 데이터의 스칼라 곱셈을 수행하여 타원곡선 암호를 처리하는 타원곡선 암호 처리단계와, e) 상기 c) 또는 d) 단계의 데이터를 출력하는 데이터 출력단계를 포함한다.According to another aspect of the present invention, there is provided an operation method comprising the steps of: a) inputting data at an initial stage; b) mapping the input data to data suitable for operation; c) An RSA encryption processing step of processing a Rivest-Shamir-Adleman (RSA) cipher by performing a modular exponentiation operation on data, and d) performing a scalar multiplication of data input according to the control of the controller or performing the c) An elliptic curve cryptographic processing step of processing the elliptic curve cryptosystem, and e) a data output step of outputting the data of step c) or d).

본 발명은 통합 유한체 연산기와 메모리를 이용하여 타원곡선 암호와 RSA 암호를 단일 하드웨어로 처리할 수 있도록 함으로써, 타원곡선 암호와 RSA 암호를 독립적인 하드웨어로 처리하는 종래의 방법에 비하여 하드웨어 복잡도를 대폭 감소시키고, 비용을 절감할 수 있는 효과가 있다.The present invention is capable of processing elliptic curve cryptosystem and RSA cryptosystem with a single hardware by using an integrated finite field arithmetic unit and a memory, thereby making hardware complexity wider than the conventional method of processing elliptic curve cryptosystem and RSA cryptosystem by independent hardware And the cost can be reduced.

도 1은 본 발명의 바람직한 실시예에 따른 연산장치의 블록 구성도이다.
도 2는 유한체 연산기의 구체적인 블록 구성도이다.
도 3은 유한체 워드기반 몽고메리 곱셈기의 상세 회로도이다.
도 4는 유한체 워드기반 몽고메리 곱셈기의 동작 알고리듬이다.
도 5는 유한체 감산 및 가산기의 상세 회로도이다.
도 6은 유한체 감산 및 가산기의 동작 알고리듬이다.
도 7은 본 발명의 바람직한 실시예에 따른 연산방법의 흐름도이다.
도 8은 매핑과 리매핑의 예시도이다.
도 9는 RSA 암호 처리단계의 흐름도이다.
도 10은 RSA 암호 처리단계의 알고리듬이다.
도 11은 타원곡선 암호 처리단계의 흐름도이다.
도 12는 타원곡선 암호 처리단계의 알고리듬이다.
도 13은 점 덧셈 연산(Addition)과 점 두 배 덧셈 연산(Doubling)의 흐름도이다.
1 is a block diagram of a computing device according to a preferred embodiment of the present invention.
2 is a detailed block diagram of the finite field arithmetic unit.
3 is a detailed circuit diagram of a finite-word-based Montgomery multiplier.
4 is an operation algorithm of a Montgomery multiplier based on a finite field word.
5 is a detailed circuit diagram of a finite subtractor and adder.
6 is an operation algorithm of a finite field subtractor and adder.
7 is a flowchart of a calculation method according to a preferred embodiment of the present invention.
Figure 8 is an illustration of mapping and remapping.
9 is a flowchart of the RSA encryption processing step.
10 is an algorithm of the RSA encryption processing step.
11 is a flowchart of the elliptic curve encryption processing step.
12 is an algorithm of the elliptic curve encryption processing step.
13 is a flowchart of a point addition operation and a point double addition operation (Doubling).

이하, 본 발명 타원곡선 암호와 RSA 공개키 암호를 통합 구현하기 위한 연산장치 및 방법에 대하여 첨부한 도면을 참조하여 상세히 설명한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a computing apparatus and a method for integrally implementing an elliptic curve cryptosystem and an RSA public key cryptosystem according to the present invention will be described in detail with reference to the accompanying drawings.

본 발명의 실시 예들은 당해 기술 분야에서 통상의 지식을 가진 자에게 본 발명을 더욱 완전하게 설명하기 위해 제공되는 것이며, 아래에 설명되는 실시 예들은 여러 가지 다른 형태로 변형될 수 있으며, 본 발명의 범위가 아래의 실시 예들로 한정되는 것은 아니다. 오히려, 이들 실시 예는 본 발명을 더욱 충실하고 완전하게 하며 당업자에게 본 발명의 사상을 완전하게 전달하기 위하여 제공되는 것이다.The embodiments of the present invention are provided to explain the present invention more fully to those skilled in the art, and the embodiments described below can be modified into various other forms, The scope of the present invention is not limited to the following embodiments. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art.

본 명세서에서 사용된 용어는 특정 실시 예를 설명하기 위하여 사용되며, 본 발명을 제한하기 위한 것이 아니다. 본 명세서에서 사용된 바와 같이 단수 형태는 문맥상 다른 경우를 분명히 지적하는 것이 아니라면, 복수의 형태를 포함할 수 있다. 또한, 본 명세서에서 사용되는 경우 "포함한다(comprise)" 및/또는"포함하는(comprising)"은 언급한 형상들, 숫자, 단계, 동작, 부재, 요소 및/또는 이들 그룹의 존재를 특정하는 것이며, 하나 이상의 다른 형상, 숫자, 동작, 부재, 요소 및/또는 그룹들의 존재 또는 부가를 배제하는 것이 아니다. 본 명세서에서 사용된 바와 같이, 용어 "및/또는"은 해당 열거된 항목 중 어느 하나 및 하나 이상의 모든 조합을 포함한다. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a", "an," and "the" include plural forms unless the context clearly dictates otherwise. Also, " comprise "and / or" comprising "when used herein should be interpreted as specifying the presence of stated shapes, numbers, steps, operations, elements, elements, and / And does not exclude the presence or addition of one or more other features, integers, operations, elements, elements, and / or groups. As used herein, the term "and / or" includes any and all combinations of one or more of the listed items.

본 명세서에서 제1, 제2 등의 용어가 다양한 부재, 영역 및/또는 부위들을 설명하기 위하여 사용되지만, 이들 부재, 부품, 영역, 층들 및/또는 부위들은 이들 용어에 의해 한정되지 않음은 자명하다. 이들 용어는 특정 순서나 상하, 또는 우열을 의미하지 않으며, 하나의 부재, 영역 또는 부위를 다른 부재, 영역 또는 부위와 구별하기 위하여만 사용된다. 따라서, 이하 상술할 제1 부재, 영역 또는 부위는 본 발명의 가르침으로부터 벗어나지 않고서도 제2 부재, 영역 또는 부위를 지칭할 수 있다.Although the terms first, second, etc. are used herein to describe various elements, regions and / or regions, it is to be understood that these elements, parts, regions, layers and / . These terms do not imply any particular order, top, bottom, or top row, and are used only to distinguish one member, region, or region from another member, region, or region. Thus, the first member, region or region described below may refer to a second member, region or region without departing from the teachings of the present invention.

이하, 본 발명의 실시 예들은 본 발명의 실시 예들을 개략적으로 도시하는 도면들을 참조하여 설명한다. 도면들에 있어서, 예를 들면, 제조 기술 및/또는 공차에 따라, 도시된 형상의 변형들이 예상될 수 있다. 따라서, 본 발명의 실시 예는 본 명세서에 도시된 영역의 특정 형상에 제한된 것으로 해석되어서는 아니 되며, 예를 들면 제조상 초래되는 형상의 변화를 포함하여야 한다.Hereinafter, embodiments of the present invention will be described with reference to the drawings schematically showing embodiments of the present invention. In the figures, for example, variations in the shape shown may be expected, depending on manufacturing techniques and / or tolerances. Accordingly, embodiments of the present invention should not be construed as limited to any particular shape of the regions illustrated herein, including, for example, variations in shape resulting from manufacturing.

도 1은 본 발명의 바람직한 실시예에 따른 타원곡선 암호와 RSA 공개키 암호를 통합 구현하기 위한 연산장치의 블록 구성도이다.1 is a block diagram of a computing device for integrally implementing an elliptic curve cryptosystem and an RSA public key cryptosystem according to a preferred embodiment of the present invention.

도 1을 참조하면 본 발명의 바람직한 실시예에 따른 연산장치는, 32비트 데이터 처리량을 가지는 유한체 연산기(100)와, 유한체 연산에 필요한 모듈로 값을 저장하는 제1메모리(300)와, 타원곡선 암호와 RSA 암호에 사용되는 파라미터와 중간결과 값을 저장하는 제2메모리(400)와, 상기 유한체 연산기(100), 제1메모리(300) 및 제2메모리(400)를 제어하는 제어부(200)를 포함하여 구성된다.1, a computing apparatus according to an exemplary embodiment of the present invention includes a finite-field arithmetic unit 100 having a 32-bit data throughput, a first memory 300 for storing a modulo value required for finite field computation, A second memory 400 for storing parameters and intermediate result values used in the elliptic curve cryptosystem and the RSA cryptosystem and a controller 400 for controlling the finite field arithmetic operator 100, the first memory 300 and the second memory 400, (200).

상기 유한체 연산기(100)는, 유한체 감산 및 가산기(110), 유한체 워드기반 몽고메리 곱셈기(120) 및 내부메모리(130)를 포함한다.The finite field operator 100 includes a finite field subtracter and adder 110, a finite field word based Montgomery multiplier 120, and an internal memory 130.

이하, 상기와 같이 구성되는 본 발명의 바람직한 실시예에 따른 연산장치의 구성과 작용에 대하여 더 상세히 설명한다.Hereinafter, the configuration and operation of the computing device according to the preferred embodiment of the present invention will be described in detail.

먼저, 유한체 연산기(100)는 타원곡선 암호와 RSA 암호를 처리할 수 있는 것으로, 32-비트 데이터 처리량을 갖는 연산기이다. 유한체 연산기(100)는 32의 배수가 되는 데이터들의 연산이 가능하기 때문에 타원곡선 암호와 RSA 암호의 키 길이에 변화가 있는 경우에도 32의 배수 관계에 있는 길이의 키라면 모두 처리가 가능하게 된다.First, the finite field operator 100 is capable of processing elliptic curve cryptosystem and RSA cryptosystem, and is an operator having a 32-bit data throughput. The finite field operator 100 can process data of a multiple of 32, so that even if there is a change in the key length of the elliptic curve cryptosystem and the RSA cryptosystem, all the keys having a length of a multiple of 32 can be processed .

도 2는 유한체 연산기(100)의 구체적인 블록 구성도이다.2 is a specific block diagram of the finite field arithmetic unit 100. As shown in FIG.

도 2를 참조하면 구체적으로 유한체 연산기(100)는, 제1데이터와 제2데이터 및 제3데이터를 입력받아 곱셈연산을 수행하여 연산데이터와 내부메모리(130)를 제어하는 제어신호를 출력하는 유한체 워드기반 몽고메리 곱셈기(120)와, 상기 제1데이터, 제2데이터 및 제3데이터를 입력받아 감산 또는 가산을 수행하여 연산데이터와 내부메모리(130)를 제어하는 제어신호를 출력하는 유한체 감산 및 가산기(110)와, 상기 유한체 워드기반 몽고메리 곱셈기(120) 또는 유한체 감산 및 가산기(110)의 연산데이터 및 제어신호를 선택적으로 출력하는 제1선택부(140)와, 상기 제1선택부(140)를 통해 선택된 제어신호에 따라 연산데이터를 저장하고, 저장된 제4데이터 또는 제5데이터를 상기 유한체 워드기반 몽고메리 곱셈기(120)로 출력하는 내부메모리(130)와, 상기 내부메모리(130)의 제4데이터 또는 제5데이터를 선택하여 출력하는 제2선택부(150)를 포함하여 구성된다.2, the finite field operator 100 receives the first data, the second data, and the third data and performs a multiplication operation to output operation data and a control signal for controlling the internal memory 130 A finite field word-based Montgomery multiplier 120, a finite field multiplier 120 for receiving the first data, the second data, and the third data and performing subtraction or addition to output a control signal for controlling the calculation data and the internal memory 130 A first selector 140 for selectively outputting operation data and control signals of the finite-word-based Montgomery multiplier 120 or the finite field subtractor and adder 110, An internal memory 130 for storing operation data according to the selected control signal through the selection unit 140 and outputting the stored fourth data or the fifth data to the finite word based Montgomery multiplier 120, (130 And a second selector 150 for selecting and outputting the fourth data or the fifth data.

위에서는 유한체 연산기(100)를 32비트 데이터 처리량의 연산기로 설명하였으나, 필요에 따라 2의 자승 관계, 즉 4, 8, 16, 32... 등의 데이터 처리량을 갖는 연산기를 설계하여 보다 유연하게 데이터를 처리할 수 있다. In the above description, the finite field operator 100 has been described as a 32-bit data throughput operator, but it is possible to design an operator having a data throughput such as 4, 8, 16, 32, The data can be processed.

상기 유한체 감산 및 가산기(110)는, 정수 상의 연산 결과 값과 모듈러 연산이 수행된 결과 값을 동시에 출력할 수 있으며, 내부메모리(130)는 중간 주소를 기점으로 하위 주소에는 정수 상의 연산 결과 값을 저장하고, 상위 주소에는 모듈러 연산이 수행된 결과 값을 저장하도록 구성할 수 있다.The finite field subtractor and adder 110 may simultaneously output the operation result value on the integer and the result value on which the modular operation is performed. The internal memory 130 may store the operation result value And stores the result of the modular operation in the upper address.

곱셈 연산의 경우, 내부메모리(130)의 하위 메모리 주소에 데이터를 저장한다. In the multiplication operation, data is stored in the lower memory address of the internal memory 130.

도 3에 도시한 바와 같이 상기 유한체 워드기반 몽고메리 곱셈기(120)는, 32-비트 곱셈기(121)와 제1가산기(122), 그리고 33-비트 제2가산기(123)를 포함하며, 곱셈 연산이 시작될 때 32-비트의 제1레지스터(R1)와 제2레지스터(R2)는 0으로 초기화되고 1-비트의 제3 내지 제5레지스터(R3,R4,R5)와 2-비트의 제6레지스터(R6)도 함께 0으로 초기화된다.3, the finite-word-based Montgomery multiplier 120 includes a 32-bit multiplier 121, a first adder 122, and a 33-bit second adder 123, The first register R1 and the second register R2 of the 32-bit are initialized to 0 and the third to fifth registers R3, R4 and R5 of the 1-bit and the sixth register (R6) are also initialized to zero.

첫 번째 클록 사이클에서 상기 곱셈기(121)는 제1선택기(M1)에서 선택 입력된 내부메모리(130)에 저장되었던 제2데이터와 제2선택기(M2)에서 선택 입력된 내부메모리(130)의 제3데이터를 곱하는 동작을 한다.In the first clock cycle, the multiplier 121 multiplies the second data stored in the internal memory 130 selected by the first selector M1 and the second data stored in the internal memory 130 selected by the second selector M2 3 data.

도 4는 상기 유한체 워드기반 몽고메리 곱셈기(120)의 동작 알고리듬이다.4 is an operation algorithm of the finite-word-based Montgomery multiplier 120. FIG.

도 4를 참조하면, 상기 유한체 워드기반 몽고메리 곱셈기(120)는, 유한체 상의 워드기반 몽고메리 곱셈기 알고리듬의 j가 0일 때, 동일한 연산인 라인 8~13과 라인 4~5를 한 사이클에 계산하여 32-비트 결과 데이터로 H값을 출력한다.Referring to FIG. 4, the finite-word-based Montgomery multiplier 120 calculates the same operation of the lines 8 to 13 and the lines 4 to 5 in one cycle when j of the word-based Montgomery multiplier algorithm on the finite field is 0 And outputs H value as 32-bit result data.

다음 클록 사이클에서는 내부메모리(130)에 저장된 M이 제4데이터로서 단자를 통해 입력되고, H x N'연산을 수행하여 하위 32-비트 데이터 qi를 출력하며, 상기 제1가산기(122)와 제2가산기(123)를 통과하지 않고 곱셈기(121)에서 바로 연산을 완료하여 결과 데이터로 출력되어 내부메모리(130)에 저장된다. In the next clock cycle, M stored in the internal memory 130 is input through the terminal as fourth data, and H x N 'operation is performed to output the lower 32-bit data q i , and the first adder 122 The multiplier 121 completes the calculation immediately without passing through the second adder 123 and is output as result data and stored in the internal memory 130. [

이후 내부메모리(130)에 저장된 qi가 제3데이터로서 단자를 통해 입력되고, 모듈로 P가 제1데이터로서 입력된다. Then, q i stored in the internal memory 130 is input as third data through the terminal, and the modulo P is input as the first data.

그리고 제5데이터로 H 값이 입력되어 라인 15~17의 연산을 수행한다. 알고리듬의 라인 10~11은 j=w-1인 경우의 연산이며, (S_msb, S|w-1|)의 값이 32-비트 또는 33-비트가 될 수 있으며, 이때 발생한 캐리값 cy2는 경우에 따라서 2-비트 데이터가 될 수 있다. Then, the H value is input as the fifth data, and the arithmetic operations of the lines 15 to 17 are performed. The values of (S_msb, S | w-1 |) may be 32-bit or 33-bit, and the carry value cy2 generated at this time is Bit data according to the following equation.

이러한 이유로 라인 19의 연산 결과값은 0≤(S_msb, S|w-1|)<2p와 같은 범위에 포함될 수 있으며, 모듈로 P보다 큰 경우 라인 21과 같이 뺄셈 연산을 수행해야 하지만 덧셈 연산기를 이용하여 모듈러 연산을 수행함으로써 추가적인 비교기나 뺄셈기를 사용하지 않고 곱셈 연산을 완료할 수 있다.For this reason, the operation result value of line 19 may be included in a range such as 0? (S_msb, S | w-1 |) <2p. If the modulo P is larger than P, subtraction operation must be performed as in line 21. However, The multiplication operation can be completed without using any additional comparator or subtractor.

도 5에 도시한 바와 같이 유한체 감산 및 가산기(110)는, 32-비트의 제3가산기(111) 및 제4가산기(112)와, 1-비트의 제8레지스터(R8) 및 제9레지스터(R9)와, 인버터들(I1,I2,I3)과, 제10 내지 제13선택기(M10~M13)를 포함하여 구성되어, 유한체 상의 덧셈 연산 또는 뺄셈 연산을 수행할 수 있다.As shown in FIG. 5, the finite subtractor and adder 110 includes a 32-bit third adder 111 and a fourth adder 112, a 1-bit eighth register R8, An adder R9, inverters I1, I2, and I3, and tenth through thirteenth selectors M10 through M13 to perform an add operation or a subtract operation on a finite field.

모듈러 연산을 위하여 비교기를 사용하지 않고 구성이 단순한 선택기들을 사용하여 구성을 단순화할 수 있다.The configuration can be simplified by using simple selectors without using a comparator for modular operation.

유한체 상의 덧셈 연산을 수행하는 경우, 1의 값을 갖는 감가산 선택신호의 반전 값 0이 제3가산기(111)의 캐리값으로 입력된다. 입력된 캐리값과 함께 두 피연산자 제2데이터와 제3데이터를 더하여 32-비트 결과 데이터로 출력하며, 이때 생성된 1-비트 캐리값은 제8레지스터(R8)에 저장됨과 아울러 제2캐리값으로 출력된다.In the case of performing an addition operation on a finite field, an inverted value 0 of a decremental selection signal having a value of 1 is input as a carry value of the third adder 111. [ Bit carry data is stored in the eighth register R8, and the second carry data is stored in the eighth register R8, and the second carry data is stored in the eighth register R8. .

상기 제4가산기(112)는 제1데이터로부터 입력되는 모듈로 P의 1의 보수값과 상기 제3가산기(111)의 출력값을 가산하며, 이때 제4가산기(112)에 입력되는 캐리값은 감가산 선택신호인 1의 값이 입력된다. 즉, 32-비트씩 입력되는 워드 데이터를 이용하여 제3가산기(111)는 제2데이터와 제3데이터의 합과 같은 덧셈 연산을 수행하고, 제4가산기는 제2데이터와 제3데이터의 합에서 제1데이터를 감하는 연산을 통해 모듈러 연산이 수행된 결과값을 출력한다. The fourth adder 112 adds the 1's complement value of the modulo P input from the first data to the output value of the third adder 111. At this time, the carry value input to the fourth adder 112 is a value A value of 1, which is an acid selection signal, is input. That is, the third adder 111 performs addition operations such as the sum of the second data and the third data using the 32-bit input word data, and the fourth adder adds the sum of the second data and the third data And outputs the result of performing the modular operation through the operation of subtracting the first data from the first data.

반대로 상기 유한체 감산 및 가산기(110)를 이용하여, 유한체 상의 뺄셈 연산을 수행하는 경우, 제3가산기(111)는 제2데이터에서 제3데이터를 감산하는 연산을 수행하고, 제4가산기(112)는 제2데이터와 제3데이터의 차에 제1데이터를 가산하는 모듈러 연산을 수행한다. 출력 데이터 제2캐리와 제3캐리는 선택신호(SEL)로 사용될 수 있다.On the other hand, when the finite field subtraction operation is performed using the finite field subtracter and adder 110, the third adder 111 performs an operation of subtracting the third data from the second data, 112 performs a modular operation of adding the first data to the difference between the second data and the third data. The output data second carry and third carry can be used as the selection signal SEL.

도 6은 유한체 감산 및 가산기(110)의 동작 알고리듬이다.6 is an operation algorithm of the finite field subtractor and adder 110. FIG.

도 6을 참조하면, 유한체 감산 및 가산기(110)를 이용하여 뺄셈 연산을 수행하는 경우, 제3가산기(111)는 제2데이터에서 제3데이터를 감산하는 연산을 수행하고, 제4가산기(112)는 제2데이터와 제3데이터의 차에 제1데이터를 가산하는 모듈러 연산을 수행한다. 출력 데이터와, 제2캐리와 제3캐리는 도 6의 라인 14와 같이 선택신호(SEL)로 사용되며, 최종 출력값은 아래의 표 1과 같이 비교기를 사용하지 않고 선택신호에 따라 결정된다.6, when a subtraction operation is performed using the finite subtractor and the adder 110, the third adder 111 performs an operation of subtracting the third data from the second data, and the fourth adder 112 performs a modular operation of adding the first data to the difference between the second data and the third data. The output data, the second carry and the third carry are used as the selection signal SEL as shown by line 14 in FIG. 6, and the final output value is determined according to the selection signal without using the comparator as shown in Table 1 below.

Figure 112018001756440-pat00001
Figure 112018001756440-pat00001

도 7은 본 발명의 바람직한 실시예에 따른 연산방법의 흐름도이다.7 is a flowchart of a calculation method according to a preferred embodiment of the present invention.

도 7에 도시한 바와 같이 본 발명은 초기화 단계(S10), 데이터 입력단계(S20), 매핑단계(S30), RSA 암호 처리단계(S40) 또는 타원곡선 암호 처리단계(S50), 데이터 출력단계(S60)를 포함한다.7, the present invention includes an initialization step S10, a data input step S20, a mapping step S30, an RSA encryption processing step S40 or an elliptic curve encryption processing step S50, S60).

초기화 단계(S10)는 앞서 설명한 바와 같이 각 레지스터들에 0을 입력하는 것을 말하며, 데이터 입력단계(S20)에서 데이터가 입력되면, 매핑단계(S30)에서 매핑을 수행한다.In the initialization step S10, 0 is input to each register as described above. When data is inputted in the data input step S20, mapping is performed in the mapping step S30.

매핑은 유한체 워드기반 몽고메리 곱셈기(120)를 사용하기 위해 입력된 데이터의 전처리를 수행하는 과정이다. 상기 유한체 워드기반 몽고메리 곱셈기(120)에서 곱해지는 데이터를 A, B라 하고 모듈로 값을 N, 데이터 A, B의 길이를 R이라고 할 때, 유한체 워드기반 몽고메리 곱셈기(120)의 결과값은 R-1이 포함된 Z=A*B*R-1mod N이 된다. The mapping is a process of performing preprocessing of the input data to use the finite-word-based Montgomery multiplier 120. When the data multiplied by the finite-word-based Montgomery multiplier 120 is A and B, the modulo value is N, and the length of the data A and B is R, the result of the finite-word-based Montgomery multiplier 120 Becomes Z = A * B * R- 1 mod N including R- 1 .

따라서, 도 8에 도시한 바와 같이 곱해질 데이터에 전처리 과정으로 R2을 미리 곱하는 과정을 거친다. Therefore, as shown in FIG. 8, the data to be multiplied is pre-multiplied by R 2 before preprocessing.

도 8을 참조하면 데이터 A의 매핑은 MM(A,R2) = A X R2 X R-1 = AR mod N이고, 이와 유사하게 데이터 B의 매핑은 BR mod N으로 표기할 수 있다.Referring to FIG. 8, the mapping of data A is MM (A, R 2 ) = AXR 2 XR -1 = AR mod N, and similarly the mapping of data B may be denoted by BR mod N.

상기 유한체 워드기반 몽고메리 곱셈기(120)에서 처리되는 AR과 BR의 곱은 ABR mod N으로 나타낼 수 있으며, ABR mod N의 리매핑은 MM(ABR,1) = ABR X 1 X R-1 = AB mod N으로 표기할 수 있다.The product of AR and BR processed in the finite word-based Montgomery multiplier 120 can be expressed as ABR mod N, and the remapping of ABR mod N can be expressed as MM (ABR, 1) = ABR X 1 XR -1 = AB mod N Can be indicated.

그 다음, S40단계와 S50단계는 상기 제어부(200)에 의해 선택적으로 수행되는 것이며, 먼저 제어부(200)에 의해 RSA 암호 처리단계(S40)가 수행되는 경우에 대하여 설명한다.Next, steps S40 and S50 are selectively performed by the control unit 200, and a case where the RSA encryption processing step S40 is performed by the control unit 200 will be described first.

도 9는 RSA 암호 처리단계(S40)의 상세 순서도이고, 도 10은 도 9에서 키 스캔 단계, 자승 처리단계, 곱셈 처리단계의 알고리듬이다. FIG. 9 is a detailed flowchart of the RSA encryption processing step (S40), and FIG. 10 is an algorithm of the key scanning step, the square processing step, and the multiplication processing step in FIG.

도 9와 도 10을 각각 참조하면 RSA 암호 처리단계(S40)는, 초기단계(S41), 키 스캔 단계(S42), 상기 키 스캔 단계의 처리 결과값을 자승처리하는 자승처리단계(S43)와, 상기 키 스캔 단계의 처리 결과값이 1인 경우 곱셈 연산을 수행하는 곱셈 처리단계(S44)와, 상기 매핑 단계에서 추가한 R을 제거하기 위한 리매핑 단계(S45)를 포함한다.Referring to FIGS. 9 and 10, the RSA encryption processing step S40 includes an initial step S41, a key scanning step S42, a square processing step S43 for square-sum processing result values of the key scanning step, A multiplication processing step S44 for performing a multiplication operation when the processing result of the key scanning step is 1, and a remapping step S45 for removing R added in the mapping step.

상기 초기단계(S41)를 거친 후, RSA 암호의 모듈러 멱승 연산을 위한 키 스캔 단계(S42)가 수행된다. After the initial step S41, a key scanning step S42 for modular exponentiation of the RSA cryptosystem is performed.

상기 키 스캔 단계(S42), 자승 처리 단계(S43), 곱셈처리 단계(S44)는 도 10의 알고리듬을 따라 수행된다.The key scanning step S42, the square processing step S43, and the multiplication processing step S44 are performed according to the algorithm of FIG.

도 10에서 T는 1이 매핑된 상태가 입력되고, M은 메시지가 매핑된 상태로 입력되어 모듈러 멱승 연산이 수행된다.In FIG. 10, T is mapped to 1 and M is mapped to perform a modular exponentiation operation.

모듈러 멱승 연산은 키를 최상위 비트부터 스캔(라인 1)하여 한번 스캔할 때마다 제곱연산(라인 2)을 하고 스캔한 데이터가 1일 때(라인 3) 추가로 곱셈연산(라인 4)을 수행한다. The modular exponentiation operation performs a squaring operation (line 2) every scan once and a multiply operation (line 4) when the scanned data is 1 (line 3) by scanning the key from the most significant bit (line 1) .

이때 라인 2의 제곱연산은 상기 자승처리단계(S43)에서 수행되며, 라인 4의 곱셈연산은 곱셈 처리단계(S44)에서 수행된다.At this time, the squaring operation of line 2 is performed in the square processing step S43, and the multiplication operation of line 4 is performed in the multiplication processing step S44.

모든 연산이 끝나면 결과값에서 R을 제거하기 위하여 리매핑 단계(S45)를 거치며, 리매핑은 도 8에서 알 수 있듯이 최종 결과 값과 1을 곱하는 과정이다. After all operations are completed, a remapping step (S45) is performed to remove R from the resultant value, and the remapping is a step of multiplying the final result value by 1 as shown in FIG.

리매핑이 끝나면 모든 RSA 암호 연산이 끝났으므로 도 7의 데이터 출력단계(S60)를 수행하여, 연산된 결과를 출력한다. After the completion of the remapping, since all RSA cryptographic operations have been completed, the data output step (S60) of FIG. 7 is performed and the computed result is output.

위의 설명은 S40단계인 RSA 암호 처리단계를 수행한 결과이며, 제어부(200)의 선택으로 S50단계의 타원곡선 암호 처리단계를 수행할 수 있다.The above description is the result of performing the RSA encryption processing step of step S40, and the controller 200 may perform the elliptic curve encryption processing step of step S50.

도 11은 타원곡선 암호 처리단계(S50)의 상세 순서도이고, 도 12는 도 11에서 키 스캔 단계(S52)의 알고리듬이다.FIG. 11 is a detailed flowchart of the elliptic curve encryption processing step (S50), and FIG. 12 is an algorithm of the key scanning step (S52) in FIG.

도 11과 도 12를 각각 참조하면 상기 타원곡선 암호 처리단계(S50)는, 초기단계(S51)와, 키 스캔 단계(S52), 키 스캔 결과가 ki=1인 경우의 연산단계(S53), 키 스캔 결과가 ki=0인 경우의 연산단계(S54), 좌표계 변환단계(S55) 및 리매핑 단계(S56)를 포함한다.11 and 12, the elliptic curve encryption processing step S50 includes an initial step S51, a key scanning step S52, an operation step S53 when the key scan result is k i = 1, , An operation step (S54) when the key scan result is k i = 0, a coordinate system conversion step (S55), and a remapping step (S56).

타원곡선 암호 처리단계(S50)는 매핑단계(S30)를 수행한 후 제어부(200)의 제어에 의해 타원곡선 암호 처리가 선택되면, 초기단계(S51)를 거친 후, 타원곡선 암호의 스칼라 곱셈을 위한 키 스캔 단계(S52)를 수행한다.If the elliptic curve encryption process is selected by the control unit 200 after the mapping step S30 is performed, the elliptic curve encryption process S50 is performed after the initial stage S51 and then the scalar multiplication of the elliptic curve cryptosystem (S52). &Lt; / RTI &gt;

키 스캔 단계(S52)와, 키 스캔 결과가 ki=1인 경우의 연산단계(S53)와, 키 스캔 결과가 ki=0인 경우의 연산단계(S54)는 도 12의 알고리듬을 따라 수행된다. 스칼라 곱셈은 키를 최상위 비트부터 스캔(라인 1, 라인 2)하면서 한번 스캔할 때마다 점(point) 덧셈 연산(라인 4, 7)(키 스캔 결과가 ki=1인 경우의 연산단계(S53))과 점 두배 덧셈 연산(라인 5, 8)(키 스캔 결과가 ki=0인 경우의 연산단계(S54)) 순서로 두개의 점 연산을 모두 수행하며, 스캔 된 키 값이 0인지 1인지에 따라 제2메모리(400)의 저장 위치를 바꾸어 저장한다.A key scanning step S52 and an operation step S53 when the key scan result is k i = 1 and an operation step S54 when the key scan result k i = 0 are performed according to the algorithm of Fig. 12 do. The scalar multiplication is performed by performing a point addition operation (lines 4 and 7) (the key scan result is calculated in S53 (step S53) in the case of k i = 1) while scanning the key from the most significant bit (line 1, ) And a point doubling operation (lines 5 and 8) (an operation step (S54) in the case where the key scan result is k i = 0), and the scanned key value is 0 or 1 The storage location of the second memory 400 is changed and stored.

위에서 스캔 된 키 값이 1일 때(라인 4, 5)는 ki=1인 경우의 연산단계(S53), 스캔 된 키 값이 0일 때(라인 7, 8)는 ki=0인 경우의 연산단계(S54)에서 수행된다.When the key value scanned above is 1 (lines 4 and 5), an operation step (S53) in the case of ki = 1, an operation in the case where ki = 0 when the scanned key value is 0 (lines 7 and 8) Is performed in step S54.

본 발명의 실시 예의 타원곡선 암호는 소수체 상 투영 좌표계인 자코비안 좌표계를 사용한다. 점 덧셈 연산(Addition)과 점 두 배 덧셈 연산(Doubling)은 도 13의 표에 도시한 연산순서로 수행되며, 단계별로 필요한 곱셈, 덧셈 혹은 뺄셈을 수행한다.In the embodiment of the present invention, the elliptic curve cryptosystem uses a Jacobian coordinate system which is a hydrophobic projection coordinate system. The point addition operation and the point doubling addition operation are performed according to the operation sequence shown in the table of FIG. 13, and the required multiplication, addition, or subtraction is performed step by step.

스칼라 곱셈 연산이 끝나면 자코비안 좌표계(x, y, z)에서 아핀 좌표계(x, y)로 변환하는 좌표 변환단계(S55)를 수행하며, 변환 과정은 최종 출력된 자코비안 좌표계의 z의 역원을 연산하고 생성된 역원에서 z-2, z-3을 연산하여 z-2, z-3을 각 자코비안 좌표계의 x, y에 곱한 결과 값이 아핀(Affine) 좌표계(x, y)값이 된다. 즉, (x/z2,y/z3) = (x, y)과 같다. When the scalar multiplication operation is completed, a coordinate transformation step (S55) is performed to transform the Jacobian coordinate system (x, y, z) to the affine coordinate system (x, y), and the transformation process performs inverse transformation of z in the final output Jacobian coordinate system by calculating the z -2, -3 z in the operation and generate inverse z -2, a result value obtained by multiplying the z -3 in the x, y coordinate system is affine each Jacobian (affine) coordinate system (x, y) is the value . That is, (x / z 2 , y / z 3 ) = (x, y).

z의 역원연산은 페르마의 소정리를 이용하며, 알고리듬은 RSA 암호 유한체 멱승 연산에 사용된 도 8의 알고리듬을 이용하여 하드웨어 복잡도를 줄일 수 있다. 변환된 좌표값은 각각 리매핑 단계(S56)를 통해 리매핑 과정을 거친 후 데이터 출력단계(S60)를 통해 출력된다.The inverse operation of z uses Fermat's predecessor and the algorithm can reduce the hardware complexity by using the algorithm of FIG. 8 used in the RSA cryptosystem finite exponentiation operation. The converted coordinate values are outputted through a data output step S60 after a remapping process through a remapping step S56.

이처럼 본 발명은 하나의 장치를 이용하여 RSA 암호와 타원곡선 암호의 처리가 가능하며, 구성을 단순화하고 비용을 절감할 수 있다.As described above, the present invention can process RSA encryption and elliptic curve cryptosystem using one device, simplifying the configuration and reducing the cost.

본 발명은 상기 실시예에 한정되지 않고 본 발명의 기술적 요지를 벗어나지 아니하는 범위 내에서 다양하게 수정, 변형되어 실시될 수 있음은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 있어서 자명한 것이다.It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention will be.

100:유한체 연산기 110:유한체 감산 및 가산기
111:제3가산기 112:제4가산기
120:유한체 워드기반 몽고메리 곱셈기 121:곱셈기
122:제1가산기 123:제2가산기
130:내부메모리 140:제1선택부
150:제2선택부 200:제어부
300:제1메모리 400:제2메모리
100: finite field arithmetic unit 110: finite field subtraction and adder
111: third adder 112: fourth adder
120: Montgomery multiplier based on finite cube word 121: Multiplier
122: first adder 123: second adder
130: internal memory 140: first selector
150: second selection unit 200:
300: first memory 400: second memory

Claims (9)

타원곡선 암호의 스칼라 곱셈과 RSA(Rivest-Shamir-Adleman) 암호의 모듈로 멱승 연산을 선택적으로 수행하는 유한체 연산기;
유한체 연산에 필요한 모듈로 값을 저장하는 제1메모리;
타원곡선 암호와 RSA 암호에 사용되는 파라미터와 중간 결과값을 저장하는 제2메모리; 및
상기 유한체 연산기, 제1메모리 및 제2메모리를 제어하는 제어부를 포함하며,
상기 유한체 연산기는,
제1데이터, 제2데이터 및 제3데이터를 입력받아 곱셈연산을 수행하여 연산데이터와 내부메모리를 제어하는 제어신호를 출력하는 유한체 워드기반 몽고메리 곱셈기;
상기 제1데이터, 제2데이터 및 제3데이터를 입력받아 감산 또는 가산을 수행하여 연산데이터와 내부메모리를 제어하는 제어신호를 출력하는 유한체 감산 및 가산기;
상기 유한체 워드기반 몽고메리 곱셈기 또는 유한체 감산 및 가산기의 연산데이터 및 제어신호를 선택적으로 출력하는 제1선택부;
상기 제1선택부를 통해 선택된 제어신호에 따라 연산데이터를 저장하고, 저장된 제4데이터 또는 제5데이터를 상기 유한체 워드기반 몽고메리 곱셈기로 출력하는 내부메모리; 및
상기 내부메모리의 제4데이터 또는 제5데이터를 선택하여 출력하는 제2선택부를 포함하는 연산장치.
A finite field operator selectively performing a scalar multiplication of an elliptic curve cryptosystem and a modulo exponentiation operation of an RSA (Rivest-Shamir-Adleman) cryptosystem;
A first memory for storing a modulo value necessary for a finite field operation;
A second memory for storing parameters and intermediate result values used for elliptic curve cryptosystem and RSA cryptosystem; And
A finite field calculator, a first memory, and a second memory,
The finite-
A Montgomery multiplier based on a finite field word, which receives the first data, the second data, and the third data and performs a multiplication operation to output a control signal for controlling the operation data and the internal memory;
A finite subtractor and an adder for receiving the first data, the second data, and the third data and performing a subtraction or an addition to output operation data and a control signal for controlling the internal memory;
A first selector for selectively outputting operation data and a control signal of the finite-word-based Montgomery multiplier or finite field subtractor and adder;
An internal memory for storing operation data according to a control signal selected through the first selector and for outputting the stored fourth data or fifth data to the Montgomery multiplier based on the finite cube; And
And a second selector for selecting and outputting the fourth data or the fifth data of the internal memory.
삭제delete 제1항에 있어서,
상기 유한체 워드기반 몽고메리 곱셈기는,
32비트 곱셈기를 포함하는 연산장치.
The method according to claim 1,
The Montgomery multiplier based on finite culert words,
A computing device comprising a 32 bit multiplier.
제1항에 있어서,
상기 유한체 워드기반 몽고메리 곱셈기는,
키를 최상위 비트부터 스캔하는 키 스캔하고, RSA 암호 처리 시에서는 자승처리 한 후 키 스캔 결과에 따라 스캔된 키의 값이 1인 경우에 곱셈 연산을 추가로 수행하거나,
타원곡선 암호 처리시 점(point) 덧셈과 점 두배 덧셈 연산을 위한 곱셈 연산과 자승 연산을 수행하고, 상기 스캔된 키 값이 0인지 1인지에 따라 상기 제2메모리의 저장 위치를 바꾸어 저장하는 것을 특징으로 하는 연산장치.
The method according to claim 1,
The Montgomery multiplier based on finite culert words,
Key is scanned from the most significant bit. In RSA encryption processing, a multiplication operation is further performed when the value of the scanned key is 1 according to the result of the key scan after performing the square processing,
Performing multiplication and squaring operations for point addition and dot doubling addition in the elliptic curve encryption processing and changing the storage location of the second memory according to whether the scanned key value is 0 or 1 Characterized by:
제1항에 있어서,
상기 유한체 감산 및 가산기는,
점(point) 덧셈과 점 두 배 연산을 위한 유한체 상의 덧셈 또는 뺄셈 연산을 수행하고, 키 스캔 결과 값이 0인지 1인지에 따라 상기 제2메모리의 저장 위치를 바꾸어 저장하는 것을 특징으로 하는 연산장치.
The method according to claim 1,
Wherein the finite field subtractor and the adder
Performs addition or subtraction operations on a finite field for point addition and doubling operations and stores the second memory in a different storage location depending on whether the key scan result is 0 or 1. 2. The method according to claim 1, Device.
a) 초기단계에서 데이터를 입력받는 데이터 입력단계;
b) 입력된 데이터를 연산에 적합한 데이터로 매핑하는 단계;
c) 제어부의 제어에 따라 입력된 데이터의 모듈로 멱승 연산을 수행하여 RSA(Rivest-Shamir-Adleman) 암호를 처리하는 RSA 암호 처리단계;
d) 상기 c) 단계를 수행하거나 제어부의 제어에 따라 입력된 데이터의 스칼라 곱셈을 수행하여 타원곡선 암호를 처리하는 타원곡선 암호 처리단계; 및
e) 상기 c) 또는 d) 단계의 데이터를 출력하는 데이터 출력단계를 포함하며,
상기 b) 단계는,
c) 단계에서 모듈로 멱승 연산처리되는 데이터 길이의 제곱에 데이터를 미리 곱하고,
d) 단계에서 스칼라 곱셈 연산처리되는 데이터 길이의 제곱에 자코비안 좌표값을 미리 곱하는 것을 특징으로 하는 연산방법.
a) a data input step of receiving data at an initial stage;
b) mapping the input data to data suitable for operation;
c) an RSA encryption processing step of processing a Rivest-Shamir-Adleman (RSA) cipher by performing a modulo exponentiation operation on input data under the control of the controller;
d) performing an elliptic curve cryptographic process for performing an elliptic curve cryptosystem by performing the step c) or performing a scalar multiplication of input data under the control of the controller; And
e) outputting data of the step c) or d)
The step b)
multiplying the squared data length by the modulo exponentiation process in step c)
and multiplying the squared Jacobian coordinate value by the square of the data length to be subjected to the scalar multiplication operation in the step (d).
삭제delete 제6항에 있어서,
상기 c) 단계는,
키를 최상위 비트부터 스캔하는 키 스캔 단계;
데이터를 자승처리하는 자승처리단계;
상기 키 스캔 단계의 처리 결과값이 1인 경우 곱셈 연산을 수행하는 곱셈 처리단계; 및
상기 b) 단계에서 추가한 데이터 길이값을 제거하기 위한 리매핑 단계를 포함하는 연산방법.
The method according to claim 6,
The step c)
A key scanning step of scanning the key from the most significant bit;
A squaring step of squaring data;
A multiplication processing step of performing a multiplication operation when the processing result of the key scanning step is 1; And
And a remapping step for removing the data length value added in the step b).
제6항에 있어서,
상기 d) 단계는,
키를 최상위 비트부터 스캔하는 키 스캔 단계;
상기 키 스캔 단계의 처리 결과값에 점(point) 덧셈과 점 두 배 덧셈을 수행하는 연산단계;
상기 스캔된 키 값이 0과 1일 때에 따라 저장 위치를 바꾸어 저장하는 연산단계;
상기 스칼라 곱셈 연산결과를 자코비안 좌표계에서 아핀 좌표계로 역변환하는 연산단계; 및
상기 b) 단계에서 추가한 데이터 길이값을 제거하기 위한 리매핑 단계를 포함하는 연산방법.
The method according to claim 6,
The step d)
A key scanning step of scanning the key from the most significant bit;
An operation step of performing point addition and double addition on a result of processing of the key scanning step;
An arithmetic operation step of changing the storage position according to the scanned key values 0 and 1, and storing the changed storage position;
An operation step of inversely transforming the scalar multiplication operation result from the Jacobian coordinate system to the affine coordinate system; And
And a remapping step for removing the data length value added in the step b).
KR1020180001873A 2018-01-05 2018-01-05 Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem KR102006222B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180001873A KR102006222B1 (en) 2018-01-05 2018-01-05 Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180001873A KR102006222B1 (en) 2018-01-05 2018-01-05 Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem

Publications (2)

Publication Number Publication Date
KR20190083891A KR20190083891A (en) 2019-07-15
KR102006222B1 true KR102006222B1 (en) 2019-08-01

Family

ID=67257781

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180001873A KR102006222B1 (en) 2018-01-05 2018-01-05 Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem

Country Status (1)

Country Link
KR (1) KR102006222B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102253211B1 (en) * 2019-08-30 2021-05-17 금오공과대학교 산학협력단 Computing Apparatus and Method for Hardware Implementation of Public-Key Cryptosystem Supporting Elliptic Curves over Prime Field and Binary Field

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101707334B1 (en) 2015-11-05 2017-02-15 인하대학교 산학협력단 Apparatus for efficient elliptic curve cryptography processor and method for the same

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100436814B1 (en) * 2001-12-20 2004-06-23 한국전자통신연구원 apparatus for RSA Crypto Processing of IC card
FR2926651B1 (en) * 2008-01-23 2010-05-21 Inside Contactless COUNTERMEASURE METHOD AND DEVICES FOR ASYMMETRIC CRYPTOGRAPHY

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101707334B1 (en) 2015-11-05 2017-02-15 인하대학교 산학협력단 Apparatus for efficient elliptic curve cryptography processor and method for the same

Also Published As

Publication number Publication date
KR20190083891A (en) 2019-07-15

Similar Documents

Publication Publication Date Title
US7904498B2 (en) Modular multiplication processing apparatus
CN109039640B (en) Encryption and decryption hardware system and method based on RSA cryptographic algorithm
JP2008252299A (en) Encryption processing system and encryption processing method
KR20070046778A (en) Method and device for efficient multiparty multiplication
JP2000187438A (en) Method, device, and recording medium for executing elliptic curve cryptography
JP2008203548A (en) Key generating method using quadric hyperbolic curve group, decoding method, signature verification method, key stream generating method and device
CN106712965B (en) Digital signature method and device and password equipment
US7218735B2 (en) Cryptography method on elliptic curves
CN107911217B (en) Method and device for cooperatively generating signature based on ECDSA algorithm and data processing system
JP3785044B2 (en) Power residue calculation device, power residue calculation method, and recording medium
US6480606B1 (en) Elliptic curve encryption method and system
US7191333B1 (en) Method and apparatus for calculating a multiplicative inverse of an element of a prime field
KR102006222B1 (en) Apparatus and Method for Integrated Hardware Implementation of Elliptic Curve Cryptography and RSA Public-key Cryptosystem
US7319750B1 (en) Digital circuit apparatus and method for accelerating preliminary operations for cryptographic processing
JP2009042787A (en) Method for accelerating finite field operation on elliptic curve
CN112350827B (en) Koblitz curve-based elliptic curve encryption and decryption method and system for acceleration scalar multiplication calculation
Wu et al. Fast parallel exponentiation algorithm for RSA public-key cryptosystem
Haraty et al. A comparative study of rsa based digital signature algorithms
JP2018092010A (en) Encryption device and encryption method, encryption program, key generation device, key generation method, and key generation program
JP4502817B2 (en) Elliptic curve scalar multiplication method and apparatus
CN113544998A (en) White-box elliptic curve cryptography implementation
KR102253211B1 (en) Computing Apparatus and Method for Hardware Implementation of Public-Key Cryptosystem Supporting Elliptic Curves over Prime Field and Binary Field
Khachatrian et al. A new public key encryption system based on permutation polynomials
Ali et al. Fault-tolerant and information security in networks using multi-level redundant residue number system
US7480380B2 (en) Method for efficient generation of modulo inverse for public key cryptosystems

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