KR102462395B1 - Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography - Google Patents

Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography Download PDF

Info

Publication number
KR102462395B1
KR102462395B1 KR1020220029611A KR20220029611A KR102462395B1 KR 102462395 B1 KR102462395 B1 KR 102462395B1 KR 1020220029611 A KR1020220029611 A KR 1020220029611A KR 20220029611 A KR20220029611 A KR 20220029611A KR 102462395 B1 KR102462395 B1 KR 102462395B1
Authority
KR
South Korea
Prior art keywords
core
ntt
sampler
processor
message
Prior art date
Application number
KR1020220029611A
Other languages
Korean (ko)
Inventor
이한호
김성재
Original Assignee
인하대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 인하대학교 산학협력단 filed Critical 인하대학교 산학협력단
Priority to KR1020220029611A priority Critical patent/KR102462395B1/en
Application granted granted Critical
Publication of KR102462395B1 publication Critical patent/KR102462395B1/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/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
    • 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
    • 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
    • G06F7/523Multiplying only
    • G06F7/53Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/728Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic using Montgomery reduction
    • 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/002Countermeasures against attacks on cryptographic mechanisms
    • H04L9/005Countermeasures against attacks on cryptographic mechanisms for timing attacks
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • H04L9/0662Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/04Masking or blinding
    • H04L2209/046Masking or blinding of operations, operands or results of the operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry
    • H04L2209/125Parallelization or pipelining, e.g. for accelerating processing of cryptographic operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/34Encoding or coding, e.g. Huffman coding or error correction

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Mathematical Physics (AREA)
  • Storage Device Security (AREA)

Abstract

Disclosed are a module-LWE-based encryption processor system and an operating method thereof. The encryption processor system suggested in the present invention comprises: a key generation processor which generates a polynomial matrix and an error vector from random numbers generated by a PRNG core through a reject sampler and a binomial sampler, converts the polynomial matrix and the error vector into an NTT domain through an NTT core, performs an operation using a point-wise multiplier and an adder, and encodes and outputs the operation results into public and private keys using an encoder; an encryption processor which receives the public key from the key generation processor and a message to encode the message, generates a polynomial matrix and an error vector through the reject sampler and the binomial sampler by decoding the public key, performs an operation using the point-wise multiplier and the adder in the NTT domain through the NTT core and an INTT core, and compresses, encodes, and outputs a cryptograph using a compressor; and a decryption processor which receives the cryptograph from the encryption processor, decompresses and decodes the cryptograph through a decompressor, receives the private key from the key generation processor and decodes the same, performs an operation using the point-wise multiplier and the adder in the NTT domain through the NTT core and the INTT core, and outputs an original message using a message decoder. According to the present invention, during a process of performing an NTT operation, continuous operation is possible without access to data memory, thereby reducing hardware complexity.

Description

양자내성암호를 위한 모듈-LWE 기반 암호 프로세서 시스템 및 방법{Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography}Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography

본 발명은 양자내성암호를 위한 모듈-LWE 기반 암호 프로세서 시스템 및 방법에 관한 것이다. The present invention relates to a module-LWE based cryptographic processor system and method for quantum resistant cryptography.

현재 많이 사용되고 있는 RSA(Rivest, Shamir, and Adleman)와 ECC(Elliptic Curve Cryptosystem) 등과 같이 인수분해 및 이산로그 문제를 이용한 기존 공개키 암호 알고리즘은 양자컴퓨터를 사용하게 되면 인수분해나 이산대수 문제를 효율적으로 해결할 수 있게 되어 다항시간 안에 해독이 가능하게 된다. 따라서, 기존 컴퓨터와 양자컴퓨터 모두로부터 안전한 공개키 암호인 양자후 암호 또는 양자내성암호(Post-Quantum Cryptography)의 필요성이 요구되고 있다. 양자내성암호는 기존의 공개키 암호가 가지고 있던 문제를 해결하고 대체할 수 있는 암호로, 현재 미국 NIST(National Institute of Standards and Technology)에서 양자내성암호 알고리즘 공모전을 통해 표준화를 진행 중에 있다. Existing public key cryptographic algorithms using factorization and discrete log problems such as Rivest, Shamir, and Adleman (RSA) and Elliptic Curve Cryptosystem (ECC), which are currently widely used, efficiently solve factorization or discrete logarithmic problems using quantum computers. can be solved in polynomial time. Therefore, there is a need for post-quantum cryptography or Post-Quantum Cryptography, which is a secure public key cryptography from both existing computers and quantum computers. Quantum resistant cryptography is a cipher that can solve and replace problems with existing public key cryptography, and is currently being standardized through a quantum resistant cryptography algorithm contest at the National Institute of Standards and Technology (NIST) in the United States.

양자내성암호는 기존의 인수분해나 이산대수 문제가 아닌 전혀 새로운 문제에 안전성을 기반한 암호로서, 기반하는 분야에 따라 격자-기반, 코드-기반, 해시-기반, 아이소제니-기반, 다변수-기반 암호 등으로 구분된다. 그 중에 격자-기반 암호는 고차원 격자에 정의된 다양한 유형의 어려운 문제(hard problem)를 기반으로 하는 강력한 암호로서 많은 관심을 받고 있다. Quantum resistant cryptography is a cryptography based on safety for a completely new problem, not the existing factorization or discrete algebra problem. separated by password. Among them, lattice-based cryptography is receiving much attention as a strong cipher based on various types of hard problems defined in a high-dimensional grid.

격자-기반 암호 알고리즘은 주로 에러가 포함된 선형방정식에서 균일한 랜덤 벡터를 구별하는 LWE(Learning With Error) 문제를 이용한다. LWE는 키의 크기가 커지고 연산 속도가 느린 단점이 있어 환(Ring) 안에서 수행하는 링(Ring)-LWE 문제가 제안되었다. 모듈-LWE는 격자-기반 알고리즘으로서 링-LWE를 일반화한 암호 알고리즘이며, 가장 많은 시간자원을 사용하는 다항식 행렬 곱셈의 연산 속도 향상을 위해 고성능 NTT를 필요로 한다. Lattice-based cryptographic algorithms mainly use the Learning With Error (LWE) problem to distinguish uniform random vectors from linear equations containing errors. Since LWE has a disadvantage in that the size of the key is large and the operation speed is slow, a Ring-LWE problem performed in a ring has been proposed. Module-LWE is a lattice-based algorithm that is a generalized encryption algorithm of ring-LWE, and requires high-performance NTT to improve the operation speed of polynomial matrix multiplication that uses the most time resources.

현재 양자내성암호 기술은 미래 암호 기술의 핵심으로 다양한 응용 가능성 때문에 학계 및 산업계의 관심이 높으나, 수학적 난이도가 높고 기존 암호 체계에 비해 암복호화 연산 속도가 느려, 실용화를 위해서는 고성능 양자내성암호 하드웨어 아키텍처 구현이 필요하다. Currently, quantum-resistant cryptography technology is the core of future cryptography technology and is highly interested in academia and industry because of its various applications. I need this.

한국등록특허 제10-1952547호(2019.02.20.)Korean Patent Registration No. 10-1952547 (2019.02.20.)

본 발명이 이루고자 하는 기술적 과제는 모듈-LWE(Module-Learning With Error)와 NTT(Number Theoretic Transform) 코어를 이용하여 높은 데이터 처리율과 확장성을 가지는 모듈-LWE 기반 양자내성암호 프로세서 시스템 및 방법을 제공하는데 있다. 더욱 상세하게는, 2-병렬 MDF(Multi-path Delay Feedback) 기반의 NTT 코어를 사용하여 높은 연산속도를 가지고, 리소스의 재활용과 확장성이 용이한 모듈-LWE 기반 양자내성암호의 효율적인 시스템 및 방법을 제공하는데 있다.The technical problem to be achieved by the present invention is to provide a module-LWE-based quantum-resistant cryptography processor system and method having high data throughput and scalability using a module-LWE (Module-Learning With Error) and NTT (Number Theoretic Transform) core is doing More specifically, using a 2-parallel MDF (Multi-path Delay Feedback)-based NTT core, a module-LWE-based efficient system and method for quantum-resistant cryptography with high computation speed and easy resource recycling and scalability is to provide

일 측면에 있어서, 본 발명에서 제안하는 양자내성암호를 위한 모듈-LWE 기반 암호 프로세서 시스템은 PRNG 코어에서 생성한 난수들을 거부 샘플러 및 이항 샘플러를 통해 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어를 통해 NTT 도메인으로 변환한 후 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 인코더를 이용하여 암호화 프로세서 및 복호화 프로세서에서 사용하기 위한 공개키 및 비밀키로 인코딩하여 출력하는 키생성 프로세서, 사용자가 암호화 하고자 하는 메시지와 상기 키생성 프로세서로부터 공개키를 수신하여 상기 메시지를 인코딩하고, 상기 공개키를 디코딩하여 거부 샘플러와 이항 샘플러를 통해 암호화에 필요한 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 컴프레스를 이용하여 암호문을 압축 및 인코딩하여 출력하는 암호화 프로세서 및 상기 암호화 프로세서로부터 암호문을 수신하여 디컴프레스를 통해 암호문의 압축 해제 및 디코딩을 수행하고, 상기 키생성 프로세서로부터 비밀키를 수신하여 디코딩을 수행하고, NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 뺄셈기를 이용하여 연산을 수행하고, 연산 결과는 메시지 디코더를 이용하여 원본 메시지를 출력하는 복호화 프로세서를 포함한다. In one aspect, the module-LWE-based cryptographic processor system for quantum-resistant cryptography proposed in the present invention generates a polynomial matrix and an error vector through a reject sampler and a binomial sampler for random numbers generated by the PRNG core, and the generated error vector After converting into the NTT domain through the NTT core, the operation is performed using a point-wise multiplier and an adder, and the operation result is encoded with the public and private keys for use in the encryption processor and the decryption processor using the encoder and output. A key generation processor receives a message to be encrypted by a user and a public key from the key generation processor, encodes the message, and decodes the public key to generate a polynomial matrix and an error vector required for encryption through a reject sampler and a binary sampler. and an encryption processor that performs an operation on the generated error vector using a point-wise multiplier and an adder in the NTT domain through the NTT core and the INTT core, and compresses and encodes the ciphertext using a compression and outputs the result of the operation; Receive the cipher text from the cryptographic processor to perform decompression and decoding of the cipher text through decompression, receive the secret key from the key generation processor to perform decoding, and point-wise in the NTT domain through the NTT core and INTT core and a decoding processor that performs an operation using a multiplier and a subtractor, and outputs an original message using a message decoder as a result of the operation.

본 발명의 실시예에 따른 키생성 프로세서는 의사난수를 생성하는 PRNG 코어, PRNG 코어에서 생성한 의사난수를 이용하여 공개키 생성 및 암호화에 필요한 다항식 행렬을 생성하는 거부 샘플러, PRNG 코어에서 생성한 의사난수를 이용하여 공개키 생성 및 비밀키 생성에 사용하기 위한 에러 계수를 생성하는 이항 샘플러, 이항 샘플러의 출력을 입력 받아 NTT 연산을 수행하는 NTT 코어, 연산 과정에 사용되는 포인트-와이즈 곱셈기 및 덧셈기 및 연산된 결과를 직렬화하는 비밀키 인코더를 포함한다. The key generation processor according to an embodiment of the present invention includes a PRNG core that generates a pseudo-random number, a rejection sampler that generates a polynomial matrix necessary for public key generation and encryption using the pseudo-random number generated by the PRNG core, and a pseudo-random generated by the PRNG core. A binary sampler that generates an error coefficient for use in public and private key generation using random numbers, an NTT core that receives the output of the binary sampler and performs an NTT operation, a point-wise multiplier and adder used in the operation process, and It includes a secret key encoder that serializes the calculated result.

본 발명의 실시예에 따른 암호화 프로세서는 사용자가 입력한 메시지를 1비트 단위로 마스킹하는 메시지 인코더, 공개키를 수신하여 공개키를 역-직렬화하는 공개키 디코더, 공개키 디코더의 출력을 입력 받아 공개키 생성과 암호화에 필요한 다항식 행렬을 생성하는 거부 샘플러, 비밀키 생성과 암호화에 필요한 에러 계수를 생성하는 이항 샘플러, 이항 샘플러의 출력을 입력 받아 NTT 연산을 수행하는 NTT 코어, 거부 샘플러와 이항 샘플러의 값을 연산하는 포인트-와이즈 곱셈기 및 덧셈기, 포인트-와이즈 곱셈기를 통해 연산된 값을 입력 받아 역-NTT 연산을 수행하는 INTT 코어, 곱셈 연산 결과에 대해 몽고메리 리덕션 연산을 수행하는 MR1, 덧셈 연산 결과에 대해 바렛 리덕션 연산을 수행하는 MR2 및 리덕션된 데이터를 압축 및 인코딩하여 암호문으로 출력하는 컴프레스를 포함한다. The cryptographic processor according to an embodiment of the present invention receives the output of the message encoder for masking the message input by the user in 1-bit units, the public key decoder that receives the public key and deserializes the public key, and the public key decoder. Rejection sampler that generates polynomial matrices necessary for key generation and encryption, binary sampler that generates error coefficients necessary for secret key generation and encryption, NTT core that performs NTT operation by receiving the output of binary sampler, reject sampler and binary sampler Point-wise multiplier and adder that calculates values, INTT core that receives the value calculated through the point-wise multiplier and performs inverse-NTT operation, MR1 that performs Montgomery reduction operation on the result of multiplication operation, MR2 that performs a Barrett reduction operation on the MR2 and compression that compresses and encodes the reduced data and outputs it as ciphertext.

본 발명의 실시예에 따른 복호화 프로세서는 암호문을 수신하여 압축 해제 및 디코딩하는 암호문 디컴프레스, 비밀키를 수신하여 비밀키를 역-직렬화하는 비밀키 디코더, 암호문 디컴프레스의 출력을 입력 받아 NTT 연산을 수행하는 NTT 코어, 복호화 연산에 필요한 포인트-와이즈 곱셈기 및 뺄셈기, 포인트-와이즈 곱셈기를 통해 연산된 값을 입력 받아 역-NTT 연산을 수행하는 INTT 코어, 곱셈 연산 결과에 대해 몽고메리 리덕션 연산을 수행하는 MR1, 덧셈 연산 결과에 대해 바렛 리덕션 연산을 수행하는 MR2 및 연산된 결과로 얻은 메시지의 마스크를 제거하는 메시지 디코더를 포함한다. The decryption processor according to an embodiment of the present invention receives the output of the ciphertext decompression for decompressing and decoding the ciphertext, the secret key decoder for receiving the secret key and deserializing the secret key, and the ciphertext decompression to perform the NTT operation. The NTT core that performs the inverse-NTT operation by receiving the value calculated through the point-wise multiplier and the point-wise multiplier and subtractor required for decoding operation, and the INTT core that performs the Montgomery reduction operation on the result of the multiplication operation. MR1, MR2 that performs a Barrett reduction operation on the result of the addition operation, and a message decoder that removes a mask of a message obtained as a result of the operation.

본 발명의 실시예에 따른 PRNG 코어는 Keccak 알고리즘을 사용하는 SHA3로 샘플링의 입력 비트에 따라 출력 비트의 길이를 조정하고, 상기 거부 샘플러는 상기 PRNG 코어의 출력을 16비트 단위로 입력 받아 균일한 임의의 정수 modulo q를 생성하는 모듈로서 19q보다 작은 값을 통과시켜 바렛 리덕션을 수행하도록 하고, 상기 이항 샘플러는 상기 PRNG 코어의 출력을 8비트 단위로 입력 받아 중심이항분포에 따라 계수 값을 생성하고, 상기 NTT 코어는 2-병렬 NTT 코어로서 총 7개의 스테이지(stage)를 포함하고, 각각의 스테이지는 PE(Processing Element)로 구성되고, 상기 포인트-와이즈 곱셈기는 베이스 곱셈기 및 누산기를 포함한다. The PRNG core according to an embodiment of the present invention adjusts the length of the output bit according to the input bit of sampling with SHA3 using the Keccak algorithm, and the reject sampler receives the output of the PRNG core in 16-bit units and receives a uniform random As a module for generating an integer modulo q of The NTT core is a two-parallel NTT core and includes a total of 7 stages, each stage is composed of a processing element (PE), and the point-wise multiplier includes a base multiplier and an accumulator.

본 발명의 실시예에 따른 NTT 코어의 상기 PE는 입력 값과 ROM에 저장된 값과 곱셈연산 후 순서대로 몽고메리 리덕션, BU 연산, 바렛 리덕션 연산을 수행하여 출력한다. The PE of the NTT core according to an embodiment of the present invention outputs an input value by performing a Montgomery reduction, a BU operation, and a Barrett reduction operation in order after a multiplication operation with an input value and a value stored in the ROM.

본 발명의 실시예에 따른 INTT 코어의 PE는 NTT 코어의 PE와 반대되는 구조를 갖고 입력 값을 BU와 바렛 리덕션 연산한 값을 ROM에 저장된 값과 곱셈 연산 후 몽고메리 리덕션 연산을 수행하여 출력한다. The PE of the INTT core according to an embodiment of the present invention has a structure opposite to that of the PE of the NTT core, and the value stored in the ROM is multiplied by BU and the Barrett reduction operation of the input value, and then the Montgomery reduction operation is performed and output.

본 발명의 실시예에 따른 베이스 곱셈기는 곱셈을 수행할 각각의 다항식으로부터 두 개씩 입력으로 받아 Bow-tie 곱셈을 수행하고, 상기 누산기는 행렬의 곱셈 방식에 따라 곱셈 연산을 수행한 후 각각의 다항식 열을 더해주는 역할을 수행한다. The base multiplier according to an embodiment of the present invention receives two input from each polynomial to be multiplied and performs Bow-tie multiplication. plays a role in adding

본 발명의 실시예에 따른 MR1은 몽고메리 리덕션을 통해 곱셈으로 커진 연산 결과를 줄이기 위해 NTT 코어 및 포인트-와이즈 곱셈기에 사용되고, MR2은 바렛 리덕션을 통해 덧셈으로 커진 연산 결과를 줄이기 위해 사용된다. MR1 according to an embodiment of the present invention is used for an NTT core and a point-wise multiplier to reduce an operation result increased by multiplication through Montgomery reduction, and MR2 is used to reduce an operation result increased by addition through Barrett reduction.

또 다른 일 측면에 있어서, 본 발명에서 제안하는 양자내성암호를 위한 모듈-LWE 기반 암호 프로세서 시스템의 암호화 방법은 키생성 프로세서가 PRNG 코어로 생성한 난수들을 거부 샘플러 및 이항 샘플러를 통해 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어를 통해 NTT 도메인으로 변환한 후 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 인코더를 이용하여 암호화 프로세서 및 복호화 프로세서에서 사용하기 위한 공개키 및 비밀키로 인코딩하여 출력하는 단계, 암호화 프로세서가 사용자가 암호화 하고자 하는 메시지와 상기 키생성 프로세서로부터 공개키를 수신하여 상기 메시지를 인코딩하고, 상기 공개키를 디코딩하여 거부 샘플러와 이항 샘플러를 통해 암호화에 필요한 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 컴프레스를 이용하여 암호문을 압축 및 인코딩하여 출력하는 단계 및 복호화 프로세서가 상기 암호화 프로세서로부터 암호문을 수신하여 디컴프레스를 통해 암호문의 압축 해제 및 디코딩을 수행하고, 상기 키생성 프로세서로부터 비밀키를 수신하여 디코딩을 수행하고, NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 뺄셈기를 이용하여 연산을 수행하고, 연산 결과는 메시지 디코더를 이용하여 원본 메시지를 출력하는 단계를 포함한다. In another aspect, the encryption method of the module-LWE-based cryptographic processor system for quantum resistant cryptography proposed in the present invention rejects the random numbers generated by the key generation processor with the PRNG core through a rejection sampler and a binomial sampler, polynomial matrix and error After generating a vector and converting the generated error vector into an NTT domain through an NTT core, an operation is performed using a point-wise multiplier and an adder, and the operation result is used in an encryption processor and a decryption processor using an encoder. Encoding and outputting the public key and the private key, the encryption processor receives the message the user wants to encrypt and the public key from the key generation processor, encodes the message, and decodes the public key through a reject sampler and a binary sampler The polynomial matrix and error vector required for encryption are generated, and the generated error vector is operated using a point-wise multiplier and an adder in the NTT domain through the NTT core and the INTT core, and the result of the operation is ciphertext using compression. Compressing and encoding and outputting, and a decryption processor receiving the ciphertext from the encryption processor, decompressing and decoding the ciphertext through decompression, and receiving the secret key from the key generation processor to perform decoding, NTT and performing an operation using a point-wise multiplier and a subtractor in the NTT domain through the core and the INTT core, and outputting an original message using a message decoder with the result of the operation.

본 발명의 실시예들에 따른 모듈-LWE 기반 암호프로세서는 모듈-LWE문제를 사용하여 확장성이 용이하도록 하고, 파이프라인이 가능한 2-병렬 구조의 NTT를 사용하여 높은 데이터 처리율과 높은 클럭 속도를 얻을 수 있어 연산 속도에 이점을 가진다. 또한 NTT 연산을 수행하는 과정에 있어서 데이터 메모리에 접근 없이 연속적인 연산이 가능해 하드웨어 복잡도를 낮출 수 있다. 추가적으로 몽고메리(Montgomery) 및 바렛(Barrett) 리덕션을 사용하여 부-채널 공격(Side-Channel attack) 중 하나인 타이밍 공격에 대한 보안성을 보장한다.The module-LWE-based cryptographic processor according to the embodiments of the present invention facilitates scalability by using the module-LWE problem, and achieves high data throughput and high clock speed by using a pipelined two-parallel structure NTT. It has an advantage in computation speed. In addition, in the process of performing the NTT operation, continuous operation is possible without accessing the data memory, thereby reducing hardware complexity. Additionally, it uses Montgomery and Barrett reduction to ensure security against timing attack, which is one of side-channel attacks.

도 1은 본 발명의 일 실시예에 따른 모듈-LWE 기반 암복호화 시스템의 구성을 설명하기 위한 도면이다.
도 2는 본 발명의 일 실시예에 따른 키생성 프로세서를 나타내는 도면이다.
도 3은 본 발명의 일 실시예에 따른 암호화 프로세서를 나타내는 도면이다.
도 4는 본 발명의 일 실시예에 따른 복호화 프로세서를 나타내는 도면이다.
도 5는 본 발명의 일 실시예에 따른 모듈-LWE 기반 암복호화 시스템의 암호화 방법을 설명하기 위한 흐름도이다.
도 6은 본 발명의 일 실시예에 따른 PRNG 코어를 나타내는 도면이다.
도 7은 본 발명의 일 실시예에 따른 거부 샘플러를 나타내는 도면이다.
도 8은 본 발명의 일 실시예에 따른 이항 샘플러를 나타내는 도면이다.
도 9는 본 발명의 일 실시예에 따른 2-병렬 NTT 코어를 나타내는 도면이다.
도 10은 본 발명의 일 실시예에 따른 NTT 코어의 PE(Processing Element)를 나타내는 도면이다.
도 11은 본 발명의 일 실시예에 따른 2-병렬 INTT 코어를 나타내는 도면이다.
도 12는 본 발명의 일 실시예에 따른 INTT 코어의 PE(Processing Element)를 나타내는 도면이다.
도 13은 본 발명의 일 실시예에 따른 몽고메리(Montgomery) 리덕션 연산을 수행하는 MR1(Modulo Reduction 1)를 나타내는 도면이다.
도 14는 본 발명의 일 실시예에 따른 바렛(Barrett) 리덕션 연산을 수행하는 MR2(Modulo Reduction 2)를 나타내는 도면이다.
도 15는 본 발명의 일 실시예에 따른 인코더를 나타내는 도면이다.
도 16은 본 발명의 일 실시예에 따른 디코더를 나타내는 도면이다.
도 17은 본 발명의 일 실시예에 따른 컴프레스를 나타내는 도면이다.
도 18은 본 발명의 일 실시예에 따른 컴프레스의 CE(Compress Element)를 나타내는 도면이다.
도 19는 본 발명의 일 실시예에 따른 디컴프레스를 나타내는 도면이다.
도 20은 본 발명의 일 실시예에 따른 디컴프레스의 DE(Decompress Element)를 나타내는 도면이다.
도 21은 본 발명의 일 실시예에 따른 메시지 인코더를 나타내는 도면이다.
도 22는 본 발명의 일 실시예에 따른 메시지 디코더를 나타내는 도면이다.
도 23은 본 발명의 일 실시예에 따른 베이스 곱셈기(Base multiplier)를 나타내는 도면이다.
도 24는 본 발명의 일 실시예에 따른 누산기(Accumulator)를 나타내는 도면이다.
1 is a diagram for explaining the configuration of a module-LWE-based encryption/decryption system according to an embodiment of the present invention.
2 is a diagram illustrating a key generation processor according to an embodiment of the present invention.
3 is a diagram illustrating an encryption processor according to an embodiment of the present invention.
4 is a diagram illustrating a decoding processor according to an embodiment of the present invention.
5 is a flowchart illustrating an encryption method of a module-LWE-based encryption/decryption system according to an embodiment of the present invention.
6 is a diagram illustrating a PRNG core according to an embodiment of the present invention.
7 is a diagram illustrating a rejection sampler according to an embodiment of the present invention.
8 is a diagram illustrating a binomial sampler according to an embodiment of the present invention.
9 is a diagram illustrating a two-parallel NTT core according to an embodiment of the present invention.
10 is a view showing a PE (Processing Element) of the NTT core according to an embodiment of the present invention.
11 is a diagram illustrating a two-parallel INTT core according to an embodiment of the present invention.
12 is a diagram illustrating a processing element (PE) of an INTT core according to an embodiment of the present invention.
13 is a diagram illustrating a Modulo Reduction 1 (MR1) that performs a Montgomery reduction operation according to an embodiment of the present invention.
14 is a diagram illustrating a Modulo Reduction 2 (MR2) that performs a Barrett reduction operation according to an embodiment of the present invention.
15 is a diagram illustrating an encoder according to an embodiment of the present invention.
16 is a diagram illustrating a decoder according to an embodiment of the present invention.
17 is a view showing a compression according to an embodiment of the present invention.
18 is a view showing a Compression Element (CE) of a compressor according to an embodiment of the present invention.
19 is a diagram illustrating a decompression according to an embodiment of the present invention.
20 is a diagram illustrating a Decompress Element (DE) of a decompression according to an embodiment of the present invention.
21 is a diagram illustrating a message encoder according to an embodiment of the present invention.
22 is a diagram illustrating a message decoder according to an embodiment of the present invention.
23 is a diagram illustrating a base multiplier according to an embodiment of the present invention.
24 is a diagram illustrating an accumulator according to an embodiment of the present invention.

본 발명의 실시예에 따르면, 2-병렬 MDF(Multi-path Delay Feedback) 기반의 NTT 코어를 사용하여 높은 연산속도를 가지고, 리소스의 재활용과 확장성이 용이한 모듈-LWE 기반 양자내성암호의 효율적인 암호 프로세서 시스템을 제공하는데 있다. 본 발명의 실시예에 따른 모듈-LWE 기반 암호 프로세서 시스템은 키생성 프로세서, 암호화 프로세서, 복호화 프로세서로 구성되어 있으며, 모듈-LWE는 환(Ring) 안에서 n차 다항식을 파라미터 k에 따라 kХk의 다항식 행렬 계산을 수행한다. 본 발명의 실시예에 따른 모듈-LWE의 특성에 따라 고정된 작은 값의 파라미터 n = 256과 q =3329를 사용하며 보안 등급(Security level) 5에 해당되는 파라미터 k = 4를 기반으로 설계되었다. 또한, 암호학적 해시 알고리즘인 SHA-3(Secure Hash Algorithm-3)를 이용하여 시드(Seed)를 생성할 SHA3-512와 출력 길이를 확장할 수 있는 함수인 SHAKE128과 SHAKE256을 사용하고 다항식 행렬을 생성하는 거부 샘플러(Rejection Sampler)와 샘플링 과정에 대한 효율적 구현의 어려움과 타이밍 공격으로부터 보호하기 위해 중심 이항 분포(Centered Binomial Distribution)를 이용하여 비밀키와 에러를 생성하는 이항 샘플러(Binomial Sampler)를 사용하는 방법과 하드웨어 구조를 제안한다. 또한, NTT 다항식 곱셈기의 하드웨어 복잡도를 줄이고 클럭 속도를 높이기 위해, NTT 전처리(Preprocess) 과정을 줄여서 스테이지(stage)를 감소시키는 방법, 2-병렬 구조, 파이프라인 구조, 그리고 비트-역순(Bit-Reverse) 연산을 제거하는 방법을 제안한다. 이하, 본 발명의 실시 예를 첨부된 도면을 참조하여 상세하게 설명한다. According to an embodiment of the present invention, using a 2-parallel MDF (Multi-path Delay Feedback)-based NTT core, a module-LWE-based quantum resistant cipher that has a high operation speed and is easy to reuse and expand resources is efficient To provide a cryptographic processor system. A module-LWE-based cryptographic processor system according to an embodiment of the present invention is composed of a key generation processor, a cryptographic processor, and a decryption processor, and the module-LWE is a polynomial matrix of kХk according to a parameter k with an nth-order polynomial in a ring. perform calculations According to the characteristics of the module-LWE according to the embodiment of the present invention, fixed small-value parameters n = 256 and q = 3329 are used and designed based on the parameter k = 4 corresponding to the security level 5. In addition, using SHA-3 (Secure Hash Algorithm-3), a cryptographic hash algorithm, SHA3-512 to generate a seed, and SHAKE128 and SHAKE256, functions that can extend the output length, are used to create a polynomial matrix. In order to protect against timing attacks and the difficulty of efficiently implementing the sampling process, it uses a Binomial Sampler that generates a secret key and an error using a Centered Binomial Distribution. We propose a method and hardware structure. In addition, in order to reduce the hardware complexity of the NTT polynomial multiplier and increase the clock speed, a method of reducing the stages by reducing the NTT preprocessing process, a two-parallel structure, a pipeline structure, and a bit-reverse ) operation is proposed. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 모듈-LWE 기반 암복호화 시스템의 구성을 설명하기 위한 도면이다. 1 is a diagram for explaining the configuration of a module-LWE-based encryption/decryption system according to an embodiment of the present invention.

제안하는 양자내성암호를 위한 모듈-LWE 기반 암호 프로세서 시스템은 키생성 프로세서(Key Generator Processor)(110), 암호화 프로세서(Encryptor Processor)(120) 및 복호화 프로세서(Decryptor Processor)(130)를 포함한다. The proposed module-LWE-based cryptographic processor system for quantum-resistant cryptography includes a key generator processor 110 , an encryption processor 120 , and a decryptor processor 130 .

본 발명의 실시예에 따른 키생성 프로세서(Key Generator Processor)(110)는 PRNG 코어에서 생성한 난수들을 거부 샘플러(Rejection Sampler) 및 이항 샘플러(Binomial Sampler)를 통해 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어를 통해 NTT 도메인으로 변환한 후 포인트-와이즈 곱셈기((Point-Wise Multiplier))와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 비밀키 인코더(Encoder)를 이용하여 암호화 프로세서(120) 및 복호화 프로세서(130)에서 사용하기 위한 공개키 및 비밀키로 인코딩하여 출력한다. A key generator processor 110 according to an embodiment of the present invention generates a polynomial matrix and an error vector through a rejection sampler and a binomial sampler for random numbers generated by the PRNG core, After converting the generated error vector into the NTT domain through the NTT core, an operation is performed using a point-wise multiplier and an adder, and the operation result is encrypted using a secret key encoder. It is encoded and output with a public key and a private key for use in the processor 120 and the decryption processor 130 .

본 발명의 실시예에 따른 키생성 프로세서(110)는 SHA3 해시를 이용한 PRNG 코어에서 생성한 의사난수를 이용하여 다항식 행렬과 에러를 생성하게 되고 NTT 연산을 수행한 뒤 곱셈 연산과 덧셈 연산을 통해 공개키와 비밀키를 생성한다.The key generation processor 110 according to an embodiment of the present invention generates a polynomial matrix and an error using a pseudo-random number generated by a PRNG core using a SHA3 hash, performs an NTT operation, and then discloses it through a multiplication operation and an addition operation. Generate a key and a secret key.

본 발명의 실시예에 따른 암호화 프로세서(Encryptor Processor)(120)는 사용자가 암호화 하고자 하는 메시지와 상기 키생성 프로세서(110)로부터 공개키를 수신하여 상기 메시지를 인코딩하여 1비트 단위로 마스킹하고, 상기 공개키를 디코더를 통해 공개 시드(Publicseed)와

Figure 112022025573987-pat00001
로 분리하여 출력한 값을 키 생성 과정과 동일하게 거부 샘플러와 이항 샘플러를 통해 암호화에 필요한 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 컴프레스(Compress)를 이용하여 암호문을 압축 및 인코딩하여 출력한다. An encryption processor 120 according to an embodiment of the present invention receives a message to be encrypted by a user and a public key from the key generation processor 110, encodes the message, and masks the message in 1-bit units, and the The public key is shared with the public seed through the decoder.
Figure 112022025573987-pat00001
The polynomial matrix and error vector required for encryption are generated through the rejection sampler and the binomial sampler in the same way as in the key generation process, and the generated error vector is point-wise in the NTT domain through the NTT core and INTT core. An operation is performed using a multiplier and an adder, and the operation result is output by compressing and encoding the ciphertext using a Compress.

본 발명의 실시예에 따른 복호화 프로세서(Decryptor Processor)(130)는 암호화 프로세서(120)로부터 암호문을 수신하여 디컴프레스(Decompress)를 통해 암호문의 압축 해제 및 디코딩을 수행하고, 상기 키생성 프로세서(110)로부터 비밀키를 수신하여 디코딩을 수행하고, NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 뺄셈기를 이용하여 연산을 수행하고, 연산 결과는 메시지 디코더(Decoder)를 이용하여 원본 메시지를 출력한다. The decryptor processor 130 according to the embodiment of the present invention receives the cipher text from the cryptographic processor 120 and decompresses and decodes the cipher text through decompression, and the key generation processor 110 ) receives the secret key and performs decoding, and performs an operation using a point-wise multiplier and subtractor in the NTT domain through the NTT core and the INTT core, and the operation result is the original message using a message decoder (Decoder). print out

모듈-LWE 문제는 링-LWE 문제에 기반한다. 다항식 환(Ring)은

Figure 112022025573987-pat00002
안에서 정의되며, 다항식 a(x)와 b(x)는 수학식1과 같이 나타낼 수 있다: The module-LWE problem is based on the ring-LWE problem. The polynomial ring is
Figure 112022025573987-pat00002
defined in , the polynomials a(x) and b(x) can be expressed as Equation 1:

Figure 112022025573987-pat00003
수학식1-1
Figure 112022025573987-pat00003
Equation 1-1

Figure 112022025573987-pat00004
수학식1-2
Figure 112022025573987-pat00004
Equation 1-2

각 다항식 곱셈의 빠른 연산을 위해 NTT 연산을 수행한다.

Figure 112022025573987-pat00005
는 수학식2와 같이 나타낼 수 있다: NTT operation is performed for fast operation of each polynomial multiplication.
Figure 112022025573987-pat00005
can be expressed as Equation 2:

Figure 112022025573987-pat00006
수학식2
Figure 112022025573987-pat00006
Equation 2

벡터(Vector)

Figure 112022025573987-pat00007
는 다항식 a(x)의 계수이다. n은 다항식의 계수로 1의 n제곱근(root of unity)의 값을 가진다. q는
Figure 112022025573987-pat00008
을 만족하는 소수(prime number)인 q=3329를 사용한다. 수학식 1에서 n 과 w는
Figure 112022025573987-pat00009
,
Figure 112022025573987-pat00010
의 조건을 만족하는 숫자로 구성된다.Vector
Figure 112022025573987-pat00007
is the coefficient of the polynomial a(x). n is a coefficient of a polynomial and has a value of the n square root of 1 (root of unity). q is
Figure 112022025573987-pat00008
A prime number that satisfies q=3329 is used. In Equation 1, n and w are
Figure 112022025573987-pat00009
,
Figure 112022025573987-pat00010
It consists of a number that satisfies the condition of .

다항식에 대한

Figure 112022025573987-pat00011
라고 정의할 때, 수학식3과 같이 나타낸다: for polynomials
Figure 112022025573987-pat00011
When defined as , it is expressed as Equation 3:

Figure 112022025573987-pat00012
수학식3
Figure 112022025573987-pat00012
Equation 3

모듈-LWE는 링-LWE를 일반화하여 파라미터 k에 따라 다항식 행렬을 생성한다. 다항식 행렬

Figure 112022025573987-pat00013
로 쓸 수 있으며 k값에 따라 확장성이 용이하다. The module-LWE generalizes the ring-LWE to generate a polynomial matrix according to parameter k. polynomial matrix
Figure 112022025573987-pat00013
It can be written as , and it is easy to expand according to the value of k.

본 발명의 실시예에 따른 양자내성암호를 위한 모듈-LWE 기반 암호 프로세서 시스템의 키생성 프로세서(110), 암호화 프로세서(120) 및 복호화 프로세서(130)에 관하여 도 2 내지 도 3을 참조하여 더욱 상세히 설명한다. Module-LWE-based cryptographic processor system for quantum resistant cryptography according to an embodiment of the present invention The key generation processor 110 , the cryptographic processor 120 , and the decryption processor 130 are described in more detail with reference to FIGS. 2 to 3 . Explain.

도 2는 본 발명의 일 실시예에 따른 키생성 프로세서를 나타내는 도면이다. 2 is a diagram illustrating a key generation processor according to an embodiment of the present invention.

본 발명의 실시예에 따른 키생성 프로세서는 PRNG 코어(210), 거부 샘플러(Rejection Sampler)(220), 이항 샘플러(Binomial Sampler)(230), NTT 코어(240), 포인트-와이즈 곱셈기 및 덧셈기(250) 및 비밀키 인코더(Encoder)(260)를 포함한다. A key generation processor according to an embodiment of the present invention includes a PRNG core 210, a rejection sampler 220, a binary sampler 230, an NTT core 240, a point-wise multiplier and an adder ( 250) and a secret key encoder (Encoder) 260 .

본 발명의 실시예에 따른 PRNG 코어(210)는 Keccak 알고리즘을 사용한 SHA3 해시로 거부 샘플러(220)와 이항 샘플러(230)에 사용될 의사난수를 생성한다.The PRNG core 210 according to the embodiment of the present invention generates a pseudo-random number to be used in the reject sampler 220 and the binary sampler 230 using the SHA3 hash using the Keccak algorithm.

본 발명의 실시예에 따른 거부 샘플러(220)는 PRNG 코어(210)로부터 의사난수를 입력 받아 공개키 생성에 필요한 다항식 행렬 생성에 사용한다. The rejection sampler 220 according to an embodiment of the present invention receives a pseudorandom number from the PRNG core 210 and uses it to generate a polynomial matrix necessary for generating a public key.

본 발명의 실시예에 따른 이항 샘플러(230)는 PRNG 코어(210)에서 생성한 의사난수를 이용하여 공개키 생성 및 비밀키 생성에 사용하기 위한 에러 계수를 생성한다. The binary sampler 230 according to an embodiment of the present invention generates an error coefficient for use in public key generation and private key generation using the pseudorandom number generated by the PRNG core 210 .

본 발명의 실시예에 따른 NTT 코어(240)는 이항 샘플러(230)의 출력을 입력 받아 NTT 연산을 수행한다. The NTT core 240 according to an embodiment of the present invention receives the output of the binary sampler 230 and performs an NTT operation.

본 발명의 실시예에 따른 포인트-와이즈 곱셈기 및 덧셈기(250)는 연산 과정에 사용되고, 행렬 곱셈연산을 위해 베이스 곱셈기와 누산기를 포함한다. The point-wise multiplier and adder 250 according to an embodiment of the present invention is used in an operation process and includes a base multiplier and an accumulator for a matrix multiplication operation.

본 발명의 실시예에 따른 비밀키 인코더(260)는 연산된 결과를 직렬화(Serialize)하여 공개키와 비밀키를 생성한다.The private key encoder 260 according to an embodiment of the present invention serializes the operation result to generate a public key and a private key.

본 발명의 실시예에 따르면, PRNG 코어(210)는 Keccak 알고리즘을 사용한 SHA3 해시를 사용하며 공개 시드(Publicseed)와 노이즈 시드(Noiseseed)를 생성하는 SHA3-512와 출력이 가변 길이를 가지는 SHAKE128과 SHAKE256을 사용하여 의사난수를 생성한다. PRNG 코어(210)를 통해서 생성된 출력은 각각 거부 샘플러(220)에서 다항식 행렬

Figure 112022025573987-pat00014
를 생성하고 이항 샘플러에서 에러 s와 e 를 생성하여 NTT 연산을 수행한다. 생성된 행렬과 벡터를 다음과 같이
Figure 112022025573987-pat00015
연산한다. 생성된
Figure 112022025573987-pat00016
를 인코딩하여 공개키를 생성하고
Figure 112022025573987-pat00017
를 인코딩하여 비밀키를 생성한다. According to the embodiment of the present invention, the PRNG core 210 uses a SHA3 hash using the Keccak algorithm, SHA3-512 for generating a public seed and a noise seed, and SHAKE128 and SHAKE256 whose outputs have variable lengths. is used to generate a pseudorandom number. The output generated through the PRNG core 210 is a polynomial matrix in the reject sampler 220, respectively.
Figure 112022025573987-pat00014
and perform NTT operation by generating errors s and e in the binary sampler. The generated matrix and vector are
Figure 112022025573987-pat00015
Calculate. generated
Figure 112022025573987-pat00016
to generate a public key by encoding
Figure 112022025573987-pat00017
Encode to generate a secret key.

도 3은 본 발명의 일 실시예에 따른 암호화 프로세서를 나타내는 도면이다. 3 is a diagram illustrating an encryption processor according to an embodiment of the present invention.

본 발명의 실시예에 따른 암호화 프로세서는 메시지 인코더(Encoder)(310), 공개키 디코더(Decoder)(320), 거부 샘플러(Rejection Sampler)(330), 이항 샘플러(Binomial Sampler)(340), NTT 코어(350), 포인트-와이즈 곱셈기 및 덧셈기(361, 362, 363, 364, 365), 리덕션(Reduction)(380) 및 컴프레스(Compress)(390)를 포함한다. Cryptographic processor according to an embodiment of the present invention is a message encoder (Encoder) 310, a public key decoder (Decoder) 320, a rejection sampler (Rejection Sampler) 330, a binary sampler (Binomial Sampler) 340, NTT It includes a core 350 , point-wise multipliers and adders 361 , 362 , 363 , 364 , 365 , a reduction 380 and a compressor 390 .

본 발명의 실시예에 따른 메시지 인코더(310)는 사용자가 입력한 메시지를 수신하여 암호화 프로세서에 적합하게 메시지를 1비트 단위로 마스크 해주는 인코더이다. The message encoder 310 according to an embodiment of the present invention is an encoder that receives a message input by a user and masks the message in 1-bit units suitable for an encryption processor.

본 발명의 실시예에 따른 공개키 디코더(320)는 공개키를 수신하여 암호화에 적합하게 공개키를 역-직렬화(De-Serialize)한다. The public key decoder 320 according to an embodiment of the present invention receives the public key and de-serializes the public key suitable for encryption.

본 발명의 실시예에 따른 거부 샘플러(330)는 공개키 디코더(320)의 출력을 입력 받아 공개키 생성과 암호화에 필요한 다항식 행렬을 생성한다. The rejection sampler 330 according to an embodiment of the present invention receives the output of the public key decoder 320 and generates a polynomial matrix necessary for public key generation and encryption.

본 발명의 실시예에 따른 이항 샘플러(340)는 비밀키 생성과 암호화에 필요한 에러 계수를 생성한다. The binary sampler 340 according to an embodiment of the present invention generates an error coefficient required for secret key generation and encryption.

본 발명의 실시예에 따른 NTT 코어(350)는 이항 샘플러(340)의 출력을 입력 받아 NTT 연산을 수행한다. The NTT core 350 according to an embodiment of the present invention receives the output of the binary sampler 340 and performs an NTT operation.

본 발명의 실시예에 따른 포인트-와이즈 곱셈기 및 덧셈기(361, 362, 363, 364, 365)는 거부 샘플러(330)와 이항 샘플러(340)의 값을 연산하고, 행렬 곱셈 연산을 위해 베이스 곱셈기와 누산기를 포함한다. Point-wise multipliers and adders 361, 362, 363, 364, and 365 according to an embodiment of the present invention calculate the values of the rejection sampler 330 and the binomial sampler 340, and perform a matrix multiplication operation with a base multiplier and a base multiplier. Includes an accumulator.

본 발명의 실시예에 따른 INTT 코어는 포인트-와이즈 곱셈기를 통해 연산된 값을 입력 받아 역-NTT 연산을 수행한다. The INTT core according to an embodiment of the present invention receives a value calculated through a point-wise multiplier and performs an inverse-NTT operation.

본 발명의 실시예에 따른 리덕션(380)은 곱셈 연산 결과에 대해 몽고메리 리덕션 연산을 수행하는 MR1 및 덧셈 연산 결과에 대해 바렛 리덕션 연산을 수행하는 MR2을 포함한다. The reduction 380 according to the embodiment of the present invention includes an MR1 that performs a Montgomery reduction operation on a multiplication operation result and an MR2 that performs a Barrett reduction operation on an addition operation result.

본 발명의 실시예에 따른 컴프레스(390)는 리덕션된 데이터를 압축 및 인코딩하여 암호문으로 출력한다. Compressor 390 according to an embodiment of the present invention compresses and encodes the reduced data and outputs it as ciphertext.

본 발명의 실시예에 따르면, 원본 메시지를 입력 받아 메시지 인코더(310)를 통해 메시지를 마스킹하고, 키생성 프로세서로부터 전달 받은 공개키를 공개키 디코더(320)를 통해 공개 시드(publicseed)와

Figure 112022025573987-pat00018
으로 분리하여 키생성 프로세스 과정과 동일하게 거부 샘플러(330)와 이항 샘플러(340)로 다항식 행렬
Figure 112022025573987-pat00019
와 에러 r, e1, e2를 생성한다. NTT 코어 및 INTT 코어와 포인트-와이즈 곱셈기를 사용하여
Figure 112022025573987-pat00020
Figure 112022025573987-pat00021
연산을 수행한 결과를 리덕션과 컴프레스 과정을 통해 데이터의 크기를 줄이고 압축하여 최종적으로 암호문을 출력한다. According to an embodiment of the present invention, an original message is received, the message is masked through the message encoder 310, and the public key received from the key generation processor is combined with a public seed through the public key decoder 320.
Figure 112022025573987-pat00018
In the same way as the key generation process by separating the polynomial matrix into
Figure 112022025573987-pat00019
and errors r, e1, e2. Using NTT core and INTT core and point-wise multiplier
Figure 112022025573987-pat00020
class
Figure 112022025573987-pat00021
The result of the operation is reduced and compressed through reduction and compression processes to finally output the ciphertext.

도 4는 본 발명의 일 실시예에 따른 복호화 프로세서를 나타내는 도면이다. 4 is a diagram illustrating a decoding processor according to an embodiment of the present invention.

본 발명의 실시예에 따른 복호화 프로세서는 암호문 디컴프레스(Decompress)(410), 비밀키 디코더(Decoder)(420), NTT 코어(430), 포인트-와이즈 곱셈기 및 뺄셈기(440, 460) 및 메시지 디코더(Decoder)(470)를 포함한다. The decryption processor according to an embodiment of the present invention includes a ciphertext decompress (Decompress) 410, a secret key decoder (Decoder) 420, an NTT core 430, a point-wise multiplier and subtractor (440, 460) and a message It includes a decoder (Decoder) 470 .

본 발명의 실시예에 따른 암호문 디컴프레스(410)는 압축된 암호문을 수신하여 복호화 연산에 사용 가능하도록 데이터의 압축을 해제한다.The ciphertext decompression 410 according to an embodiment of the present invention receives the compressed ciphertext and decompresses the data so that it can be used for a decryption operation.

본 발명의 실시예에 따른 비밀키 디코더(420)는 비밀키를 수신하여 암호화에 적합하게 데이터를 역-직렬화(De-Serialize)한다.The secret key decoder 420 according to an embodiment of the present invention receives the secret key and de-serializes data suitable for encryption.

본 발명의 실시예에 따른 NTT 코어(430)는 암호문 디컴프레스(410)의 출력을 입력 받아 NTT 연산을 수행한다. The NTT core 430 according to an embodiment of the present invention receives the output of the ciphertext decompression 410 and performs an NTT operation.

본 발명의 실시예에 따른 포인트-와이즈 곱셈기 및 뺄셈기(440, 460)는 복호화 연산에 필요한 행렬 곱셈연산을 위해 베이스 곱셈기와 누산기를 포함한다. The point-wise multipliers and subtractors 440 and 460 according to an embodiment of the present invention include a base multiplier and an accumulator for a matrix multiplication operation necessary for a decoding operation.

본 발명의 실시예에 따른 INTT 코어(450)는 포인트-와이즈 곱셈기(440)를 통해 연산된 값을 입력 받아 역-NTT 연산을 수행한다. The INTT core 450 according to an embodiment of the present invention receives a value calculated through the point-wise multiplier 440 and performs an inverse-NTT operation.

본 발명의 실시예에 따른 메시지 디코더(470)는 연산된 결과로 얻은 메시지의 마스크를 뺄셈기(460)를 통해 제거하여 원본 메시지를 최종 출력한다. The message decoder 470 according to the embodiment of the present invention removes the mask of the message obtained as a result of the operation through the subtractor 460 to finally output the original message.

본 발명의 실시예에 따르면, 복호화 프로세서는 암호문과 비밀키를 입력으로 받아 원래의 메시지로 복호화하는 과정으로 암호문 디컴프레스(410)를 통해 압축을 해제한 u, v와 디코더를 통해 역-직렬화(De-Serialize) 과정을 거친

Figure 112022025573987-pat00022
를 이용하여 NTT 도메인에서
Figure 112022025573987-pat00023
연산을 수행하고 얻어진 결과를 메시지 디코더(470)를 이용하여 마스킹된 메시지를 복원하여 원본 메시지를 출력하게 된다. According to an embodiment of the present invention, the decryption processor receives the ciphertext and the secret key as inputs and decrypts the original message. De-serialization ( De-Serialize)
Figure 112022025573987-pat00022
in the NTT domain using
Figure 112022025573987-pat00023
The original message is output by restoring the masked message using the message decoder 470 based on the result obtained by performing the operation.

도 5는 본 발명의 일 실시예에 따른 모듈-LWE 기반 암복호화 시스템의 암호화 방법을 설명하기 위한 흐름도이다. 5 is a flowchart illustrating an encryption method of a module-LWE-based encryption/decryption system according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 양자내성암호를 위한 모듈-LWE 기반 암호 프로세서 시스템의 키생성 프로세서(Key Generator Processor), 암호화 프로세서(Encryptor Processor) 및 복호화 프로세서(Decryptor Processor)는 도 5의 단계들(510~530)을 수행하기 위해 구성될 수 있다. A key generator processor, an encryption processor, and a decryptor processor of the module-LWE-based cryptographic processor system for quantum resistant cryptography according to an embodiment of the present invention are performed in the steps of FIG. 5 ( 510 to 530).

단계(510)에서, 키생성 프로세서가 PRNG 코어로 생성한 난수들을 거부 샘플러 및 이항 샘플러를 통해 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어를 통해 NTT 도메인으로 변환한 후 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 인코더를 이용하여 암호화 프로세서 및 복호화 프로세서에서 사용하기 위한 공개키 및 비밀키로 인코딩하여 출력한다. In step 510, the key generation processor generates a polynomial matrix and an error vector through a rejection sampler and a binomial sampler for random numbers generated by the PRNG core, and after converting the generated error vector into an NTT domain through the NTT core, point- An operation is performed using a Wise multiplier and an adder, and the operation result is encoded with a public key and a private key for use in an encryption processor and a decryption processor using an encoder and output.

단계(520)에서, 암호화 프로세서가 사용자가 암호화 하고자 하는 메시지와 상기 키생성 프로세서로부터 공개키를 수신하여 상기 메시지를 인코딩하고, 상기 공개키를 디코딩하여 거부 샘플러와 이항 샘플러를 통해 암호화에 필요한 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 컴프레스를 이용하여 암호문을 압축 및 인코딩하여 출력한다. In step 520, the cryptographic processor receives the message the user wants to encrypt and the public key from the key generation processor, encodes the message, decodes the public key, and a polynomial matrix required for encryption through a reject sampler and a binary sampler. and error vectors are generated, and the generated error vectors are operated using a point-wise multiplier and an adder in the NTT domain through the NTT core and INTT core, and the result of the operation is compressed and encoded using a compression. print out

단계(530)에서, 복호화 프로세서 상기 암호화 프로세서로부터 암호문을 수신하여 디컴프레스를 통해 암호문의 압축 해제 및 디코딩을 수행하고, 상기 키생성 프로세서로부터 비밀키를 수신하여 디코딩을 수행하고, NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 뺄셈기를 이용하여 연산을 수행하고, 연산 결과는 메시지 디코더를 이용하여 원본 메시지를 출력한다. In step 530, the decryption processor receives the ciphertext from the cryptographic processor and performs decompression and decoding of the ciphertext through decompression, receives the secret key from the key generation processor to perform decoding, NTT core and INTT core In the NTT domain, an operation is performed using a point-wise multiplier and a subtractor, and the operation result outputs an original message using a message decoder.

도 6은 본 발명의 일 실시예에 따른 PRNG 코어를 나타내는 도면이다.6 is a diagram illustrating a PRNG core according to an embodiment of the present invention.

본 발명의 실시예에 따른 PRNG 코어는 Keccak 알고리즘을 사용하며 SHA3-512, SHAKE-128, SHAKE-256이 가능하도록 하며 샘플링의 입력 비트에 따라 출력 비트의 길이 조정이 가능하다. The PRNG core according to the embodiment of the present invention uses the Keccak algorithm and enables SHA3-512, SHAKE-128, and SHAKE-256, and the length of the output bit can be adjusted according to the input bit of sampling.

도 7은 본 발명의 일 실시예에 따른 거부 샘플러를 나타내는 도면이다. 7 is a diagram illustrating a rejection sampler according to an embodiment of the present invention.

본 발명의 실시예에 따른 거부 샘플러는 PRNG 코어의 출력을 16비트 단위로 입력으로 받아 균일한 임의의 정수 modulo q 를 생성하는 모듈로 19q보다 작은 값을 통과시켜 바렛 리덕션을 수행한다. The rejection sampler according to an embodiment of the present invention receives the output of the PRNG core in 16-bit units as an input and passes a value smaller than 19q as a modulo that generates a uniform arbitrary integer modulo q to perform Barrett reduction.

본 발명의 실시예에 따르면, 해당 동작을 파라미터 n = 256, k = 4 에 따라 256개씩 4Х4=16번 거부 샘플링을 반복하여 다항식 행렬을 샘플링 한다.According to the embodiment of the present invention, the polynomial matrix is sampled by repeating reject sampling 4Х4 = 16 times by 256 according to the parameters n = 256 and k = 4 in the corresponding operation.

도 8은 본 발명의 일 실시예에 따른 이항 샘플러를 나타내는 도면이다. 8 is a diagram illustrating a binomial sampler according to an embodiment of the present invention.

본 발명의 실시예에 따른 이항 샘플러는 PRNG 코어의 출력을 8비트 단위로 입력 받아서 중심이항분포(Centered Binomial Distribution)에 따라 계수(Coefficients) 값을 생성한다. 출력되는 계수 값의 범위는 -2~2사이의 값이 출력된다. The binomial sampler according to an embodiment of the present invention receives the output of the PRNG core in units of 8 bits and generates coefficient values according to a Centered Binomial Distribution. In the range of the output coefficient value, a value between -2 and 2 is output.

도 9는 본 발명의 일 실시예에 따른 2-병렬 NTT 코어를 나타내는 도면이다. 9 is a diagram illustrating a two-parallel NTT core according to an embodiment of the present invention.

본 발명의 실시예에 따르면, 모든 데이터는 2-병렬 구조로 연산을 수행하며, NTT 코어는 총 7개의 스테이지(stage)로 구성되어 있으며, 각각의 스테이지는 PE(Processing Element)로 구성되어 있다. According to an embodiment of the present invention, all data is operated in a two-parallel structure, and the NTT core is composed of a total of 7 stages, and each stage is composed of a processing element (PE).

도 10은 본 발명의 일 실시예에 따른 NTT 코어의 PE(Processing Element)를 나타내는 도면이다.10 is a view showing a PE (Processing Element) of the NTT core according to an embodiment of the present invention.

본 발명의 실시예에 따른 NTT의 PE는 곱셈기, 몽고메리 리덕션(Modulo Reduction1; MR1), 바렛 리덕션(Modulo Reduction2; MR2)과 버터플라이 유닛(Butterfly Unit; BU)으로 이루어져 있으며, PE의 입력 값과 ROM에 저장된

Figure 112022025573987-pat00024
(zeta)값과 곱셈 연산 후에 순서대로 몽고메리 리덕션, 버터플라이 유닛 연산, 바렛 리덕션 연산을 수행하여 출력한다. 출력 값은 최종적으로 바렛 리덕션으로 인해 0~q사이의 값을 출력한다.PE of NTT according to an embodiment of the present invention consists of a multiplier, Montgomery reduction (Modulo Reduction1; MR1), Barrett reduction (Modulo Reduction2; MR2), and a butterfly unit (Butterfly Unit; BU), and the input value of the PE and the ROM stored in
Figure 112022025573987-pat00024
After the (zeta) value and multiplication operation, Montgomery reduction, butterfly unit operation, and Barrett reduction operation are performed in order and output. The output value finally outputs a value between 0 and q due to Barrett reduction.

도 11은 본 발명의 일 실시예에 따른 2-병렬 INTT 코어를 나타내는 도면이다. 11 is a diagram illustrating a two-parallel INTT core according to an embodiment of the present invention.

본 발명의 실시예에 따르면, 모든 데이터는 2-병렬 구조로 연산을 수행하며, INTT 코어는 총 7개의 스테이지로 구성되어 있고, 각각의 스테이지는 PE(Processing Element)로 구성되어 있다. According to an embodiment of the present invention, all data is operated in a two-parallel structure, the INTT core is composed of a total of 7 stages, and each stage is composed of a processing element (PE).

도 12는 본 발명의 일 실시예에 따른 INTT 코어의 PE(Processing Element)를 나타내는 도면이다. 12 is a diagram illustrating a processing element (PE) of an INTT core according to an embodiment of the present invention.

본 발명의 실시예에 따른 INTT의 PE는 곱셈기, 몽고메리 리덕션, 바렛 리덕션과 버터플라이 유닛으로 이루어져 있다. INTT의 PE는 NTT의 PE와는 반대되는 구조로 입력 값을 버터플라이 유닛과 바렛 리덕션 연산한 값을 ROM에 저장된

Figure 112022025573987-pat00025
(zeta)값과 곱셈연산 후에 몽고메리 리덕션 연산을 수행하여 출력한다. The PE of the INTT according to the embodiment of the present invention consists of a multiplier, Montgomery reduction, Barrett reduction and a butterfly unit. The PE of INTT has a structure opposite to that of the PE of NTT.
Figure 112022025573987-pat00025
After the (zeta) value and multiplication operation, Montgomery reduction operation is performed and output.

도 13은 본 발명의 일 실시예에 따른 몽고메리(Montgomery) 리덕션 연산을 수행하는 MR1(Modulo Reduction 1)를 나타내는 도면이다. 13 is a diagram illustrating a Modulo Reduction 1 (MR1) that performs a Montgomery reduction operation according to an embodiment of the present invention.

본 발명의 실시예에 따르면 MR1은 곱셈으로 인해 커진 값을 줄여주기 위해 사용한다. 입력에 대해

Figure 112022025573987-pat00026
값인 -q+1 ~ q-1 사이의 값을 출력한다. 여기서 파라미터 q와 같이 사용되는 Inverse q 값은
Figure 112022025573987-pat00027
값인 62209를 사용한다. According to an embodiment of the present invention, MR1 is used to reduce a value increased due to multiplication. about input
Figure 112022025573987-pat00026
The value between -q+1 and q-1 is output. Here, the Inverse q value used with the parameter q is
Figure 112022025573987-pat00027
The value 62209 is used.

도 14는 본 발명의 일 실시예에 따른 바렛(Barrett) 리덕션 연산을 수행하는 MR2(Modulo Reduction 2)를 나타내는 도면이다. 14 is a diagram illustrating a Modulo Reduction 2 (MR2) that performs a Barrett reduction operation according to an embodiment of the present invention.

본 발명의 실시예에 따른 MR2는 덧셈 연산으로 커진 결과를 환(Ring) 내의 값으로 줄여 주기 위해 바렛 리덕션을 수행한다. 입력에 대해 a modulo q 값인 0 ~ q 사이의 값을 출력한다. 여기서 사용되는 v는

Figure 112022025573987-pat00028
인 20159를 사용한다. MR2 according to an embodiment of the present invention performs Barrett reduction in order to reduce a result increased by an addition operation to a value in a ring. For the input, it outputs a value between 0 and q, which is a modulo q value. v used here is
Figure 112022025573987-pat00028
in 20159 is used.

도 15는 본 발명의 일 실시예에 따른 인코더를 나타내는 도면이다. 15 is a diagram illustrating an encoder according to an embodiment of the present invention.

본 발명의 실시예에 따른 인코더는 연산된 결과를 8비트 단위로 직렬화하여 공개키 및 비밀키로 인코딩하는데 사용된다. The encoder according to an embodiment of the present invention serializes the calculated result in 8-bit units and is used to encode the public key and the private key.

도 16은 본 발명의 일 실시예에 따른 디코더를 나타내는 도면이다. 16 is a diagram illustrating a decoder according to an embodiment of the present invention.

본 발명의 실시예에 따른 디코더는 인코딩된 공개키 및 비밀키를 13비트 단위로 역-직렬화(De-Serialization) 하여 암호화 및 비밀키의 연산에 사용 가능하도록 디코딩하는데 사용된다. The decoder according to the embodiment of the present invention is used to decode the encoded public and private keys by de-serializing them in 13-bit units to be usable for encryption and operation of the private key.

도 17은 본 발명의 일 실시예에 따른 컴프레스를 나타내는 도면이다.17 is a view showing a compression according to an embodiment of the present invention.

본 발명의 실시예에 따른 컴프레스는 암호화 프로세서 내의 연산 결과를 CE(Compress Element) 연산을 수행하고 8비트 단위로 직렬화를 통해 암호문의 크기를 압축하고 인코딩하는 역할을 수행한다. Compress according to an embodiment of the present invention performs a CE (Compress Element) operation on the operation result in the cryptographic processor, and serves to compress and encode the size of the ciphertext through serialization in 8-bit units.

도 18은 본 발명의 일 실시예에 따른 컴프레스의 CE(Compress Element)를 나타내는 도면이다. 18 is a view showing a Compression Element (CE) of a compressor according to an embodiment of the present invention.

본 발명의 실시예에 따른 CE는 입력의 <<3에 대해 q/2 값인 1664를 더해주고 q로 나눈 결과를 하위 5비트만을 사용하여 출력하는 구조를 가지고 있다. 여기서 나눗셈은 많은 연산 시간과 자원을 소모하기 때문에 바렛 리덕션 알고리즘을 이용하여 계산한다. CE according to an embodiment of the present invention has a structure in which 1664, which is a q/2 value, is added to <<3 of the input and the result obtained by dividing by q is output using only the lower 5 bits. Here, since division consumes a lot of computation time and resources, it is calculated using the Barrett reduction algorithm.

도 19는 본 발명의 일 실시예에 따른 디컴프레스를 나타내는 도면이다. 19 is a diagram illustrating a decompression according to an embodiment of the present invention.

본 발명의 실시예에 따른 디컴프레스는 수신 받은 암호문을 역-직렬화하고 각각 DE(Decompress Element) 연산을 수행하여 복호화 연산이 가능하도록 압축을 해제하고 디코딩하는 역할을 수행한다. The decompression according to the embodiment of the present invention de-serializes the received ciphertext and performs a decompression element (DE) operation to decompress and decode the received ciphertext so that the decryption operation is possible.

도 20은 본 발명의 일 실시예에 따른 디컴프레스의 DE(Decompress Element)를 나타내는 도면이다. 20 is a diagram illustrating a Decompress Element (DE) of a decompression according to an embodiment of the present invention.

본 발명의 실시예에 따른 DE는 입력에 대해 q를 곱해주고 16을 더해준 값을 하위 5비트만을 출력하는 구조로 되어있다. DE according to an embodiment of the present invention has a structure in which the input is multiplied by q and the value obtained by adding 16 is outputted with only the lower 5 bits.

도 21은 본 발명의 일 실시예에 따른 메시지 인코더를 나타내는 도면이다. 21 is a diagram illustrating a message encoder according to an embodiment of the present invention.

본 발명의 실시예에 따른 메시지 인코더는 사용자가 입력한 256비트의 메시지를 1비트 단위로 메시지 인코더에서 (q+1)/2 로 마스킹하여 13비트로 인코딩하여 암호화에 사용된다. The message encoder according to an embodiment of the present invention encodes a 256-bit message input by a user by masking it with (q+1)/2 in the message encoder in 1-bit units, and encodes it into 13 bits, and is used for encryption.

도 22는 본 발명의 일 실시예에 따른 메시지 디코더를 나타내는 도면이다. 22 is a diagram illustrating a message decoder according to an embodiment of the present invention.

본 발명의 실시예에 따른 메시지 디코더는 사용자가 복호화 연산을 수항하여 마스킹된 메시지를 원래의 사용자가 입력한 메시지로 디코딩을 수행한다. 입력에 대해 <<1 값에 q/2인 1664를 더해주고 q로 나눈 결과를 하위 1비트만을 출력한다. 총 256번 수행하여 사용자가 입력한 원래 256비트를 출력한다. The message decoder according to the embodiment of the present invention decodes the masked message into the message originally input by the user by performing the decoding operation by the user. For the input, add 1664, which is q/2, to the value of <<1, and output only the lower 1 bit of the result of dividing by q. It executes a total of 256 times and outputs the original 256 bits input by the user.

도 23은 본 발명의 일 실시예에 따른 베이스 곱셈기(Base multiplier)를 나타내는 도면이다. 23 is a diagram illustrating a base multiplier according to an embodiment of the present invention.

본 발명의 실시예에 따른 베이스 곱셈기는 포인트-와이즈 곱셈기의 하위 모듈로 사용된다. 곱셈을 수행할 각 다항식으로부터 두 개씩 입력으로 받아 Bow-tie 곱셈을 수행한다. 베이스 곱셈기의 연산 과정은 수학식 4와 같이 쓸 수 있다: The base multiplier according to the embodiment of the present invention is used as a sub-module of the point-wise multiplier. Bow-tie multiplication is performed by receiving two input from each polynomial to be multiplied. The operation process of the base multiplier can be written as Equation 4:

Figure 112022025573987-pat00029
수학식4-1
Figure 112022025573987-pat00029
Equation 4-1

Figure 112022025573987-pat00030
수학식4-2
Figure 112022025573987-pat00030
Equation 4-2

곱셈 연산으로 인해 커지는 값은 몽고메리 리덕션 모듈인 MR1을 사용하여 줄여 주고 16비트의 크기로 출력하게 된다. The value that increases due to the multiplication operation is reduced using MR1, a Montgomery reduction module, and output in 16-bit size.

도 24는 본 발명의 일 실시예에 따른 누산기(Accumulator)를 나타내는 도면이다. 24 is a diagram illustrating an accumulator according to an embodiment of the present invention.

본 발명의 실시예에 따른 누산기는 포인트-와이즈 곱셈기의 하위 모듈로 사용된다. 모듈-LWE 문제에 기반한 암호는 다항식 행렬의 곱셈에 기반하기 때문에 행렬의 곱셈 방식에 따라 곱셈 연산을 수행한 후에 각 다항식 열을 더해주는 역할을 수행한다. The accumulator according to an embodiment of the present invention is used as a sub-module of a point-wise multiplier. Since the cipher based on the module-LWE problem is based on multiplication of a polynomial matrix, it plays a role of adding each polynomial column after performing a multiplication operation according to the multiplication method of the matrix.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPA(field programmable array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다.  또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다.  이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다.  예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다.  또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The device described above may be implemented as a hardware component, a software component, and/or a combination of the hardware component and the software component. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable array (FPA), It may be implemented using one or more general purpose or special purpose computers, such as a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For convenience of understanding, although one processing device is sometimes described as being used, one of ordinary skill in the art will recognize that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that may include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다.  소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다.  소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may comprise a computer program, code, instructions, or a combination of one or more thereof, which configures a processing device to operate as desired or is independently or collectively processed You can command the device. The software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or device, to be interpreted by or to provide instructions or data to the processing device. may be embodied in The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored in one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다.  상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다.  상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다.  컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다.  프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.  The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic such as floppy disks. - includes magneto-optical media, and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다.  예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with reference to the limited embodiments and drawings, various modifications and variations are possible by those skilled in the art from the above description. For example, the described techniques are performed in a different order than the described method, and/or the described components of the system, structure, apparatus, circuit, etc. are combined or combined in a different form than the described method, or other components Or substituted or substituted by equivalents may achieve an appropriate result.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (10)

PRNG 코어에서 생성한 난수들을 거부 샘플러 및 이항 샘플러를 통해 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어를 통해 NTT 도메인으로 변환한 후 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 인코더를 이용하여 암호화 프로세서 및 복호화 프로세서에서 사용하기 위한 공개키 및 비밀키로 인코딩하여 출력하는 키생성 프로세서;
사용자가 암호화 하고자 하는 메시지와 상기 키생성 프로세서로부터 공개키를 수신하여 상기 메시지를 인코딩하고, 상기 공개키를 디코딩하여 거부 샘플러와 이항 샘플러를 통해 암호화에 필요한 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 컴프레스를 이용하여 암호문을 압축 및 인코딩하여 출력하는 암호화 프로세서; 및
상기 암호화 프로세서로부터 암호문을 수신하여 디컴프레스를 통해 암호문의 압축 해제 및 디코딩을 수행하고, 상기 키생성 프로세서로부터 비밀키를 수신하여 디코딩을 수행하고, NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 뺄셈기를 이용하여 연산을 수행하고, 연산 결과는 메시지 디코더를 이용하여 원본 메시지를 출력하는 복호화 프로세서
를 포함하고,
상기 암호화 프로세서는,
사용자가 입력한 메시지를 1비트 단위로 마스킹하는 메시지 인코더;
공개키를 수신하여 공개키를 역-직렬화하는 공개키 디코더;
공개키 디코더의 출력을 입력 받아 공개키 생성과 암호화에 필요한 다항식 행렬을 생성하는 거부 샘플러;
비밀키 생성과 암호화에 필요한 에러 계수를 생성하는 이항 샘플러;
이항 샘플러의 출력을 입력 받아 NTT 연산을 수행하는 NTT 코어;
거부 샘플러와 이항 샘플러의 값을 연산하는 포인트-와이즈 곱셈기 및 덧셈기;
포인트-와이즈 곱셈기를 통해 연산된 값을 입력 받아 역-NTT 연산을 수행하는 INTT 코어;
곱셈 연산 결과에 대해 몽고메리 리덕션 연산을 수행하는 MR1;
덧셈 연산 결과에 대해 바렛 리덕션 연산을 수행하는 MR2; 및
리덕션된 데이터를 압축 및 인코딩하여 암호문으로 출력하는 컴프레스
를 포함하는 암호 프로세서 시스템.
Polynomial matrix and error vector are generated from random numbers generated by PRNG core through rejection sampler and binomial sampler, and the generated error vector is converted into NTT domain through NTT core, and then operation is performed using point-wise multiplier and adder. and a key generation processor for encoding and outputting the operation result with a public key and a private key for use in an encryption processor and a decryption processor using an encoder;
The message the user wants to encrypt and the public key are received from the key generation processor, the message is encoded, the public key is decoded, and a polynomial matrix and error vector required for encryption are generated through a reject sampler and a binary sampler, and the generated A cryptographic processor that performs an error vector operation using a point-wise multiplier and an adder in the NTT domain through the NTT core and the INTT core, and outputs the result by compressing and encoding the ciphertext using a compressor; and
Receive the ciphertext from the cryptographic processor and perform decompression and decoding of the ciphertext through decompression, receive the secret key from the key generation processor to perform decoding, and point-wise in the NTT domain through the NTT core and the INTT core A decoding processor that performs an operation using a multiplier and a subtractor, and outputs an original message using a message decoder for the result of the operation
including,
The cryptographic processor,
a message encoder for masking a message input by a user in 1-bit units;
a public key decoder for receiving the public key and deserializing the public key;
a rejection sampler that receives the output of the public key decoder and generates a polynomial matrix required for public key generation and encryption;
a binary sampler that generates error coefficients necessary for secret key generation and encryption;
an NTT core that receives the output of the binary sampler and performs an NTT operation;
point-wise multipliers and adders that compute the values of reject samplers and binary samplers;
an INTT core that receives a value calculated through a point-wise multiplier and performs an inverse-NTT operation;
MR1 that performs a Montgomery reduction operation on the result of the multiplication operation;
MR2 that performs a Barrett reduction operation on the result of the addition operation; and
Compression that compresses and encodes the reduced data and outputs it as ciphertext
Cryptographic processor system comprising a.
제1항에 있어서,
상기 키생성 프로세서는,
의사난수를 생성하는 PRNG 코어;
PRNG 코어에서 생성한 의사난수를 이용하여 공개키 생성 및 암호화에 필요한 다항식 행렬을 생성하는 거부 샘플러;
PRNG 코어에서 생성한 의사난수를 이용하여 공개키 생성 및 비밀키 생성에 사용하기 위한 에러 계수를 생성하는 이항 샘플러;
이항 샘플러의 출력을 입력 받아 NTT 연산을 수행하는 NTT 코어;
연산 과정에 사용되는 포인트-와이즈 곱셈기 및 덧셈기; 및
연산된 결과를 직렬화하는 비밀키 인코더
를 포함하는 암호 프로세서 시스템.
According to claim 1,
The key generation processor,
a PRNG core that generates pseudo-random numbers;
a rejection sampler that generates a polynomial matrix necessary for public key generation and encryption using the pseudorandom number generated by the PRNG core;
a binary sampler that generates an error coefficient for use in public key generation and private key generation using the pseudo-random number generated by the PRNG core;
an NTT core that receives the output of the binary sampler and performs an NTT operation;
point-wise multipliers and adders used in the arithmetic process; and
A secret-key encoder that serializes the computed result.
Cryptographic processor system comprising a.
삭제delete 제1항에 있어서,
상기 복호화 프로세서는,
암호문을 수신하여 압축 해제 및 디코딩하는 암호문 디컴프레스;
비밀키를 수신하여 비밀키를 역-직렬화하는 비밀키 디코더;
암호문 디컴프레스의 출력을 입력 받아 NTT 연산을 수행하는 NTT 코어;
복호화 연산에 필요한 포인트-와이즈 곱셈기 및 뺄셈기;
포인트-와이즈 곱셈기를 통해 연산된 값을 입력 받아 역-NTT 연산을 수행하는 INTT 코어;
곱셈 연산 결과에 대해 몽고메리 리덕션 연산을 수행하는 MR1;
덧셈 연산 결과에 대해 바렛 리덕션 연산을 수행하는 MR2; 및
연산된 결과로 얻은 메시지의 마스크를 제거하는 메시지 디코더
를 포함하는 암호 프로세서 시스템.
According to claim 1,
The decryption processor,
ciphertext decompression for receiving ciphertext, decompressing and decoding ciphertext;
a secret key decoder for receiving the secret key and deserializing the secret key;
NTT core that receives the output of ciphertext decompression and performs NTT operation;
point-wise multipliers and subtractors required for decoding operations;
an INTT core that receives a value calculated through a point-wise multiplier and performs an inverse-NTT operation;
MR1 that performs a Montgomery reduction operation on the result of the multiplication operation;
MR2 that performs a Barrett reduction operation on the result of the addition operation; and
A message decoder that removes the mask of the message obtained as a result of the operation.
Cryptographic processor system comprising a.
제1항에 있어서,
상기 PRNG 코어는 Keccak 알고리즘을 사용하는 SHA3로 샘플링의 입력 비트에 따라 출력 비트의 길이를 조정하고,
상기 거부 샘플러는 상기 PRNG 코어의 출력을 16비트 단위로 입력 받아 균일한 임의의 정수 modulo q 를 생성하는 모듈로서 19q보다 작은 값을 통과시켜 바렛 리덕션을 수행하도록 하고,
상기 이항 샘플러는 상기 PRNG 코어의 출력을 8비트 단위로 입력 받아 중심이항분포에 따라 계수 값을 생성하고,
상기 NTT 코어는 2-병렬 NTT 코어로서 총 7개의 스테이지(stage)를 포함하고, 각각의 스테이지는 PE(Processing Element)로 구성되고,
상기 포인트-와이즈 곱셈기는 베이스 곱셈기 및 누산기를 포함하는
암호 프로세서 시스템.
According to claim 1,
The PRNG core adjusts the length of the output bit according to the input bit of sampling with SHA3 using the Keccak algorithm,
The rejection sampler is a module that receives the output of the PRNG core in 16-bit units and generates a uniform arbitrary integer modulo q, and passes a value smaller than 19q to perform Barrett reduction,
The binomial sampler receives the output of the PRNG core in units of 8 bits and generates coefficient values according to a central binomial distribution,
The NTT core is a 2-parallel NTT core and includes a total of 7 stages, each stage is composed of a PE (Processing Element),
The point-wise multiplier includes a base multiplier and an accumulator.
Cryptographic processor system.
제5항에 있어서,
상기 NTT 코어의 상기 PE는 입력 값과 ROM에 저장된 값과 곱셈연산 후 순서대로 몽고메리 리덕션, BU 연산, 바렛 리덕션 연산을 수행하여 출력하는
암호 프로세서 시스템.
6. The method of claim 5,
The PE of the NTT core performs the Montgomery reduction, the BU operation, and the Barrett reduction operation in order after the multiplication operation with the input value and the value stored in the ROM to output
Cryptographic processor system.
제6항에 있어서,
상기 INTT 코어의 PE는 NTT 코어의 PE와 반대되는 구조를 갖고 입력 값을 BU와 바렛 리덕션 연산한 값을 ROM에 저장된 값과 곱셈 연산 후 몽고메리 리덕션 연산을 수행하여 출력하는
암호 프로세서 시스템.
7. The method of claim 6,
PE of the INTT core has a structure opposite to that of the PE of the NTT core, and the input value is calculated by multiplying the input value with the value stored in the ROM by performing the Montgomery reduction operation.
Cryptographic processor system.
제5항에 있어서,
상기 베이스 곱셈기는 곱셈을 수행할 각각의 다항식으로부터 두 개씩 입력으로 받아 Bow-tie 곱셈을 수행하고,
상기 누산기는 행렬의 곱셈 방식에 따라 곱셈 연산을 수행한 후 각각의 다항식 열을 더해주는 역할을 수행하는
암호 프로세서 시스템.
6. The method of claim 5,
The base multiplier receives two inputs from each polynomial to be multiplied and performs Bow-tie multiplication,
The accumulator performs a multiplication operation according to a matrix multiplication method and then adds each polynomial column.
Cryptographic processor system.
제1항에 있어서,
상기 MR1은 몽고메리 리덕션을 통해 곱셈으로 커진 연산 결과를 줄이기 위해 NTT 코어 및 포인트-와이즈 곱셈기에 사용되고,
MR2은 바렛 리덕션을 통해 덧셈으로 커진 연산 결과를 줄이기 위해 사용되는
암호 프로세서 시스템.
According to claim 1,
The MR1 is used in an NTT core and a point-wise multiplier to reduce an operation result that is increased by multiplication through Montgomery reduction,
MR2 is used to reduce the operation result that is increased by addition through Barrett reduction.
Cryptographic processor system.
키생성 프로세서가 PRNG 코어로 생성한 난수들을 거부 샘플러 및 이항 샘플러를 통해 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어를 통해 NTT 도메인으로 변환한 후 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 인코더를 이용하여 암호화 프로세서 및 복호화 프로세서에서 사용하기 위한 공개키 및 비밀키로 인코딩하여 출력하는 단계;
암호화 프로세서가 사용자가 암호화 하고자 하는 메시지와 상기 키생성 프로세서로부터 공개키를 수신하여 상기 메시지를 인코딩하고, 상기 공개키를 디코딩하여 거부 샘플러와 이항 샘플러를 통해 암호화에 필요한 다항식 행렬과 에러 벡터를 생성하고, 생성된 에러 벡터를 NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 덧셈기를 이용하여 연산을 수행하고, 연산 결과는 컴프레스를 이용하여 암호문을 압축 및 인코딩하여 출력하는 단계; 및
복호화 프로세서 상기 암호화 프로세서로부터 암호문을 수신하여 디컴프레스를 통해 암호문의 압축 해제 및 디코딩을 수행하고, 상기 키생성 프로세서로부터 비밀키를 수신하여 디코딩을 수행하고, NTT 코어 및 INTT 코어를 통해 NTT 도메인에서 포인트-와이즈 곱셈기와 뺄셈기를 이용하여 연산을 수행하고, 연산 결과는 메시지 디코더를 이용하여 원본 메시지를 출력하는 단계
를 포함하고,
상기 암호화 프로세서가 암호문을 압축 및 인코딩하여 출력하는 단계는,
메시지 인코더를 통해 사용자가 입력한 메시지를 1비트 단위로 마스킹하고;
공개키 디코더를 통해 공개키를 수신하여 공개키를 역-직렬화하고;
거부 샘플러를 통해 공개키 디코더의 출력을 입력 받아 공개키 생성과 암호화에 필요한 다항식 행렬을 생성하고;
이항 샘플러를 통해 비밀키 생성과 암호화에 필요한 에러 계수를 생성하고;
NTT 코어를 통해 이항 샘플러의 출력을 입력 받아 NTT 연산을 수행하고;
포인트-와이즈 곱셈기 및 덧셈기를 통해 거부 샘플러와 이항 샘플러의 값을 연산하고;
INTT 코어를 통해 상기 포인트-와이즈 곱셈기를 통해 연산된 값을 입력 받아 역-NTT 연산을 수행하고;
MR1를 통해 상기 곱셈 연산 결과에 대해 몽고메리 리덕션 연산을 수행하고;
MR2를 통해 상기 덧셈 연산 결과에 대해 바렛 리덕션 연산을 수행하고;
컴프레스를 통해 상기 리덕션된 데이터를 압축 및 인코딩하여 암호문으로 출력하는
암호화 방법.
A polynomial matrix and an error vector are generated from the random numbers generated by the key generation processor with the PRNG core through the reject sampler and the binomial sampler, and the generated error vector is converted into the NTT domain through the NTT core, and then the point-wise multiplier and adder are used. performing an operation, and encoding the operation result using a public key and a private key for use in an encryption processor and a decryption processor by using an encoder;
The cryptographic processor receives the message the user wants to encrypt and the public key from the key generation processor, encodes the message, and decodes the public key to generate a polynomial matrix and an error vector required for encryption through a reject sampler and a binary sampler, , performing an operation on the generated error vector using a point-wise multiplier and an adder in the NTT domain through the NTT core and the INTT core, and the operation result is output by compressing and encoding the ciphertext using a compression; and
Decryption processor Receives ciphertext from the cryptographic processor and performs decompression and decoding of ciphertext through decompression, receives a secret key from the key generation processor to perform decoding, and points in NTT domain through NTT core and INTT core - A step of performing an operation using a Wise multiplier and a subtractor, and outputting the original message using a message decoder for the result of the operation
including,
The step of the cryptographic processor compressing and encoding the ciphertext and outputting it,
Masking the message input by the user through the message encoder in 1-bit units;
receiving the public key through the public key decoder to deserialize the public key;
receiving the output of the public key decoder through the rejection sampler and generating a polynomial matrix required for public key generation and encryption;
generate error coefficients necessary for secret key generation and encryption through a binary sampler;
receiving the output of the binary sampler through the NTT core and performing an NTT operation;
compute the values of the reject sampler and the binary sampler through a point-wise multiplier and adder;
receiving the value calculated through the point-wise multiplier through the INTT core and performing an inverse-NTT operation;
performing a Montgomery reduction operation on the multiplication operation result through MR1;
performing a Barrett reduction operation on the result of the addition operation through MR2;
Compressing and encoding the reduced data through compression and outputting it as cipher text
encryption method.
KR1020220029611A 2022-03-08 2022-03-08 Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography KR102462395B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220029611A KR102462395B1 (en) 2022-03-08 2022-03-08 Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220029611A KR102462395B1 (en) 2022-03-08 2022-03-08 Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography

Publications (1)

Publication Number Publication Date
KR102462395B1 true KR102462395B1 (en) 2022-11-03

Family

ID=84040859

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220029611A KR102462395B1 (en) 2022-03-08 2022-03-08 Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography

Country Status (1)

Country Link
KR (1) KR102462395B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101952547B1 (en) 2018-11-23 2019-02-26 인하대학교 산학협력단 Method and Apparatus for Number Theoretic Transform based Polynomial Multiplier For Lattice based Cryptosystem
KR20210128303A (en) * 2020-04-16 2021-10-26 주식회사 크립토랩 Method for encrypting or decrypting message by space complexity
KR20210130196A (en) * 2019-02-19 2021-10-29 메사추세츠 인스티튜트 오브 테크놀로지 Configurable Lattice Cryptographic Processor and Related Techniques for Quantum-Secure Internet of Things

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101952547B1 (en) 2018-11-23 2019-02-26 인하대학교 산학협력단 Method and Apparatus for Number Theoretic Transform based Polynomial Multiplier For Lattice based Cryptosystem
KR20210130196A (en) * 2019-02-19 2021-10-29 메사추세츠 인스티튜트 오브 테크놀로지 Configurable Lattice Cryptographic Processor and Related Techniques for Quantum-Secure Internet of Things
KR20210128303A (en) * 2020-04-16 2021-10-26 주식회사 크립토랩 Method for encrypting or decrypting message by space complexity

Similar Documents

Publication Publication Date Title
Mert et al. Design and implementation of encryption/decryption architectures for BFV homomorphic encryption scheme
Pöppelmann et al. Towards practical lattice-based public-key encryption on reconfigurable hardware
KR101246490B1 (en) A closed galois field cryptographic system
CA2642116C (en) Cryptographic system configured for extending a repetition period of a random sequence
JPH09230786A (en) Encoding method of data and device therefor
JP6305642B2 (en) Message authenticator generating apparatus, message authenticator generating method, and message authenticator generating program
Lee et al. High throughput implementation of post-quantum key encapsulation and decapsulation on GPU for Internet of Things applications
WO2018118660A1 (en) Integrated security and data redundancy
Shantha et al. Analysis and implementation of ECC algorithm in lightweight device
Yevseiev et al. Development of Niederreiter hybrid crypto-code structure on flawed codes
US11496297B1 (en) Low footprint resource sharing hardware architecture for CRYSTALS-Dilithium and CRYSTALS-Kyber
Fritzmann et al. Extending the RISC-V instruction set for hardware acceleration of the post-quantum scheme LAC
JP6916770B2 (en) Concealment calculation device, concealment calculation method and concealment calculation program
KR101445339B1 (en) Integrated cryptographic apparatus for providing confidentiality and integrity
KR102541388B1 (en) Apparatus and method for ring-lwe cryptoprocessor using mdf based ntt
US11477172B2 (en) Securing data compression
KR102462395B1 (en) Module-LWE based Crypto-Processor System and Method for Post-Quantum Cryptography
Zhang et al. Secure binary arithmetic coding based on digitalized modified logistic map and linear feedback shift register
Abdulhameed et al. A lightweight hybrid cryptographic algorithm for WSNs tested by the diehard tests and the raspberry Pi
Dandass Using FPGAs to parallelize dictionary attacks for password cracking
US20130117576A1 (en) Converting apparatus, converting method, and recording medium of converting program
KR102451633B1 (en) Apparatus and Method of Cryptographic Processing for Homomorphic Encryption
Negi et al. Implementation of AES Employing Systolic Array and Pipelining Approach
Kundu et al. On the Masking-Friendly Designs for Post-quantum Cryptography
KR102337865B1 (en) Homomorphic encryption-based arithmetic operation system and arithmetic operation method using the same

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant