KR20200107739A - Apparatus and method for performing matrix multiplication operation being secure against side channel attack - Google Patents

Apparatus and method for performing matrix multiplication operation being secure against side channel attack Download PDF

Info

Publication number
KR20200107739A
KR20200107739A KR1020190122600A KR20190122600A KR20200107739A KR 20200107739 A KR20200107739 A KR 20200107739A KR 1020190122600 A KR1020190122600 A KR 1020190122600A KR 20190122600 A KR20190122600 A KR 20190122600A KR 20200107739 A KR20200107739 A KR 20200107739A
Authority
KR
South Korea
Prior art keywords
matrix
multiplication operation
elements
order
multiplication
Prior art date
Application number
KR1020190122600A
Other languages
Korean (ko)
Other versions
KR102578869B1 (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 KR1020190122600A priority Critical patent/KR102578869B1/en
Priority to US16/664,825 priority patent/US11509460B2/en
Publication of KR20200107739A publication Critical patent/KR20200107739A/en
Application granted granted Critical
Publication of KR102578869B1 publication Critical patent/KR102578869B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • 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/544Methods 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 for evaluating functions by calculation
    • G06F7/5443Sum of products
    • 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/76Arrangements for rearranging, permuting or selecting data according to predetermined rules, independently of the content of the data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/60Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
    • 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/003Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
    • 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/3093Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving Lattices or polynomial equations, e.g. NTRU scheme
    • 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/08Randomization, e.g. dummy operations or using noise

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Algebra (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Evolutionary Computation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Complex Calculations (AREA)

Abstract

Provided are a device for performing a matrix multiplication operation which is safe against side channel attacks and a method thereof. According to an embodiment of the present invention, the method, which is executed in a computing device including at least one processor and a memory for storing at least one program executed by the at least one processor, comprises the following steps of: shuffling an operation order of a multiplication operation between elements of a first matrix and elements of a second matrix for a matrix multiplication operation between a first matrix and a second matrix; and performing the matrix multiplication operation based on the shuffled operation order.

Description

부채널 공격에 안전한 행렬 곱 연산을 수행하기 위한 장치 및 방법{APPARATUS AND METHOD FOR PERFORMING MATRIX MULTIPLICATION OPERATION BEING SECURE AGAINST SIDE CHANNEL ATTACK}Device and method for performing matrix multiplication operation that is safe for side channel attacks {APPARATUS AND METHOD FOR PERFORMING MATRIX MULTIPLICATION OPERATION BEING SECURE AGAINST SIDE CHANNEL ATTACK}

본 발명의 실시예들은 부채널 공격을 방지하기 위한 기술과 관련된다.Embodiments of the present invention relate to techniques for preventing side channel attacks.

현재 사용되고 있는 공개키 암호 RSA(Rivest Shamir Adleman), ECC(Elliptic Curve Cryptography) 등은 큰 수의 소인수분해, 환 또는 유한체 위에서의 이산 로그 문제 등 수학적 난제를 기반으로 한다. 그러나, 양자 컴퓨팅 기술을 통해 현재 사용하는 컴퓨팅 능력으로는 해결하기 어려운 문제를 빠르게 해결할 수 있다. 더욱이 1995년 Shor가 제안한 알고리즘은 양자 컴퓨터 상에서 소인수분해 문제와 이산 로그 문제를 다항식 시간에 풀 수 있다. 이는 현재의 공개키 암호화 체계의 대부분을 깨뜨릴 수 있어 웹 인프라가 의존하는 공개키 인프라를 위험에 빠뜨릴 수 있다는 것을 의미한다. 이러한 위협에 대한 대안으로 양자 내성 암호(Post-Quantum Cryptography, PQC)에 대한 요구가 증가하고 있다. Currently used public key cryptography RSA (Rivest Shamir Adleman), ECC (Elliptic Curve Cryptography), etc. are based on mathematical difficulties such as large number of prime factorizations and discrete logarithm problems on rings or finite fields. However, through quantum computing technology, problems that are difficult to solve with currently used computing capabilities can be quickly solved. Moreover, the algorithm proposed by Shor in 1995 can solve prime factorization problems and discrete logarithm problems in polynomial time on quantum computers. This means that it can break most of the current public key cryptography systems, putting the public key infrastructure on which the web infrastructure depends at risk. As an alternative to this threat, there is an increasing demand for Post-Quantum Cryptography (PQC).

현재 PQC로 제안된 많은 알고리즘이 행렬 연산을 주로 사용하고 있다. 이러한 행렬 연산을 주로 사용하는 이유는 양자 컴퓨터에도 안전한 암호 알고리즘의 설계가 행렬의 곱셈 연산을 수행하여 구성할 수 있기 때문이다. 그러나, 행렬 곱은 단순 전력 분석(Simple Power Analysis, SPA) 공격, 차분 전력 분석(Differential Power Analysis, DPA) 공격, 충돌 공격(Collision Attack) 등과 같은 부채널 공격에 취약하므로, 현재 제시된 행렬 곱을 이용한 PQC 알고리즘들은 모두 부채널 공격에 취약한 상태이다.Currently, many algorithms proposed as PQC mainly use matrix operations. The reason why such matrix operations are mainly used is that the design of a cryptographic algorithm that is safe even for quantum computers can be constructed by performing matrix multiplication operations. However, matrix multiplication is vulnerable to side-channel attacks such as Simple Power Analysis (SPA) attacks, Differential Power Analysis (DPA) attacks, and collision attacks, so the currently proposed PQC algorithm using matrix multiplication They are all vulnerable to side-channel attacks.

한국 공개특허공보 제10-2014-0054647호 (2016.02.02. 등록)Korean Patent Application Publication No. 10-2014-0054647 (registered on February 2, 2016)

본 발명의 실시예들은 부채널 공격에 안전한 행렬 곱 연산을 수행하기 위한 장치 및 방법을 제공하기 위한 것이다.Embodiments of the present invention are to provide an apparatus and method for performing a matrix multiplication operation that is safe for a subchannel attack.

본 발명의 일 실시예에 따른 방법은, 하나 이상의 프로세서, 및 상기 하나 이상의 프로세서에 의해 실행되는 하나 이상의 프로그램을 저장하는 메모리를 구비한 컴퓨팅 장치에서 수행되는 방법으로서, 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링(shuffling)하는 단계; 및 상기 셔플링된 연산 순서에 기초하여 상기 행렬 곱 연산을 수행하는 단계를 포함한다.A method according to an embodiment of the present invention is a method performed in a computing device having at least one processor and a memory for storing at least one program executed by the at least one processor, comprising: a first matrix and a second matrix Shuffling an operation order of a multiplication operation between elements of the first matrix and elements of the second matrix for a matrix multiplication operation of And performing the matrix multiplication operation based on the shuffled operation order.

상기 행렬 곱 연산은, 양자 내성 암호(Post-Quantum Cryptography) 알고리즘에 기초한 암호화 및 복호화 중 적어도 하나를 위해 수행될 수 있다.The matrix multiplication operation may be performed for at least one of encryption and decryption based on a Post-Quantum Cryptography algorithm.

상기 제1 행렬 및 상기 제2 행렬 중 적어도 하나는, 상기 암호화 및 상기 복호화 중 적어도 하나를 수행하기 위해 반복적으로 이용될 수 있다.At least one of the first matrix and the second matrix may be repeatedly used to perform at least one of the encryption and the decryption.

상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.The shuffling may include changing an operation order of a vector multiplication operation for the matrix multiplication operation, and shuffling an operation order of a multiplication operation between the elements of the first matrix and the elements of the second matrix. have.

상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산 중 적어도 하나에 대해 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.The shuffling may include changing an operation order of a multiplication operation between an element of a row vector and an element of a column vector for at least one of the vector multiplication operations for the matrix multiplication operation, and the elements of the first matrix and the An operation order of a multiplication operation between elements of the second matrix may be shuffled.

상기 셔플링하는 단계는, 상기 제1 행렬 및 상기 제2 행렬의 크기에 기초하여 하나 이상의 수열을 생성하고, 상기 하나 이상의 수열에 기초하여 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.The shuffling may include generating one or more sequences based on the sizes of the first matrix and the second matrix, and elements of the first matrix and elements of the second matrix based on the one or more sequences It is possible to shuffle the order of operations of multiplication operations between.

일 실시예에 따른 장치는, 하나 이상의 프로세서; 및 상기 하나 이상의 프로세서에 의해 실행되도록 구성되는 하나 이상의 프로그램을 저장하는 메모리를 포함하는 장치로서, 상기 프로그램은, 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링(shuffling)하는 단계; 및 상기 셔플링된 연산 순서에 기초하여 상기 행렬 곱 연산을 수행하는 단계를 실행하기 위한 명령어들을 포함한다.An apparatus according to an embodiment includes: one or more processors; And a memory storing one or more programs configured to be executed by the one or more processors, wherein the program includes elements of the first matrix for a matrix multiplication operation between a first matrix and a second matrix, and Shuffling an operation order of a multiplication operation between elements of the second matrix; And instructions for executing the step of performing the matrix multiplication operation based on the shuffled operation order.

상기 행렬 곱 연산은, 양자 내성 암호(Post-Quantum Cryptography) 알고리즘에 기초한 암호화 및 복호화 중 적어도 하나를 위해 수행될 수 있다.The matrix multiplication operation may be performed for at least one of encryption and decryption based on a Post-Quantum Cryptography algorithm.

상기 제1 행렬 및 상기 제2 행렬 중 적어도 하나는, 상기 암호화 및 상기 복호화 중 적어도 하나를 수행하기 위해 반복적으로 이용되는 비밀 정보일 수 있다.At least one of the first matrix and the second matrix may be secret information repeatedly used to perform at least one of the encryption and the decryption.

상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.The shuffling may include changing an operation order of a vector multiplication operation for the matrix multiplication operation, and shuffling an operation order of a multiplication operation between elements of the first matrix and elements of the second matrix. have.

상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산 중 적어도 하나에 대해 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.The shuffling may include changing an operation order of a multiplication operation between an element of a row vector and an element of a column vector for at least one of the vector multiplication operations for the matrix multiplication operation, and the elements of the first matrix and the An operation order of a multiplication operation between elements of the second matrix may be shuffled.

상기 셔플링하는 단계는, 상기 제1 행렬 및 상기 제2 행렬의 크기에 기초하여 하나 이상의 수열을 생성하고, 상기 하나 이상의 수열에 기초하여 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.The shuffling may include generating one or more sequences based on the sizes of the first matrix and the second matrix, and elements of the first matrix and elements of the second matrix based on the one or more sequences It is possible to shuffle the order of operations of multiplication operations between.

본 발명의 실시예들에 따르면, 행렬 곱 연산 수행 시 해당 행렬 곱 연산을 위해 독립적으로 수행될 수 있는 곱셈 연산들의 연산 순서를 셔플링하고, 셔플링된 연산 순서에 따라 행렬 곱 연산을 수행함으로써, 특정 시간에 동일한 중간 값이 발생할 확률을 감소시킬 수 있으며, 이에 따라 부채널 공격을 위해 필요한 전력 파형의 수가 증가하게 되므로 부채널 공격을 효과적으로 방지할 수 있다According to embodiments of the present invention, when performing a matrix multiplication operation, by shuffling an operation order of multiplication operations that can be independently performed for a corresponding matrix multiplication operation, and performing a matrix multiplication operation according to the shuffled operation order, It is possible to reduce the probability of occurrence of the same intermediate value at a specific time, and accordingly, the number of power waveforms required for a side channel attack increases, so that side channel attacks can be effectively prevented

도 1은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도
도 2는 본 발명의 일 실시예에 따른 행렬 곱 연산 방법의 순서도
1 is a block diagram illustrating and describing a computing environment including a computing device suitable for use in example embodiments.
2 is a flowchart of a matrix multiplication operation method according to an embodiment of the present invention

이하, 도면을 참조하여 본 발명의 구체적인 실시형태를 설명하기로 한다. 이하의 상세한 설명은 본 명세서에서 기술된 방법, 장치 및/또는 시스템에 대한 포괄적인 이해를 돕기 위해 제공된다. 그러나 이는 예시에 불과하며 본 발명은 이에 제한되지 않는다.Hereinafter, a specific embodiment of the present invention will be described with reference to the drawings. The following detailed description is provided to aid in a comprehensive understanding of the methods, devices, and/or systems described herein. However, this is only an example and the present invention is not limited thereto.

본 발명의 실시예들을 설명함에 있어서, 본 발명과 관련된 공지기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. 상세한 설명에서 사용되는 용어는 단지 본 발명의 실시예들을 기술하기 위한 것이며, 결코 제한적이어서는 안 된다. 명확하게 달리 사용되지 않는 한, 단수 형태의 표현은 복수 형태의 의미를 포함한다. 본 설명에서, "포함" 또는 "구비"와 같은 표현은 어떤 특성들, 숫자들, 단계들, 동작들, 요소들, 이들의 일부 또는 조합을 가리키기 위한 것이며, 기술된 것 이외에 하나 또는 그 이상의 다른 특성, 숫자, 단계, 동작, 요소, 이들의 일부 또는 조합의 존재 또는 가능성을 배제하도록 해석되어서는 안 된다.In describing the embodiments of the present invention, when it is determined that a detailed description of a known technology related to the present invention may unnecessarily obscure the subject matter of the present invention, a detailed description thereof will be omitted. In addition, terms to be described later are terms defined in consideration of functions in the present invention and may vary according to the intention or custom of users or operators. Therefore, the definition should be made based on the contents throughout this specification. The terms used in the detailed description are only for describing embodiments of the present invention, and should not be limiting. Unless explicitly used otherwise, expressions in the singular form include the meaning of the plural form. In this description, expressions such as "comprising" or "feature" are intended to refer to certain features, numbers, steps, actions, elements, some or combination thereof, and one or more other than those described. It should not be construed to exclude the presence or possibility of other features, numbers, steps, actions, elements, any part or combination thereof.

도 1은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경(10)을 예시하여 설명하기 위한 블록도이다. 도시된 실시예에서, 각 컴포넌트들은 이하에 기술된 것 이외에 상이한 기능 및 능력을 가질 수 있고, 이하에 기술되지 것 이외에도 추가적인 컴포넌트를 포함할 수 있다.1 is a block diagram illustrating and describing a computing environment 10 including a computing device suitable for use in example embodiments. In the illustrated embodiment, each component may have different functions and capabilities in addition to those described below, and may include additional components in addition to those not described below.

도시된 컴퓨팅 환경(10)은 컴퓨팅 장치(12)를 포함한다. 일 실시예에서, 컴퓨팅 장치(12)는 본 발명의 실시예들에 따른 행렬 곱 연산 수행 방법을 수행하기 위한 장치일 수 있다. 컴퓨팅 장치(12)는 적어도 하나의 프로세서(14), 컴퓨터 판독 가능 저장 매체(16) 및 통신 버스(18)를 포함한다. 프로세서(14)는 컴퓨팅 장치(12)로 하여금 앞서 언급된 예시적인 실시예에 따라 동작하도록 할 수 있다. 예컨대, 프로세서(14)는 컴퓨터 판독 가능 저장 매체(16)에 저장된 하나 이상의 프로그램들을 실행할 수 있다. 상기 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 상기 컴퓨터 실행 가능 명령어는 프로세서(14)에 의해 실행되는 경우 컴퓨팅 장치(12)로 하여금 예시적인 실시예에 따른 동작들을 수행하도록 구성될 수 있다.The illustrated computing environment 10 includes a computing device 12. In an embodiment, the computing device 12 may be a device for performing a method of performing a matrix multiplication operation according to embodiments of the present invention. The computing device 12 includes at least one processor 14, a computer-readable storage medium 16 and a communication bus 18. The processor 14 may cause the computing device 12 to operate according to the exemplary embodiments mentioned above. For example, the processor 14 may execute one or more programs stored in the computer-readable storage medium 16. The one or more programs may include one or more computer-executable instructions, and the computer-executable instructions are configured to cause the computing device 12 to perform operations according to an exemplary embodiment when executed by the processor 14 Can be.

컴퓨터 판독 가능 저장 매체(16)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성된다. 컴퓨터 판독 가능 저장 매체(16)에 저장된 프로그램(20)은 프로세서(14)에 의해 실행 가능한 명령어의 집합을 포함한다. 일 실시예에서, 컴퓨터 판독 가능 저장 매체(16)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 장치(12)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.The computer-readable storage medium 16 is configured to store computer-executable instructions or program code, program data, and/or other suitable form of information. The program 20 stored in the computer-readable storage medium 16 includes a set of instructions executable by the processor 14. In one embodiment, the computer-readable storage medium 16 includes memory (volatile memory such as random access memory, nonvolatile memory, or a suitable combination thereof), one or more magnetic disk storage devices, optical disk storage devices, flash It may be memory devices, other types of storage media that can be accessed by computing device 12 and store desired information, or a suitable combination thereof.

통신 버스(18)는 프로세서(14), 컴퓨터 판독 가능 저장 매체(16)를 포함하여 컴퓨팅 장치(12)의 다른 다양한 컴포넌트들을 상호 연결한다.The communication bus 18 interconnects the various other components of the computing device 12, including the processor 14 and computer-readable storage medium 16.

컴퓨팅 장치(12)는 또한 하나 이상의 입출력 장치(24)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(22) 및 하나 이상의 네트워크 통신 인터페이스(26)를 포함할 수 있다. 입출력 인터페이스(22) 및 네트워크 통신 인터페이스(26)는 통신 버스(18)에 연결된다. 입출력 장치(24)는 입출력 인터페이스(22)를 통해 컴퓨팅 장치(12)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치(24)는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(24)는 컴퓨팅 장치(12)를 구성하는 일 컴포넌트로서 컴퓨팅 장치(12)의 내부에 포함될 수도 있고, 컴퓨팅 장치(12)와는 구별되는 별개의 장치로 컴퓨팅 장치(12)와 연결될 수도 있다.Computing device 12 may also include one or more input/output interfaces 22 and one or more network communication interfaces 26 that provide interfaces for one or more input/output devices 24. The input/output interface 22 and the network communication interface 26 are connected to the communication bus 18. The input/output device 24 may be connected to other components of the computing device 12 through the input/output interface 22. The exemplary input/output device 24 includes a pointing device (such as a mouse or trackpad), a keyboard, a touch input device (such as a touch pad or a touch screen), a voice or sound input device, and various types of sensor devices and/or a photographing device. Input devices and/or output devices such as display devices, printers, speakers, and/or network cards. The exemplary input/output device 24 may be included in the computing device 12 as a component constituting the computing device 12, and may be connected to the computing device 12 as a separate device distinct from the computing device 12. May be.

이하의 실시예에서, 행렬은 복수의 행과 복수의 열을 포함하는 행렬뿐 아니라, 각각 하나의 행 또는 하나의 열만을 포함하는 벡터 행렬(즉, 행 벡터 또는 열 벡터)을 포함하는 개념으로 이용된다.In the following embodiment, the matrix is used as a concept including not only a matrix including a plurality of rows and a plurality of columns, but also a vector matrix (ie, a row vector or a column vector) including only one row or one column, respectively. do.

또한, 이하의 실시예들은 예를 들어, QcBits, Rainbow, UOV, Frodo 등과 같이 암호화 및 복호화 중 적어도 하나를 수행하기 위해 행렬 곱 연산이 요구되는 양자 내성 암호(Post-Quantum Cryptography, PQC) 알고리즘에 따른 암호화 또는 복호화 과정에서 수행될 수 있다. 구체적으로, 컴퓨팅 장치(12)는 행렬 곱 연산이 요구되는 양자 내성 암호 알고리즘을 이용하여 암호화 및 복호화 중 적어도 하나를 수행할 수 있으며, 암호화 또는 복호화 수행 중 행렬 곱 연산이 요구되는 경우, 이하의 실시예들에 따라 해당 행렬 곱 연산을 수행할 수 있다.In addition, the following embodiments are based on a quantum resistant cryptography (Post-Quantum Cryptography, PQC) algorithm that requires a matrix multiplication operation to perform at least one of encryption and decryption, such as, for example, QcBits, Rainbow, UOV, Frodo, etc. It can be performed during encryption or decryption. Specifically, the computing device 12 may perform at least one of encryption and decryption using a quantum resistant encryption algorithm that requires a matrix multiplication operation, and when a matrix multiplication operation is required during encryption or decryption, the following implementation According to examples, the matrix multiplication operation may be performed.

도 2는 본 발명의 일 실시예에 따른 행렬 곱 연산 방법의 순서도이다.2 is a flowchart of a matrix multiplication operation method according to an embodiment of the present invention.

도 2를 참조하면, 우선, 컴퓨팅 장치(12)는 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 제1 행렬의 원소들 및 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링(shuffling)한다(210).Referring to FIG. 2, first, the computing device 12 shuffles the order of multiplication operations between elements of a first matrix and elements of a second matrix for a matrix multiplication operation between a first matrix and a second matrix. Shuffling (210).

이때, 제1 행렬 및 제2 행렬은 각각 행렬 곱 연산의 좌측 행렬과 우측 행렬을 의미한다. 구체적으로, 크기가 m×n인 행렬 A와 크기가 n×r인 행렬 B 사이의 행렬 곱 연산 AB의 경우, 제1 행렬은 좌측 행렬 A를 의미하며, 제2 행렬은 우측 행렬 B를 의미한다. 이하, 제1 행렬 및 제2 행렬은 동일한 의미로 이용된다.In this case, the first matrix and the second matrix mean the left matrix and the right matrix of the matrix multiplication operation, respectively. Specifically, in the case of a matrix multiplication operation AB between a matrix A of size m×n and a matrix B of size n×r, the first matrix refers to the left matrix A, and the second matrix refers to the right matrix B. . Hereinafter, the first matrix and the second matrix are used with the same meaning.

일 실시예에 따르면, 제1 행렬 및 제2 행렬 중 적어도 하나는 예를 들어, 비밀 키와 같이 양자 내성 암호 알고리즘에 기초한 암호화 및 복호화 중 적어도 하나를 수행하기 위해 반복적으로 이용되는 비밀 정보일 수 있다. 또한, 행렬 곱 연산을 위한 제1 행렬의 원소들 및 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서는 제1 행렬 및 제2 행렬 중 비밀 정보인 행렬을 이용한 행렬 곱 연산 수행 시마다 임의로 셔플링될 수 있다.According to an embodiment, at least one of the first matrix and the second matrix may be secret information repeatedly used to perform at least one of encryption and decryption based on a quantum resistant cryptographic algorithm, such as a secret key, for example. . In addition, the order of the multiplication operation between the elements of the first matrix and the elements of the second matrix for the matrix multiplication operation is randomly shuffled each time a matrix multiplication operation is performed using a matrix that is secret information among the first matrix and the second matrix. Can be.

한편, 일 실시예에 따르면, 컴퓨팅 장치(12)는 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 벡터 곱 연산의 연산 순서를 변경하여 제1 행렬의 원소들 및 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다. 이때, 벡터 곱 연산은 행 벡터(즉, 1×n 행렬)와 열 벡터(즉, n×1 행렬) 사이의 행렬 곱 연산을 의미하며, 이하 동일한 의미로 이용된다.Meanwhile, according to an embodiment, the computing device 12 changes the order of vector multiplication operations for matrix multiplication operations between the first matrix and the second matrix, so that the elements of the first matrix and the elements of the second matrix are changed. It is possible to shuffle the order of operations of multiplication operations between. In this case, the vector multiplication operation refers to a matrix multiplication operation between a row vector (ie, a 1×n matrix) and a column vector (ie, an n×1 matrix), and is hereinafter used with the same meaning.

구체적으로, 제1 행렬의 크기가 m×n이고, 제2 행렬의 크기가 n×r인 경우, 제1 행렬과 제2 행렬 사이의 행렬 곱 연산은 수학식 1에 따라 수행될 수 있다. Specifically, when the size of the first matrix is m×n and the size of the second matrix is n×r, a matrix multiplication operation between the first matrix and the second matrix may be performed according to Equation 1.

[수학식 1][Equation 1]

Figure pat00001
Figure pat00001

수학식 1에서, A는 제1 행렬, B는 제2 행렬, X는 제1 행렬과 제2 행렬 사이의 행렬 곱 연산에 의해 도출되는 결과 행렬을 나타낸다. 또한,

Figure pat00002
(이때, i∈{1, 2,..., m}, j∈{1, 2,..., n})는 제1 행렬 A의 원소,
Figure pat00003
(이때, k∈{1, 2,..., r})는 제2 행렬 B의 원소,
Figure pat00004
는 결과 행렬 X의 원소를 나타낸다. In Equation 1, A represents a first matrix, B represents a second matrix, and X represents a result matrix derived by a matrix multiplication operation between the first matrix and the second matrix. Also,
Figure pat00002
(In this case, i∈{1, 2,..., m}, j∈{1, 2,..., n}) are the elements of the first matrix A,
Figure pat00003
(In this case, k∈{1, 2,..., r}) is the element of the second matrix B,
Figure pat00004
Denotes the elements of the resulting matrix X.

한편, 수학식 1에서, 결과 행렬 X의 원소

Figure pat00005
각각은 아래의 수학식 2와 같이 제1 행렬 A에 포함된 행 벡터 중 i번째 행 벡터와 제2 행렬 B에 포함된 열 벡터 중 k번째 열 벡터 사이의 벡터 곱 연산을 통해 독립적으로 계산될 수 있다.Meanwhile, in Equation 1, the elements of the resulting matrix X
Figure pat00005
Each can be independently calculated through a vector multiplication operation between the i-th row vector of the row vectors included in the first matrix A and the k-th column vector of the column vectors included in the second matrix B as shown in Equation 2 below. have.

[수학식 2][Equation 2]

Figure pat00006
Figure pat00006

따라서, 제1 행렬 A와 제2 행렬 B사이의 행렬 곱 연산을 위해 수행되어야 할 벡터 곱 연산의 연산 순서가 변경되더라도 변경 전과 동일한 결과를 도출할 수 있다. Accordingly, even if the operation order of the vector multiplication operation to be performed for the matrix multiplication operation between the first matrix A and the second matrix B is changed, the same result as before the change can be obtained.

한편, 수학식 2에서 알 수 있듯이, 제1 행렬 A에 포함된 행 벡터 중 i번째 행 벡터와 제2 행렬 B에 포함된 열 벡터 중 k번째 열 벡터 사이의 벡터 곱 연산은 i번째 행 벡터에 포함된 원소

Figure pat00007
와 k번째 열 벡터에 포함된 원소
Figure pat00008
사이의 곱셈 연산
Figure pat00009
와 곱셈 연산 결과 사이의 덧셈을 통해 수행된다. 따라서, 제1 행렬 A와 제2 행렬 B 사이의 행렬 곱 연산을 위해 수행되어야 할 벡터 곱 연산의 연산 순서가 변경되는 경우, 제1 행렬 A에 포함된 원소
Figure pat00010
와 제2 행렬 B에 포함된 원소
Figure pat00011
사이의 곱셈 연산
Figure pat00012
의 연산 순서 역시 변경된다.Meanwhile, as can be seen from Equation 2, the vector multiplication operation between the i-th row vector of the row vectors included in the first matrix A and the k-th column vector of the column vectors included in the second matrix B is performed on the i-th row vector. Elements included
Figure pat00007
And the elements in the kth column vector
Figure pat00008
Multiplication operation between
Figure pat00009
It is performed through the addition between the and the result of the multiplication operation. Therefore, when the order of vector multiplication operations to be performed for the matrix multiplication operation between the first matrix A and the second matrix B is changed, the elements included in the first matrix A
Figure pat00010
And the elements in the second matrix B
Figure pat00011
Multiplication operation between
Figure pat00012
The order of operations of is also changed.

따라서, 컴퓨팅 장치(12)는 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 벡터 곱 연산의 연산 순서를 변경함으로써, 해당 행렬 곱 연산을 위한 제1 행렬의 원소들 및 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.Accordingly, the computing device 12 changes the order of vector multiplication operations for the matrix multiplication operation between the first matrix and the second matrix, so that the elements of the first matrix and the elements of the second matrix for the matrix multiplication operation are changed. It is possible to shuffle the operation order of the multiplication operation between them.

한편, 일 실시예에 따르면, 컴퓨팅 장치(12)는 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 벡터 곱 연산 중 적어도 하나에 대해 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산의 연산 순서를 변경하여, 제1 행렬의 원소들 및 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.Meanwhile, according to an embodiment, the computing device 12 performs a multiplication operation between an element of a row vector and an element of a column vector for at least one of vector multiplication operations for a matrix multiplication operation between the first matrix and the second matrix. By changing the operation order, the operation order of the multiplication operation between the elements of the first matrix and the elements of the second matrix can be shuffled.

구체적으로, 상술한 바와 같이, 제1 행렬 A에 포함된 행 벡터 중 i번째 행 벡터와 제2 행렬 B에 포함된 열 벡터 중 k번째 열 벡터 사이의 벡터 곱 연산은 수학식 2와 같이 곱셈 연산

Figure pat00013
와 곱셈 연산 결과 사이의 덧셈을 통해 수행된다. 이때, 곱셈 연산
Figure pat00014
은 독립적으로 계산될 수 있는 연산으로 연산 순서가 변경되더라도
Figure pat00015
의 값은 변경되지 않는다.Specifically, as described above, the vector multiplication operation between the i-th row vector of the row vectors included in the first matrix A and the k-th column vector of the column vectors included in the second matrix B is a multiplication operation as shown in Equation 2.
Figure pat00013
It is performed through the addition between the and the result of the multiplication operation. In this case, the multiplication operation
Figure pat00014
Is an operation that can be calculated independently, even if the order of operations changes
Figure pat00015
The value of is not changed.

따라서, 컴퓨팅 장치(12)는 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 벡터 곱 연산 중 적어도 하나에 대해, 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산 의 연산 순서를 변경함으로써 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 제1 행렬의 원소들 및 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.Accordingly, the computing device 12 changes the operation order of the multiplication operation between the elements of the row vector and the elements of the column vector for at least one of the vector multiplication operations for the matrix multiplication operation between the first matrix and the second matrix. An operation order of a multiplication operation between elements of the first matrix and elements of the second matrix for a matrix multiplication operation between the first matrix and the second matrix may be shuffled.

이후, 컴퓨팅 장치(12)는 셔플링된 연산 순서에 따라 제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 수행한다(220).Thereafter, the computing device 12 performs a matrix multiplication operation between the first matrix and the second matrix according to the shuffled operation order (220).

한편, 제1 행렬과 제2 행렬 사이의 행렬 곱 연산 수행 시마다 벡터 곱 연산의 순서 및 벡터 곱 연산을 위한 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산의 순서 중 적어도 하나를 변경하는 경우, 해당 행렬 곱 연산 수행 시 특정 시간에 동일한 중간 값이 발생할 확률은 1/ρ(이때, ρ=m×n×r)로 감소하게 된다. 따라서, 이 경우, 부채널 공격을 위해 필요한 전력 파형의 수가 ρ2배로 증가하게 되므로, 부채널 공격을 효과적으로 방지할 수 있다.On the other hand, when changing at least one of the order of the vector multiplication operation and the order of the multiplication operation between the element of the row vector and the element of the column vector for the vector multiplication operation each time the matrix multiplication operation between the first matrix and the second matrix is performed, When performing the matrix multiplication operation, the probability that the same intermediate value occurs at a specific time decreases to 1/ρ (here, ρ=m×n×r). Accordingly, in this case, since the number of power waveforms required for subchannel attack is increased by ρ 2 , the subchannel attack can be effectively prevented.

한편, 도 2에 도시된 순서도에서는 상기 방법을 복수 개의 단계로 나누어 기재하였으나, 적어도 일부의 단계들은 순서를 바꾸어 수행되거나, 다른 단계와 결합되어 함께 수행되거나, 생략되거나, 세부 단계들로 나뉘어 수행되거나, 또는 도시되지 않은 하나 이상의 단계가 부가되어 수행될 수 있다.Meanwhile, in the flowchart shown in FIG. 2, the method is described by dividing the method into a plurality of steps, but at least some of the steps are performed in a different order, combined with other steps, performed together, omitted, or divided into detailed steps. Or, one or more steps not shown may be added and performed.

이하에서는, 크기가 2×3 제1 행렬

Figure pat00016
와 크기가 3×2인 제2 행렬
Figure pat00017
사이의 행렬 곱 연산 AB에 대해 본 발명의 일 실시예에 따른 행렬 곱 연산 방법을 적용하는 구체적인 예를 설명한다. In the following, the size is a 2x3 first matrix
Figure pat00016
And a second matrix of size 3×2
Figure pat00017
A specific example of applying the matrix multiplication operation method according to an embodiment of the present invention to the matrix multiplication operation AB will be described.

구체적으로, 행렬 곱 연산 AB는 아래의 수학식 3에 따라 수행될 수 있다. Specifically, the matrix multiplication operation AB may be performed according to Equation 3 below.

[수학식 3][Equation 3]

Figure pat00018
Figure pat00018

또한, 결과 행렬 X의 원소는 각각 아래의 수학식 4 내지 수학식 7과 같이 제1 행렬 A에 포함된 각 행 벡터와 제2 행렬 B에 포함된 각 열 벡터 사이에 벡터 곱 연산을 통해 획득될 수 있다.In addition, the elements of the resultant matrix X are obtained through a vector multiplication operation between each row vector included in the first matrix A and each column vector included in the second matrix B, as shown in Equations 4 to 7 below. I can.

[수학식 4][Equation 4]

Figure pat00019
Figure pat00019

[수학식 5][Equation 5]

Figure pat00020
Figure pat00020

[수학식 6][Equation 6]

Figure pat00021
Figure pat00021

[수학식 7][Equation 7]

Figure pat00022
Figure pat00022

이때, 일 실시예에 따르면, 컴퓨팅 장치(12)는 제1 행렬 A 및 제2 행렬 B의 크기에 기초하여, 하나 이상의 수열을 생성하고, 생성된 하나 이상의 수열에 기초하여 제1 행렬 A 및 제2 행렬 B 사이의 행렬 곱 연산을 위한 제1 행렬의 원소들 및 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링할 수 있다.In this case, according to an embodiment, the computing device 12 generates one or more sequences based on the sizes of the first matrix A and the second matrix B, and the first matrix A and the first matrix based on the generated one or more sequences. The order of the multiplication operation between the elements of the first matrix and the elements of the second matrix for the matrix multiplication operation between the 2 matrices B may be shuffled.

구체적으로, 일 실시예에 따르면, 컴퓨팅 장치(12)는 제1 행렬 A의 행의 개수(즉, 2)와 동일한 길이를 가지는 제1 랜덤 수열 및 제2 행렬 B의 열의 개수(즉, 2)와 동일한 길이를 가지는 제2 랜덤 수열 중 적어도 하나를 생성하고, 생성된 랜덤 수열에 따라 벡터 곱 연산의 연산 순서를 변경할 수 있다.Specifically, according to an embodiment, the computing device 12 includes a first random sequence having a length equal to the number of rows of the first matrix A (ie, 2) and the number of columns of the second matrix B (ie, 2). At least one of the second random sequences having the same length as is generated, and the order of vector multiplication operation may be changed according to the generated random sequence.

이때, 제1 랜덤 수열에 포함된 숫자는 제1 행렬 A에 포함된 행 벡터의 인덱스를 나타내며, 각 숫자의 제1 랜덤 수열 내 위치는 연산 순서를 나타낼 수 있다. 마찬가지로, 제2 랜덤 수열에 포함된 각 숫자는 제2 행렬 B에 포함된 열 벡터의 인덱스를 나타내며, 각 숫자의 제2 랜덤 수열 내 위치는 연산 순서를 나타낼 수 있다. In this case, a number included in the first random sequence may indicate an index of a row vector included in the first matrix A, and a position of each number in the first random sequence may indicate an operation order. Similarly, each number included in the second random sequence may indicate an index of a column vector included in the second matrix B, and a position of each number in the second random sequence may indicate an operation order.

예를 들어, 제1 랜덤 수열이 S1={2, 1}이고, 제2 랜덤 수열이 S2={1, 2}인 경우, 컴퓨팅 장치(12)는 수학식 6 => 수학식 7 => 수학식 4 => 수학식 5의 순서로 벡터 곱 연산을 수행할 수 있다.For example, when the first random sequence is S 1 ={2, 1}, and the second random sequence is S 2 ={1, 2}, the computing device 12 is Equation 6 => Equation 7 = > Equation 4 => Vector multiplication operation may be performed in the order of Equation 5.

한편, 일 실시예에 따르면, 컴퓨팅 장치(12)는 제1 행렬 A의 열의 개수(즉, 3)와 동일한 길이를 가지는 하나 이상의 제3 랜덤 수열을 생성할 수 있다. 이 경우, 컴퓨팅 장치(12)는 생성된 하나 이상의 제3 랜덤 수열에 따라 수학식 4 내지 수학식 7에 따른 벡터 곱 연산 중 적어도 하나에 대해 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산 순서를 변경할 수 있다. Meanwhile, according to an embodiment, the computing device 12 may generate one or more third random sequences having a length equal to the number of columns of the first matrix A (ie, 3). In this case, the computing device 12 performs a multiplication operation order between the elements of the row vector and the elements of the column vector for at least one of the vector multiplication operations according to Equations 4 to 7 according to the generated one or more third random sequences. Can be changed.

이때, 제3 랜덤 수열에 포함된 숫자는 행 벡터에 포함된 각 원소의 행 벡터 내 인덱스를 나타내고, 제3 랜덤 수열 내에 포함된 각 숫자의 제3 랜덤 수열 내 위치는 연산 순서를 나타낼 수 있다. In this case, the number included in the third random sequence may indicate an index of each element included in the row vector in the row vector, and a position of each number included in the third random sequence in the third random sequence may indicate an operation order.

예를 들어, 제3 랜덤 수열이 S3={3, 2, 1}인 경우, 컴퓨팅 장치(12)는 수학식 4에 따른 벡터 곱 연산을 위한 곱셈 연산의 순서를

Figure pat00023
=>
Figure pat00024
=>
Figure pat00025
로 변경, 수학식 5에 따른 벡터 곱 연산을 위한 곱셈 연산의 순서를
Figure pat00026
=>
Figure pat00027
=>
Figure pat00028
로 변경, 수학식 6에 따른 벡터 곱 연산을 위한 곱셈 연산의 순서를
Figure pat00029
=>
Figure pat00030
=>
Figure pat00031
로 변경, 수학식 7에 따른 벡터 곱 연산을 위한 곱셈 연산의 순서를
Figure pat00032
=>
Figure pat00033
=>
Figure pat00034
로 변경 중 적어도 하나를 수행할 수 있다. For example, when the third random sequence is S 3 ={3, 2, 1}, the computing device 12 performs a multiplication operation for a vector multiplication operation according to Equation 4
Figure pat00023
=>
Figure pat00024
=>
Figure pat00025
Change to, the order of the multiplication operation for the vector multiplication operation according to Equation 5
Figure pat00026
=>
Figure pat00027
=>
Figure pat00028
Change to, the order of the multiplication operation for the vector multiplication operation according to Equation 6
Figure pat00029
=>
Figure pat00030
=>
Figure pat00031
Change to, the order of the multiplication operation for the vector multiplication operation according to Equation 7
Figure pat00032
=>
Figure pat00033
=>
Figure pat00034
At least one of the changes to can be performed.

다른 예로, 컴퓨팅 장치(12)는 각각 수학식 4 내지 수학식 7에 따른 벡터 곱 연산 중 하나에 대응되는 상이한 복수의 제3 랜덤 수열을 생성하고, 생성된 복수의 제3 랜덤 수열에 따라 수학식 4 내지 7에 따른 벡터 곱 연산 중 일부에 대해 곱셈 연산의 순서를 변경할 수 있다. 구체적으로, 컴퓨팅 장치(12)는 수학식 4에 따른 벡터 곱 연산에 대응되는 제3 랜덤 수열 S3,1={3, 2, 1}과 수학식 5에 따른 벡터 곱 연산에 대응되는 제3 랜덤 수열 S3,2={2, 1, 3}을 생성할 수 있다. 이 경우, 컴퓨팅 장치(12)는 S3,1에 기초하여 수학식 4에 따른 벡터 곱 연산을 위한 곱셈 연산의 순서를

Figure pat00035
=>
Figure pat00036
=>
Figure pat00037
로 변경하고, S3,1에 기초하여 수학식 5에 따른 벡터 곱 연산을 위한 곱셈 연산의 순서를
Figure pat00038
=>
Figure pat00039
=>
Figure pat00040
로 변경할 수 있다.As another example, the computing device 12 generates a plurality of different third random sequences corresponding to one of the vector multiplication operations according to Equations 4 to 7, respectively, and equations according to the generated third random sequences. The order of multiplication operations may be changed for some of the vector multiplication operations according to 4 to 7. Specifically, the computing device 12 includes a third random sequence S 3,1 ={3, 2, 1} corresponding to the vector multiplication operation according to Equation 4, and a third random sequence S 3,1 ={3, 2, 1} corresponding to the vector multiplication operation according to Equation 5. A random sequence S 3,2 ={2, 1, 3} can be generated. In this case, the computing device 12 determines the order of the multiplication operation for the vector multiplication operation according to Equation 4 based on S 3,1 .
Figure pat00035
=>
Figure pat00036
=>
Figure pat00037
And the order of the multiplication operation for the vector multiplication operation according to Equation 5 based on S 3,1
Figure pat00038
=>
Figure pat00039
=>
Figure pat00040
Can be changed to.

한편, 상술한 예에서는, 랜덤 수열을 이용하여 제1 행렬 A의 원소들 및 제2 행렬 B의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링하는 것으로 예시하였으나, 연산의 순서를 셔플링하기 위한 방법은 반드시 상술한 예 외에도 다양한 방식에 따라 수행될 수 있으며, 반드시 특정한 방식으로 한정되는 것은 아니다. Meanwhile, in the above-described example, it was exemplified that the operation order of the multiplication operation between the elements of the first matrix A and the elements of the second matrix B is shuffled using a random sequence, but the order of operations is shuffled. The method may be performed according to various methods in addition to the above-described examples, and is not necessarily limited to a specific method.

이상에서 대표적인 실시예를 통하여 본 발명에 대하여 상세하게 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 전술한 실시예에 대하여 본 발명의 범주에서 벗어나지 않는 한도 내에서 다양한 변형이 가능함을 이해할 것이다. 그러므로 본 발명의 권리범위는 설명된 실시예에 국한되어 정해져서는 안 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.Although the present invention has been described in detail through the exemplary embodiments above, those of ordinary skill in the art to which the present invention pertains have found that various modifications can be made to the above embodiments without departing from the scope of the present invention. I will understand. Therefore, the scope of the present invention is limited to the described embodiments and should not be determined, and should not be determined by the claims to be described later, but also by those equivalents to the claims.

10: 컴퓨팅 환경
12: 컴퓨팅 장치
14: 프로세서
16: 컴퓨터 판독 가능 저장 매체
18: 통신 버스
20: 프로그램
22: 입출력 인터페이스
24: 입출력 장치
26: 네트워크 통신 인터페이스
10: computing environment
12: computing device
14: processor
16: computer readable storage medium
18: communication bus
20: program
22: input/output interface
24: input/output device
26: network communication interface

Claims (12)

하나 이상의 프로세서, 및
상기 하나 이상의 프로세서에 의해 실행되는 하나 이상의 프로그램을 저장하는 메모리를 구비한 컴퓨팅 장치에서 수행되는 방법으로서,
제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링(shuffling)하는 단계; 및
상기 셔플링된 연산 순서에 기초하여 상기 행렬 곱 연산을 수행하는 단계를 포함하는 방법.
One or more processors, and
A method performed in a computing device having a memory storing one or more programs executed by the one or more processors,
Shuffling an operation order of a multiplication operation between elements of the first matrix and elements of the second matrix for a matrix multiplication operation between a first matrix and a second matrix; And
And performing the matrix multiplication operation based on the shuffled order of operations.
청구항 1에 있어서,
상기 행렬 곱 연산은, 양자 내성 암호(Post-Quantum Cryptography) 알고리즘에 기초한 암호화 및 복호화 중 적어도 하나를 위해 수행되는 방법.
The method according to claim 1,
The matrix multiplication operation is performed for at least one of encryption and decryption based on a Post-Quantum Cryptography algorithm.
청구항 2에 있어서,
상기 제1 행렬 및 상기 제2 행렬 중 적어도 하나는, 상기 암호화 및 상기 복호화 중 적어도 하나를 수행하기 위해 반복적으로 이용되는 비밀 정보인 방법.
The method according to claim 2,
At least one of the first matrix and the second matrix is secret information repeatedly used to perform at least one of the encryption and the decryption.
청구항 1에 있어서,
상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링하는 방법.
The method according to claim 1,
The shuffling may include changing an operation order of a vector multiplication operation for the matrix multiplication operation, and shuffling an operation order of a multiplication operation between elements of the first matrix and elements of the second matrix. .
청구항 1에 있어서,
상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산 중 적어도 하나에 대해 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링하는 방법.
The method according to claim 1,
The shuffling may include changing an operation order of a multiplication operation between an element of a row vector and an element of a column vector for at least one of the vector multiplication operations for the matrix multiplication operation, and the elements of the first matrix and the A method of shuffling an operation order of a multiplication operation between elements of a second matrix.
청구항 1에 있어서,
상기 셔플링하는 단계는, 상기 제1 행렬 및 상기 제2 행렬의 크기에 기초하여 하나 이상의 수열을 생성하고, 상기 하나 이상의 수열에 기초하여 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링하는 방법.
The method according to claim 1,
The shuffling may include generating one or more sequences based on the sizes of the first matrix and the second matrix, and elements of the first matrix and elements of the second matrix based on the one or more sequences How to shuffle the order of operations of multiplication operations between.
하나 이상의 프로세서; 및
상기 하나 이상의 프로세서에 의해 실행되도록 구성되는 하나 이상의 프로그램을 저장하는 메모리를 포함하는 장치로서,
상기 프로그램은,
제1 행렬 및 제2 행렬 사이의 행렬 곱 연산을 위한 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링(shuffling)하는 단계; 및
상기 셔플링된 연산 순서에 기초하여 상기 행렬 곱 연산을 수행하는 단계를 실행하기 위한 명령어들을 포함하는, 장치.
One or more processors; And
An apparatus comprising a memory storing one or more programs configured to be executed by the one or more processors,
The above program,
Shuffling an operation order of a multiplication operation between elements of the first matrix and elements of the second matrix for a matrix multiplication operation between a first matrix and a second matrix; And
And instructions for performing the step of performing the matrix multiplication operation based on the shuffled order of operations.
청구항 7에 있어서,
상기 행렬 곱 연산은, 양자 내성 암호(Post-Quantum Cryptography) 알고리즘에 기초한 암호화 및 복호화 중 적어도 하나를 위해 수행되는 장치.
The method of claim 7,
The matrix multiplication operation is performed for at least one of encryption and decryption based on a Post-Quantum Cryptography algorithm.
청구항 8에 있어서,
상기 제1 행렬 및 상기 제2 행렬 중 적어도 하나는, 상기 암호화 및 상기 복호화 중 적어도 하나를 수행하기 위해 반복적으로 이용되는 비밀 정보인 장치.
The method of claim 8,
At least one of the first matrix and the second matrix is secret information repeatedly used to perform at least one of the encryption and the decryption.
청구항 7에 있어서,
상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링하는 장치.
The method of claim 7,
The shuffling may include changing an operation order of a vector multiplication operation for the matrix multiplication operation, and shuffling an operation order of a multiplication operation between elements of the first matrix and elements of the second matrix .
청구항 7에 있어서,
상기 셔플링하는 단계는, 상기 행렬 곱 연산을 위한 벡터 곱 연산 중 적어도 하나에 대해 행 벡터의 원소와 열 벡터의 원소 사이의 곱셈 연산의 연산 순서를 변경하여, 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링하는 장치.
The method of claim 7,
The shuffling may include changing an operation order of a multiplication operation between an element of a row vector and an element of a column vector for at least one of the vector multiplication operations for the matrix multiplication operation, and the elements of the first matrix and the An apparatus for shuffling an operation order of a multiplication operation between elements of a second matrix.
청구항 7에 있어서,
상기 셔플링하는 단계는, 상기 제1 행렬 및 상기 제2 행렬의 크기에 기초하여 하나 이상의 수열을 생성하고, 상기 하나 이상의 수열에 기초하여 상기 제1 행렬의 원소들 및 상기 제2 행렬의 원소들 사이의 곱셈 연산의 연산 순서를 셔플링하는 장치.
The method of claim 7,
The shuffling may include generating one or more sequences based on the sizes of the first matrix and the second matrix, and elements of the first matrix and elements of the second matrix based on the one or more sequences A device for shuffling the order of operations of multiplication operations between.
KR1020190122600A 2019-03-06 2019-10-02 Apparatus and method for performing matrix multiplication operation being secure against side channel attack KR102578869B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020190122600A KR102578869B1 (en) 2019-03-06 2019-10-02 Apparatus and method for performing matrix multiplication operation being secure against side channel attack
US16/664,825 US11509460B2 (en) 2019-10-02 2019-10-26 Apparatus and method for performing matrix multiplication operation being secure against side channel attack

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR1020190025967 2019-03-06
KR20190025967 2019-03-06
KR1020190122600A KR102578869B1 (en) 2019-03-06 2019-10-02 Apparatus and method for performing matrix multiplication operation being secure against side channel attack

Publications (2)

Publication Number Publication Date
KR20200107739A true KR20200107739A (en) 2020-09-16
KR102578869B1 KR102578869B1 (en) 2023-09-15

Family

ID=72669639

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190122600A KR102578869B1 (en) 2019-03-06 2019-10-02 Apparatus and method for performing matrix multiplication operation being secure against side channel attack

Country Status (1)

Country Link
KR (1) KR102578869B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230147942A (en) 2022-04-15 2023-10-24 호서대학교 산학협력단 Method and apparatus for resisting side channel attacks on post-quantum cryptography system
WO2023224175A1 (en) * 2022-05-20 2023-11-23 국방과학연구소 Quantum-resistant public key encryption method, and electronic device and system therefor
KR20240121460A (en) 2023-02-02 2024-08-09 (주)에프디크리에이트 Method and system for resisting side channel attacks by neuron execution randomization in deep learning network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101245056B1 (en) * 2008-12-19 2013-03-22 인텔 코포레이션 Method and apparatus to perform redundant array of independent disks (raid) operations
KR20140054647A (en) 2012-10-29 2014-05-09 에스케이텔레콤 주식회사 Method for enhancing security of secret key generated in quantum key distribution system
US20160269048A1 (en) * 2011-07-27 2016-09-15 Sun Patent Trust Encoding method, decoding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101245056B1 (en) * 2008-12-19 2013-03-22 인텔 코포레이션 Method and apparatus to perform redundant array of independent disks (raid) operations
US20160269048A1 (en) * 2011-07-27 2016-09-15 Sun Patent Trust Encoding method, decoding method
KR20140054647A (en) 2012-10-29 2014-05-09 에스케이텔레콤 주식회사 Method for enhancing security of secret key generated in quantum key distribution system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230147942A (en) 2022-04-15 2023-10-24 호서대학교 산학협력단 Method and apparatus for resisting side channel attacks on post-quantum cryptography system
WO2023224175A1 (en) * 2022-05-20 2023-11-23 국방과학연구소 Quantum-resistant public key encryption method, and electronic device and system therefor
KR20240121460A (en) 2023-02-02 2024-08-09 (주)에프디크리에이트 Method and system for resisting side channel attacks by neuron execution randomization in deep learning network

Also Published As

Publication number Publication date
KR102578869B1 (en) 2023-09-15

Similar Documents

Publication Publication Date Title
US10367637B2 (en) Modular exponentiation with transparent side channel attack countermeasures
KR102578869B1 (en) Apparatus and method for performing matrix multiplication operation being secure against side channel attack
Barreto et al. Subgroup security in pairing-based cryptography
US10142105B2 (en) Hypersphere-based multivariable public key encryption/decryption system and method
US8976960B2 (en) Methods and apparatus for correlation protected processing of cryptographic operations
EP3202079B1 (en) Exponent splitting for cryptographic operations
JP2020520614A (en) Apparatus and method for performing secure operations against side channel attacks
US20210152331A1 (en) Protecting polynomial hash functions from external monitoring attacks
US20220085998A1 (en) System and method to generate prime numbers in cryptographic applications
US20220166614A1 (en) System and method to optimize generation of coprime numbers in cryptographic applications
KR20110014630A (en) Exponent obfuscation
US8553878B2 (en) Data transformation system using cyclic groups
CN114187000B (en) Signature method, device, storage medium and processor for decentralized private key
US10256970B2 (en) Secure data transformations
JP2014137474A (en) Tamper detection device, tamper detection method, and program
KR102126295B1 (en) Method for comparing chiphertext based and apparatus for executing the method
US20230246806A1 (en) Efficient masking of secure data in ladder-type cryptographic computations
US11509460B2 (en) Apparatus and method for performing matrix multiplication operation being secure against side channel attack
CN112434322A (en) Data encryption method and device, computer equipment and computer readable storage medium
Wang et al. HT2ML: An efficient hybrid framework for privacy-preserving Machine Learning using HE and TEE
EP3624390A1 (en) Devices and methods for protecting cryptographic programs
EP4024755B1 (en) Secured performance of an elliptic curve cryptographic process
Grubbs et al. Modifying an enciphering scheme after deployment
CN110495134A (en) For the method and system for the graceful safe prime number of selection of finite field diffie-hellman
KR102510077B1 (en) Apparatus and method for performing operation being secure against side channel attack

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant