KR102130513B1 - Bit substitution operator, extended bit substitution operator, and encryption apparatus using the same - Google Patents

Bit substitution operator, extended bit substitution operator, and encryption apparatus using the same Download PDF

Info

Publication number
KR102130513B1
KR102130513B1 KR1020180106498A KR20180106498A KR102130513B1 KR 102130513 B1 KR102130513 B1 KR 102130513B1 KR 1020180106498 A KR1020180106498 A KR 1020180106498A KR 20180106498 A KR20180106498 A KR 20180106498A KR 102130513 B1 KR102130513 B1 KR 102130513B1
Authority
KR
South Korea
Prior art keywords
bit
replacement
output
operator
input
Prior art date
Application number
KR1020180106498A
Other languages
Korean (ko)
Other versions
KR20200028164A (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 KR1020180106498A priority Critical patent/KR102130513B1/en
Publication of KR20200028164A publication Critical patent/KR20200028164A/en
Application granted granted Critical
Publication of KR102130513B1 publication Critical patent/KR102130513B1/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/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/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • 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
    • 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/20Manipulating the length of blocks of bits, e.g. padding or block truncation

Abstract

본 발명은 비트치환 연산기, 확장 비트치환 연산기 및 이를 이용한 암호 장치에 관한 것으로, 평문을 수신하는 평문 수신부, 상기 평문에 암호화 키로 제1 암호화 과정을 수행하여 제1 암호문을 생성하고 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성된 비트치환 연산기를 통해 상기 제1 암호문의 비트치환을 수행하는 비트치환 수행부 및 비트치환된 상기 제1 암호문에 관한 제2 암호화 과정을 수행하여 제2 암호문을 생성하는 암호문 생성부를 포함한다. 따라서, 본 발명은 안전성과 효율성이 향상된 비트치환 연산기 또는 확장 비트치환 연산기를 이용하여 암호화 및 복호화를 수행할 수 있다.The present invention relates to a bit-replacement operator, an extended bit-replacement operator, and a cryptographic device using the same, a plaintext receiver for receiving plaintext, performing a first encryption process with an encryption key on the plaintext to generate a first ciphertext and each as a one-to-one relationship. A bit replacement performing unit that performs bit replacement of the first ciphertext through a bit replacement operator consisting of a plurality of first weighted front gates and a plurality of second weighted rear gates such that the output of the front gate is operated as an input of the rear gate. And a second ciphertext generating unit generating a second ciphertext by performing a second encryption process on the first ciphertext that has been bit-substituted. Accordingly, the present invention can perform encryption and decryption using a bit-change operator or an extended bit-change operator with improved safety and efficiency.

Description

비트치환 연산기, 확장 비트치환 연산기 및 이를 이용한 암호 장치{BIT SUBSTITUTION OPERATOR, EXTENDED BIT SUBSTITUTION OPERATOR, AND ENCRYPTION APPARATUS USING THE SAME}BIT SUBSTITUTION OPERATOR, EXTENDED BIT SUBSTITUTION OPERATOR, AND ENCRYPTION APPARATUS USING THE SAME}

본 발명은 비트치환 연산기를 이용한 암호 기술에 관한 것으로, 보다 상세하게는 안전성과 효율성이 향상된 비트치환 연산기를 이용하여 암호화 및 복호화를 수행할 수 있는 비트치환 연산기를 이용한 암호 장치에 관한 것이다.The present invention relates to a cryptographic technology using a bit-replacement operator, and more particularly, to a cryptographic device using a bit-replacement operator that can perform encryption and decryption using a bit-replacement operator with improved safety and efficiency.

경량 블록암호 알고리즘은 빅데이터, 클라우드 등의 고속 환경 및 모바일기기 등의 경량 환경에서 기밀성을 제공하기 위하여 개발된 암호 알고리즘이다. 경량 블록암호 알고리즘은 대표적으로 SPN 형태와 Feistel 형태 등으로 분류할 수 있다. SPN 형태는 S-BOX와 P-BOX를 사용하여 Confusion과 Diffusion을 만족시키는 것으로 병렬 연산이 가능하고 암호화와 복호화 모듈이 동일하지 않은 특징을 가지고 있다.The lightweight block encryption algorithm is a cryptographic algorithm developed to provide confidentiality in high-speed environments such as big data and cloud, and lightweight environments such as mobile devices. The lightweight block encryption algorithm can be classified into SPN type and Feistel type. The SPN type satisfies Confusion and Diffusion using S-BOX and P-BOX, and parallel operation is possible, and the encryption and decryption modules are not the same.

기존의 경량 블록암호 알고리즘의 S-Box는 각각 알고리즘의 설계 사상에 맞게 제작되었다. 하지만 안전성을 중점으로 만든 S-Box는 효율성이 떨어지는 단점을 가지고, 효율성을 중심으로 만든 S-Box는 안전성이 떨어지는 단점을 가질 수 있다. 결과적으로, 안전성이 높은 S-Box는 구현 관점에서 많은 비용을 필요로 하고, 효율성이 좋은 S-Box는 충분한 안전성을 가지기 힘들다는 문제점을 가지고 있다.The S-Box of the existing lightweight block encryption algorithm was produced according to the design idea of each algorithm. However, S-Box made with focus on safety has the disadvantage of low efficiency, and S-Box made with focus on efficiency can have the disadvantage of poor safety. As a result, a high safety S-Box requires a lot of cost from an implementation point of view, and a high efficiency S-Box has a problem that it is difficult to have sufficient safety.

한국등록특허 제10-0969961(2010.07.06)호Korean Registered Patent No. 10-0969961 (2010.07.06)

본 발명의 일 실시예는 안전성과 효율성이 향상된 비트치환 연산기를 이용하여 암호화 및 복호화를 수행할 수 있는 비트치환 연산기를 이용한 암호 장치를 제공하고자 한다.One embodiment of the present invention is to provide a cryptographic device using a bit-change operator that can perform encryption and decryption using a bit-change operator with improved safety and efficiency.

본 발명의 일 실시예는 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성되어 비트치환을 수행할 수 있는 새로운 비트치환 연산기를 제공하고자 한다.Each embodiment of the present invention is composed of a plurality of first weighted front-end gates and a plurality of second weighted rear-end gates so that the output of the front-end gate is operated as an input of the rear-end gate in a one-to-one relationship to perform bit substitution. We want to provide a new bit replacement operator.

본 발명의 일 실시예는 새로운 비트치환 연산기와 배타적 논리합 및 배타적 부정 논리합 연산의 결합에 의해 생성되어 비트치환을 수행할 수 있는 새로운 확장 비트치환 연산기를 제공하고자 한다.An exemplary embodiment of the present invention is to provide a new extended bit replacement operator capable of performing bit replacement, which is generated by a combination of a new bit replacement operator and an exclusive OR and exclusive negative OR operation.

실시예들 중에서, 비트치환 연산기를 이용한 암호 장치는 평문을 수신하는 평문 수신부, 상기 평문에 암호화 키로 제1 암호화 과정을 수행하여 제1 암호문을 생성하고 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성된 비트치환 연산기를 통해 상기 제1 암호문의 비트치환을 수행하는 비트치환 수행부 및 비트치환된 상기 제1 암호문에 관한 제2 암호화 과정을 수행하여 제2 암호문을 생성하는 암호문 생성부를 포함한다.Among the embodiments, the cryptographic device using a bit-replacement operator generates a first ciphertext by performing a first encryption process with an encryption key on the plaintext receiving unit, the plaintext receiving unit receiving the plaintext, and each of them has a one-to-one relationship so that the output of the front end gate is the rear end gate. A bit replacement performing unit performing bit replacement of the first ciphertext through a bit replacement operator consisting of a plurality of first weighted front-end gates and a plurality of second weighted rear-end gates to be operated as an input of the bit-changed first And a ciphertext generation unit that generates a second ciphertext by performing a second encryption process on the ciphertext.

상기 평문 수신부는 상기 평문을 동일한 크기를 가지는 복수의 블록들로 분할하고 마지막 블록의 크기가 상이한 경우 패딩(padding) 연산을 수행할 수 있다.The plaintext receiving unit may divide the plaintext into a plurality of blocks having the same size and perform a padding operation when the size of the last block is different.

상기 비트치환 수행부는 하나의 부정 논리합 연산 게이트와 3개의 논리곱 연산 게이트들을 상기 복수의 제1 가중치 전단 게이트들로서 사용하는 상기 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement performing unit may perform the bit replacement through the bit replacement operator that uses one negative OR sum gate and three logical product gates as the plurality of first weighted shear gates.

상기 비트치환 수행부는 4개의 배타적 논리합 연산 게이트들을 상기 복수의 제2 가중치 후단 게이트들로서 사용하는 상기 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement performing unit may perform the bit replacement through the bit replacement operator using four exclusive OR gates as the plurality of second weighted trailing gates.

상기 비트치환 수행부는 제1 입력비트 및 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제3 입력비트와 배타적 논리합 연산을 수행함으로써 제1 출력비트를 생성하고, 상기 제1 입력비트 및 제3 입력비트를 기초로 부정 논리합 연산을 수행한 후 제4 입력비트와 배타적 논리합 연산을 수행함으로써 제2 출력비트를 생성하며, 상기 제2 출력비트와 상기 제2 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제1 입력비트와 배타적 논리합 연산을 수행함으로써 제3 출력비트를 생성하고, 상기 제1 출력비트와 상기 제4 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제2 입력비트와 배타적 논리합 연산을 수행함으로써 제4 출력비트를 생성하는 상기 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement performing unit generates a first output bit by performing a logical multiplication operation based on the first input bit and the second input bit, and then performing an exclusive OR operation with the third input bit. After performing a negative OR operation based on 3 input bits, a second output bit is generated by performing an exclusive OR operation with the fourth input bit, and a logical product operation is performed based on the second output bit and the second input bit. After performing, an exclusive OR operation is performed with the first input bit to generate a third output bit, a logical multiplication operation is performed based on the first output bit and the fourth input bit, and then the second input bit and By performing an exclusive OR operation, the bit replacement may be performed through the bit replacement operator generating a fourth output bit.

상기 비트치환 수행부는 제1 및 제2 입력블록들에 대해 상기 비트치환 연산기를 적용하여 제1 및 제2 치환블록들을 생성하고, 상기 제1 및 제2 치환블록들을 기초로 상기 비트치환 연산기와 배타적 논리합 및 배타적 부정 논리합 연산을 결합하여 생성된 확장 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement execution unit generates first and second replacement blocks by applying the bit replacement operator to the first and second input blocks, and is exclusive to the bit replacement operator based on the first and second replacement blocks. The bit replacement may be performed through an extended bit replacement operator generated by combining an OR and an exclusive negative OR operation.

상기 비트치환 수행부는 상기 제1 및 제2 치환블록들을 배타적 논리합 연산하여 제1 출력 블록을 생성하고, 상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement execution unit performs an exclusive OR operation on the first and second replacement blocks to generate a first output block, applies the bit replacement operator to the first output block, and then performs an exclusive OR operation with the second replacement block. By performing the above, the bit replacement can be performed through the extended bit replacement operator generating a second output block.

상기 비트치환 수행부는 상기 제1 및 제2 치환블록들을 배타적 부정 논리합 연산하여 제1 출력 블록을 생성하고, 상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement performing unit generates the first output block by performing exclusive negative OR on the first and second replacement blocks, applies the bit replacement operator to the first output block, and then operates exclusive logical OR with the second replacement block. By performing the above, the bit replacement may be performed through the extended bit replacement operator generating a second output block.

상기 비트치환 수행부는 상기 제1 및 제2 치환블록들을 배타적 논리합 연산하여 제1 출력 블록을 생성하고, 상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 부정 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement execution unit generates the first output block by performing an exclusive OR operation on the first and second replacement blocks, applies the bit replacement operator to the first output block, and then performs an exclusive negative OR operation with the second replacement block. By performing the above, the bit replacement may be performed through the extended bit replacement operator generating a second output block.

상기 비트치환 수행부는 상기 제1 및 제2 치환블록들을 배타적 부정 논리합 연산하여 제1 출력 블록을 생성하고, 상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 부정 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행할 수 있다.The bit replacement execution unit generates the first output block by performing the exclusive negation operation on the first and second replacement blocks, and applies the bit replacement operator to the first output block, and then exclusive exclusion operation with the second replacement block. By performing the operation, the bit replacement may be performed through the extended bit replacement operator generating a second output block.

실시예들 중에서, 비트치환 연산기는 제1 입력비트 및 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제3 입력비트와 배타적 논리합 연산을 수행함으로써 제1 출력비트를 생성하는 제1 출력비트 생성부, 상기 제1 입력비트 및 제3 입력비트를 기초로 부정 논리합 연산을 수행한 후 제4 입력비트와 배타적 논리합 연산을 수행함으로써 제2 출력비트를 생성하는 제2 출력비트 생성부, 상기 제2 출력비트와 상기 제2 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제1 입력비트와 배타적 논리합 연산을 수행함으로써 제3 출력비트를 생성하는 제3 출력비트 생성부 및 상기 제1 출력비트와 상기 제4 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제2 입력비트와 배타적 논리합 연산을 수행함으로써 제4 출력비트를 생성하는 제4 출력비트 생성부를 포함한다.Among the embodiments, the bit replacement operator performs a logical multiplication operation based on the first input bit and the second input bit and then performs an exclusive OR operation with the third input bit to generate a first output bit. A second output bit generator for generating a second output bit by performing an exclusive OR operation with the fourth input bit after performing the negative OR operation on the basis of the first input bit and the third input bit, the second A third output bit generator and a first output bit that generate a third output bit by performing an exclusive OR operation with the first input bit after performing a logical product operation based on the two output bits and the second input bit. And a fourth output bit generator configured to generate a fourth output bit by performing an exclusive OR operation with the second input bit after performing a logical product operation based on the fourth input bit.

실시예들 중에서, 확장 비트치환 연산기는 제1 및 제2 입력블록들에 대해 비트치환 연산기를 적용하여 제1 및 제2 치환블록들을 생성하는 치환블록 생성부, 상기 제1 및 제2 치환블록들을 기초로 제1 논리 연산을 수행하여 제1 출력블록을 생성하는 제1 출력블록 생성부 및 상기 제1 출력블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 제2 논리 연산을 수행하여 제2 출력블록을 생성하는 제2 출력블록 생성부를 포함한다.Among the embodiments, the extended bit replacement operator applies the bit replacement operator to the first and second input blocks to generate the first and second replacement blocks, and the first and second replacement blocks. A first output block generator for generating a first output block by performing a first logical operation on the basis of the bit replacement operator for the first output block, and then performing the second substitution block and the second logical operation It includes a second output block generating unit for generating a second output block.

제1 출력블록 생성부는 상기 제1 및 제2 치환블록들을 기초로 배타적 논리합 또는 배타적 부정 논리합 연산들 중 어느 하나를 수행하여 상기 제1 출력블록을 생성할 수 있다.The first output block generator may generate the first output block by performing either an exclusive OR or exclusive negative OR operation based on the first and second substitution blocks.

제2 출력블록 생성부는 상기 제1 출력블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 논리합 또는 배타적 부정 논리합 연산들 중 어느 하나를 수행하여 제2 출력블록을 생성할 수 있다.The second output block generation unit may generate the second output block by applying either the bit replacement operator to the first output block and performing either of the second substitution block and the exclusive OR or exclusive negative OR operation.

개시된 기술은 다음의 효과를 가질 수 있다. 다만, 특정 실시예가 다음의 효과를 전부 포함하여야 한다거나 다음의 효과만을 포함하여야 한다는 의미는 아니므로, 개시된 기술의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.The disclosed technology can have the following effects. However, since a specific embodiment does not mean that all of the following effects should be included or only the following effects are included, the scope of rights of the disclosed technology should not be understood as being limited thereby.

본 발명의 일 실시예에 따른 비트치환 연산기는 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성되어 비트치환을 수행할 수 있다.The bit replacement operator according to an embodiment of the present invention is composed of a plurality of first weighted front gates and a plurality of second weighted rear gates so that the output of the front gate operates as an input of the rear gate in a one-to-one relationship. Substitutions can be performed.

본 발명의 일 실시예에 따른 확장 비트치환 연산기는 새로운 비트치환 연산기와 배타적 논리합 및 배타적 부정 논리합 연산의 결합에 의해 생성되어 비트치환을 수행할 수 있다.An extended bit replacement operator according to an embodiment of the present invention may be generated by combining a new bit replacement operator with an exclusive OR and an exclusive negative OR operation to perform bit replacement.

도 1은 본 발명의 일 실시예에 따른 비트치환 연산기를 이용한 암호 시스템을 설명하는 도면이다.
도 2는 도 1에 있는 암호 장치를 설명하는 블록도이다.
도 3은 도 1에 있는 암호 장치를 구성하는 비트치환 연산기를 설명하는 블록도이다.
도 4는 도 3에 있는 비트치환 연산기를 확장한 확장 비트치환 연산기를 설명하는 블록도이다.
도 5는 도 1에 있는 암호 장치에서 수행되는 비트치환 연산기를 이용한 암호 과정을 설명하는 순서도이다.
도 6은 도 3에 있는 비트치환 연산기에서 수행되는 비트치환 연산 과정을 설명하는 순서도이다.
도 7은 도 4에 있는 확장 비트치환 연산기에서 수행되는 확장 비트치환 연산 과정을 설명하는 순서도이다.
도 8은 도 3에 있는 비트치환 연산기의 구조를 설명하는 예시도이다.
도 9는 도 4에 있는 확장 비트치환 연산기의 구조를 설명하는 예시도이다.
1 is a diagram illustrating a cryptographic system using a bit replacement operator according to an embodiment of the present invention.
FIG. 2 is a block diagram illustrating the encryption device in FIG. 1.
FIG. 3 is a block diagram illustrating a bit replacement operator constituting the cryptographic device in FIG. 1.
FIG. 4 is a block diagram illustrating an extended bit-replacement operator that extends the bit-replacement operator shown in FIG. 3.
FIG. 5 is a flowchart illustrating an encryption process using a bit replacement operator performed in the encryption device in FIG. 1.
FIG. 6 is a flow chart illustrating a process of bit-replacement performed in the bit-replacement operator of FIG. 3.
FIG. 7 is a flowchart illustrating an extended bit replacement operation performed in the extended bit replacement operator of FIG. 4.
8 is an exemplary view for explaining the structure of the bit replacement operator in FIG. 3.
9 is an exemplary view for explaining the structure of the extended bit replacement operator in FIG. 4.

본 발명에 관한 설명은 구조적 내지 기능적 설명을 위한 실시예에 불과하므로, 본 발명의 권리범위는 본문에 설명된 실시예에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 본 발명의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다. 또한, 본 발명에서 제시된 목적 또는 효과는 특정 실시예가 이를 전부 포함하여야 한다거나 그러한 효과만을 포함하여야 한다는 의미는 아니므로, 본 발명의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.Since the description of the present invention is only an example for structural or functional description, the scope of the present invention should not be interpreted as being limited by the examples described in the text. That is, since the embodiments can be variously modified and have various forms, it should be understood that the scope of the present invention includes equivalents capable of realizing technical ideas. In addition, the purpose or effect presented in the present invention does not mean that a specific embodiment should include all of them or only such an effect, and the scope of the present invention should not be understood as being limited thereby.

한편, 본 출원에서 서술되는 용어의 의미는 다음과 같이 이해되어야 할 것이다.Meanwhile, the meaning of terms described in the present application should be understood as follows.

"제1", "제2" 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로, 이들 용어들에 의해 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as "first" and "second" are for distinguishing one component from other components, and the scope of rights should not be limited by these terms. For example, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.

어떤 구성요소가 다른 구성요소에 "연결되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결될 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is said to be "connected" to another component, it may be understood that other components may exist in the middle, although it may be directly connected to the other component. On the other hand, when a component is said to be "directly connected" to another component, it should be understood that no other component exists in the middle. On the other hand, other expressions describing the relationship between the components, that is, "between" and "immediately between" or "adjacent to" and "directly neighboring to" should be interpreted similarly.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함하다"또는 "가지다" 등의 용어는 실시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이며, 하나 또는 그 이상의 다른 특징이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions are to be understood as including plural expressions unless the context clearly indicates otherwise, and terms such as “comprises” or “have” are used features, numbers, steps, actions, elements, parts or the like. It is to be understood that a combination is intended to indicate the existence, and does not preclude the existence or addition possibility of one or more other features or numbers, steps, operations, components, parts or combinations thereof.

각 단계들에 있어 식별부호(예를 들어, a, b, c 등)는 설명의 편의를 위하여 사용되는 것으로 식별부호는 각 단계들의 순서를 설명하는 것이 아니며, 각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않는 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.In each step, the identification code (for example, a, b, c, etc.) is used for convenience of explanation. The identification code does not describe the order of each step, and each step clearly identifies a specific order in context. Unless stated, it may occur in a different order than specified. That is, each step may occur in the same order as specified, or may be performed substantially simultaneously, or in the reverse order.

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

여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 본 발명이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.All terms used herein have the same meaning as generally understood by a person skilled in the art to which the present invention pertains, unless otherwise defined. The terms defined in the commonly used dictionary should be interpreted to be consistent with the meanings in the context of related technologies, and cannot be interpreted as having ideal or excessively formal meanings unless explicitly defined in the present application.

도 1은 본 발명의 일 실시예에 따른 비트치환 연산기를 이용한 암호 시스템을 설명하는 도면이다.1 is a diagram illustrating a cryptographic system using a bit replacement operator according to an embodiment of the present invention.

도 1을 참조하면, 비트치환 연산기를 이용한 암호 시스템(100)은 사용자 단말(110), 암호 장치(130) 및 데이터베이스(150)를 포함할 수 있다.Referring to FIG. 1, the encryption system 100 using a bit replacement operator may include a user terminal 110, an encryption device 130, and a database 150.

사용자 단말(110)은 암호화 대상이 되는 평문 또는 복호화 대상이 되는 암호문을 제공할 수 있는 컴퓨팅 장치에 해당할 수 있다. 사용자 단말(110)은 스마트폰, 노트북 또는 컴퓨터로 구현될 수 있으며, 반드시 이에 한정되지 않고, 태블릿 PC 등 다양한 디바이스로도 구현될 수 있다. 사용자 단말(110)은 암호 장치(130)와 네트워크를 통해 연결될 수 있고, 복수의 사용자 단말(110)들은 암호 장치(130)와 동시에 연결될 수 있다.The user terminal 110 may correspond to a computing device capable of providing a plaintext that is an encryption target or a ciphertext that is a decryption target. The user terminal 110 may be implemented as a smart phone, a laptop, or a computer, and is not limited thereto, and may be implemented as various devices such as a tablet PC. The user terminal 110 may be connected to the encryption device 130 through a network, and a plurality of user terminals 110 may be connected to the encryption device 130 simultaneously.

암호 장치(130)는 평문을 암호화하여 암호문을 생성하거나 또는 암호문을 복호화하여 평문을 생성할 수 있는 컴퓨터 또는 프로그램에 해당하는 서버로 구현될 수 있다. 암호 장치(130)는 사용자 단말(110)과 유선 네트워크 또는 블루투스, WiFi 등과 같은 무선 네트워크로 연결될 수 있고, 유선 또는 무선 네트워크를 통해 사용자 단말(110)과 통신을 수행할 수 있다. 일 실시예에서, 암호 장치(130)는 데이터베이스(150)와 연동하여 평문의 암호화 및 암호문의 복호화에 필요한 다양한 정보들을 저장할 수 있다. 한편, 암호 장치(130)는 도 1과 달리, 데이터베이스(150)를 내부에 포함하여 구현될 수 있다.The encryption device 130 may be implemented as a server corresponding to a computer or program capable of generating a ciphertext by encrypting the plaintext or decrypting the ciphertext to generate the plaintext. The encryption device 130 may be connected to the user terminal 110 through a wired network or a wireless network such as Bluetooth or WiFi, and may communicate with the user terminal 110 through a wired or wireless network. In one embodiment, the encryption device 130 may store various information necessary for encryption of the plain text and decryption of the encryption text in conjunction with the database 150. Meanwhile, unlike the FIG. 1, the encryption device 130 may be implemented by including the database 150 therein.

일 실시예에서, 암호 장치(130)는 블록암호 알고리즘, 특히 경량 블록암호 알고리즘을 사용하여 암호화 및 복호화를 수행할 수 있다. 예를 들어, 암호 장치(130)는 국제 표준 경량 블록암호 알고리즘에 해당하는 PRESENT, CLEFIA 등을 사용하여 암호화 및 복호화를 수행할 수 있다. 또한, 암호 장치(130)는 국내 표준 경량 블록암호 알고리즘에 해당하는 LEA, HIGHT 등을 사용하여 암호화 및 복호화를 수행할 수 있다.In one embodiment, the encryption device 130 may perform encryption and decryption using a block encryption algorithm, particularly a lightweight block encryption algorithm. For example, the encryption device 130 may perform encryption and decryption using PRESENT, CLEFIA, etc. corresponding to the international standard lightweight block encryption algorithm. In addition, the encryption device 130 may perform encryption and decryption using LEA, HIGHT, and the like corresponding to the domestic standard lightweight block encryption algorithm.

데이터베이스(150)는 암호 장치(130)가 평문의 암호화 및 암호문의 복호화를 수행하는 과정에서 필요한 다양한 정보들을 저장할 수 있다. 예를 들어, 데이터베이스(150)는 사용자 단말(110)로부터 수신한 평문 또는 암호문 파일을 저장할 수 있고, 암호화 또는 복호화에 사용할 암호 알고리즘에 관한 정보들을 저장할 수 있으며, 반드시 이에 한정되지 않고, 평문의 암호화 또는 암호문의 복호화 과정에서 다양한 형태로 수집 또는 가공된 정보들을 저장할 수 있다.The database 150 may store various pieces of information required in the process of encrypting plaintext and decrypting the ciphertext. For example, the database 150 may store the plaintext or the ciphertext file received from the user terminal 110, and may store information about an encryption algorithm to be used for encryption or decryption, but is not limited thereto, and the encryption of the plaintext Or, in the process of decrypting the ciphertext, information collected or processed in various forms may be stored.

도 2는 도 1에 있는 암호 장치를 설명하는 블록도이다.FIG. 2 is a block diagram illustrating the encryption device in FIG. 1.

도 2를 참조하면, 암호 장치(130)는 평문 수신부(210), 비트치환 수행부(230), 암호문 생성부(250) 및 제어부(270)를 포함할 수 있다.Referring to FIG. 2, the encryption device 130 may include a plaintext receiving unit 210, a bit replacement performing unit 230, an encryption text generating unit 250, and a control unit 270.

평문 수신부(210)는 사용자 단말(110)로부터 암호화되는 평문을 수신할 수 있다. 평문 수신부(210)는 사용자 단말(110)로부터 평문과 함께 암호화에 사용되는 암호화 키를 수신하거나 또는 사용자 단말(110)로부터 획득한 사용자 정보를 기초로 암호화 키를 독립적으로 생성할 수 있다. 평문 수신부(210)는 사용자 단말(110)과의 통신 없이도 데이터베이스(150)에 저장된 평문을 대상으로 암호화를 수행하여 암호문을 생성할 수 있다. 여기에서, 암호화 대상이 되는 평문은 암호화되지 않은 텍스트에 해당할 수 있으나, 암호 장치(130)는 반드시 이에 해당하지 않고 비트열로 표현 가능한 다양한 데이터를 평문으로 변환하여 암호화를 수행할 수 있다.The plaintext receiving unit 210 may receive the encrypted plaintext from the user terminal 110. The plaintext receiving unit 210 may receive an encryption key used for encryption together with the plaintext from the user terminal 110 or independently generate an encryption key based on user information obtained from the user terminal 110. The plaintext receiving unit 210 may generate an encrypted text by performing encryption on the plaintext stored in the database 150 without communication with the user terminal 110. Here, the plaintext that is to be encrypted may correspond to unencrypted text, but the encryption device 130 does not necessarily correspond to this, and converts various data that can be expressed as a bit string into plaintext to perform encryption.

일 실시예에서, 평문 수신부(210)는 평문을 동일한 크기를 가지는 복수의 블록들로 분할하고 마지막 블록의 크기가 상이한 경우 패딩(padding) 연산을 수행할 수 있다. 암호 장치(130)에서 암호화를 위하여 블록 암호 알고리즘을 사용하는 경우, 평문 수신부(210)는 암호 장치(130)에서 암호화 과정이 원활하게 수행되도록 평문을 동일한 크기를 가지는 복수의 블록들로 사전에 분할할 수 있다. 평문 수신부(210)는 평문의 크기가 다양하기 때문에 마지막으로 분할되는 블록의 크기가 다른 블록들의 크기와 상이한 경우 패딩(padding) 연산을 수행하여 다른 블록들의 크기와 동일하게 가공할 수 있다.In one embodiment, the plaintext receiver 210 may divide the plaintext into a plurality of blocks having the same size and perform a padding operation when the size of the last block is different. When the block encryption algorithm is used for encryption in the encryption device 130, the plaintext receiving unit 210 divides the plaintext into a plurality of blocks having the same size in advance so that the encryption process is smoothly performed in the encryption device 130. can do. Since the size of the plaintext is different, since the plaintext receiving unit 210 has a different size of the plaintext, a padding operation may be performed to process the same size as the size of other blocks when the size of the last divided block is different from that of other blocks.

비트치환 수행부(230)는 암호 장치(130)에서 수행되는 암호화 과정에서 비트치환을 수행할 수 있다. 비트치환은 암호화의 중간과정에서 생성되는 비트열의 순서를 섞거나 비트열의 값을 변경하는 연산에 해당할 수 있고, 암호 장치(130)는 암호화 과정의 중간에서 비트치환 연산을 수행하여 외부 공격자의 예측 불가능성을 높일 수 있다. 보다 구체적으로, 비트치환 수행부(230)는 평문에 암호화 키로 제1 암호화 과정을 수행하여 제1 암호문을 생성하고 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성된 비트치환 연산기를 통해 제1 암호문의 비트치환을 수행할 수 있다.The bit replacement performing unit 230 may perform bit replacement in an encryption process performed by the encryption device 130. The bit replacement may correspond to an operation of mixing the sequence of bit streams generated in the middle of encryption or changing the value of the bit string, and the encryption device 130 performs a bit replacement operation in the middle of the encryption process to predict an external attacker. Impossible can be increased. More specifically, the bit replacement performing unit 230 generates a first ciphertext by performing a first encryption process with an encryption key on the plaintext, and each of the plurality of first such that the output of the front end gate is operated as the input of the rear end gate as a one-to-one relationship. Bit replacement of the first ciphertext may be performed through a bit replacement operator consisting of weighted front-end gates and a plurality of second-weighted rear-gates.

여기에서, 제1 암호화 과정은 평문을 암호화하여 암호문을 생성하는 과정 중에서 암호화 과정의 시작부터 특정 비트치환 연산 시작 전까지의 과정에 해당할 수 있고, 제2 암호화 과정은 해당 비트치환 연산 후부터 암호화 과정의 끝까지의 과정에 해당할 수 있다. 즉, 암호 장치(130)는 암호 알고리즘을 통해 평문의 암호화를 수행할 수 있고, 암호화에 사용되는 암호 알고리즘이 특정 비트치환 연산을 포함하여 구성된 경우 전체 암호화 과정을 해당 비트치환 연산을 기준으로 비트치환 연산의 전반부와 후반부로 구분할 수 있다. 이 경우 비트치환 연산의 전반부는 제1 암호화 과정에 해당하고 비트치환 연산의 후반부는 제2 암호화 과정에 해당할 수 있다.Here, the first encryption process may correspond to a process from the start of the encryption process to the start of a specific bit replacement operation in the process of generating a cipher text by encrypting the plain text, and the second encryption process is performed after the corresponding bit replacement operation. It can be a process to the end. That is, the encryption device 130 may perform encryption of plain text through an encryption algorithm, and if the encryption algorithm used for encryption is configured to include a specific bit replacement operation, the entire encryption process is bit substituted based on the corresponding bit replacement operation. It can be divided into the first half and the second half of the calculation. In this case, the first half of the bit replacement operation may correspond to the first encryption process and the second half of the bit replacement operation may correspond to the second encryption process.

암호 알고리즘은 비트치환 연산을 적어도 하나 포함하여 구현될 수 있고, 구현 방식에 따라 사용되는 비트치환 연산의 위치와 개수가 가변적일 수 있다. 따라서, 암호 장치(130)에서 수행되는 비트치환 연산은 적어도 하나의 단계에서 연속하여 수행되거나 각각 독립적으로 수행될 수 있다. 암호 장치(130)에서 수행되는 비트치환 연산이 복수인 경우, 비트치환 수행부(230)에서 수행되는 특정 비트치환 연산을 중심으로 암호화 과정의 전반부와 후반부가 구분되기 때문에 암호화 과정의 전반부 또는 후반부 내부에 해당 비트치환 연산과 독립적인 별도의 비트치환 연산이 포함될 수 있다.The cryptographic algorithm may be implemented by including at least one bit-replacement operation, and the location and number of bit-replacement operations used may vary depending on the implementation method. Accordingly, the bit-replacement operation performed in the encryption device 130 may be continuously performed in at least one step or may be performed independently of each other. When there are a plurality of bit-replacement operations performed by the encryption device 130, the first and second half of the encryption process are distinguished because the first half and the second half of the encryption process are distinguished based on a specific bit-replacement operation performed by the bit replacement execution unit 230. A bit replacement operation independent of the corresponding bit replacement operation may be included.

비트치환 수행부(230)는 평문과 암호화 키를 이용하여 제1 암호화 과정을 수행하여 제1 암호문을 생성할 수 있다. 제1 암호문은 제1 암호화 과정을 수행하여 생성되는 중간값에 해당할 수 있고 비트치환 연산에서 입력으로 사용될 수 있다. 비트치환 수행부(230)는 비트치환 연산기를 통해 비트치환 연산을 수행할 수 있고, 비트치환 연산기는 비트치환을 수행하는 장치에 해당할 수 있다. 비트치환 연산기는 소프트웨어 또는 하드웨어로 구현될 수 있고, 하드웨어 구현에 있어서 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성될 수 있다. 전단 게이트와 후단 게이트 각각은 게이트 가중치를 가질 수 있고, 전단 게이트는 제1 가중치를 가지고 후단 게이트는 제2 가중치를 가질 수 있다. 제1 가중치와 제2 가중치는 서로 다를 수 있다.The bit replacement execution unit 230 may generate a first ciphertext by performing a first encryption process using a plaintext and an encryption key. The first ciphertext may correspond to an intermediate value generated by performing the first encryption process and may be used as an input in a bit replacement operation. The bit replacement execution unit 230 may perform a bit replacement operation through a bit replacement operator, and the bit replacement operator may correspond to a device that performs bit replacement. The bit replacement operator may be implemented in software or hardware, and in hardware implementation, each of a plurality of first weighted front gates and a plurality of second weighted rear gates such that the output of the front gate operates as an input of the rear gate in a one-to-one relationship. It can be composed of. Each of the front gate and the rear gate may have a gate weight, the front gate may have a first weight, and the rear gate may have a second weight. The first weight and the second weight may be different.

일 실시예에서, 비트치환 수행부(230)는 하나의 부정 논리합 연산 게이트와 3개의 논리곱 연산 게이트들을 복수의 제1 가중치 전단 게이트들로서 사용하는 비트치환 연산기를 통해 비트치환을 수행할 수 있다. 예를 들어, 부정 논리합 연산 게이트는 NOR 게이트에 해당할 수 있고, 논리곱 연산 게이트는 AND 게이트에 해당할 수 있다. 비트치환 연산기는 4비트 길이의 비트열을 출력할 수 있고, 출력되는 각 비트를 생성하기 위하여 적어도 2번의 연속되는 게이트 연산을 수행할 수 있다. 제1 가중치 전단 게이트는 출력비트 생성을 위해 필요한 2번의 연속되는 게이트 연산 중에서 첫 번째 게이트 연산을 수행하는 연산 게이트에 해당할 수 있다.In one embodiment, the bit-replacement performing unit 230 may perform bit-replacement through a bit-replacement operator that uses one negative OR gate and three logical-coefficient gates as a plurality of first weighted front-end gates. For example, the negative OR gate may correspond to a NOR gate, and the logical OR gate may correspond to an AND gate. The bit-replacement operator can output a bit stream of 4 bits in length, and can perform at least two consecutive gate operations to generate each output bit. The first weighted front-end gate may correspond to an operation gate that performs the first gate operation among two consecutive gate operations required for output bit generation.

일 실시예에서, 비트치환 수행부(230)는 4개의 배타적 논리합 연산 게이트들을 복수의 제2 가중치 후단 게이트들로서 사용하는 비트치환 연산기를 통해 비트치환을 수행할 수 있다. 제2 가중치 후단 게이트는 출력비트 생성을 위해 필요한 2번의 연속되는 게이트 연산 중에서 두 번째 게이트 연산을 수행하는 연산 게이트에 해당할 수 있다. 비트치환 수행부(230)는 첫 번째 게이트 연산을 수행하는 부정 논리합 연산 게이트 또는 논리곱 연산 게이트에서 출력되는 값을 하나의 입력으로 하여 제2 가중치 후단 게이트를 통해 두 번째 게이트 연산을 수행할 수 있으며, 제2 가중치 후단 게이트는 모두 배타적 논리합 연산 게이트에 해당할 수 있다.In one embodiment, the bit replacement performing unit 230 may perform bit replacement through a bit replacement operator that uses four exclusive OR gates as a plurality of second weighted trailing gates. The second weighted rear-end gate may correspond to an operation gate performing a second gate operation among two consecutive gate operations required for output bit generation. The bit replacement execution unit 230 may perform the second gate operation through the second weighted rear-end gate using a value output from the negative OR sum gate or the logical multiplication gate performing the first gate operation as one input. , The second weighted trailing gates may all correspond to exclusive OR gates.

일 실시예에서, 비트치환 수행부(230)는 비트치환 연산기를 통해 암호화 과정에서의 비트치환 연산을 수행할 수 있다. 비트치환 연산기는 비트치환을 수행하는 장치에 해당할 수 있고, 특정 길이의 비트열을 입력으로 하여 동일한 길이의 비트열을 출력할 수 있다. 비트치환 연산기에 대해서는 도3에서 보다 자세히 설명한다.In one embodiment, the bit replacement performing unit 230 may perform a bit replacement operation in an encryption process through a bit replacement operator. The bit replacement operator may correspond to a device that performs bit replacement, and may output a bit string of the same length by using a bit string of a specific length as an input. The bit replacement operator will be described in more detail in FIG. 3.

일실시예에서, 비트치환 수행부(230)는 제1 및 제2 입력블록들에 대해 비트치환 연산기를 적용하여 제1 및 제2 치환블록들을 생성하고, 제1 및 제2 치환블록들을 기초로 비트치환 연산기와 배타적 논리합 및 배타적 부정 논리합 연산을 결합하여 생성된 확장 비트치환 연산기를 통해 비트치환을 수행할 수 있다. 확장 비트치환 연산기는 비트치환을 수행하는 장치에 해당할 수 있고, 특정 길이의 비트열을 입력으로 하여 동일한 길이의 비트열을 출력할 수 있다. 또한, 확장 비트치환 연산기는 비트치환 연산기를 이용하여 구현될 수 있고, 확장 비트치환 연산기에 대해서는 도 4에서 보다 자세히 설명한다.In one embodiment, the bit replacement performing unit 230 generates first and second replacement blocks by applying a bit replacement operator to the first and second input blocks, and based on the first and second replacement blocks Bit replacement may be performed through an extended bit replacement operator generated by combining a bit replacement operator with an exclusive OR and an exclusive negative OR operation. The extended bit replacement operator may correspond to a device that performs bit replacement, and may output bit strings of the same length by inputting bit strings of a specific length. In addition, the extended bit replacement operator may be implemented using a bit replacement operator, and the extended bit replacement operator will be described in more detail in FIG. 4.

암호문 생성부(250)는 제1 암호화 과정을 거쳐 비트치환 연산을 통해 생성된 비트열을 기초로 제2 암호화 과정을 수행하여 제2 암호문을 생성할 수 있다. 제2 암호문은 평문을 기초로 암호 알고리즘, 특히 블록암호 알고리즘을 적용하여 생성되는 최종적인 암호문에 해당할 수 있고, 제1 암호문을 기초로 제2 암호화 과정을 수행하여 생성되는 암호문에 해당할 수 있다. 제2 암호화 과정은 비트치환 연산을 수행한 이후의 암호화 과정에 해당할 수 있고 사용하는 암호 알고리즘에 따라 제2 암호화 과정에서 추가적인 비트치환 연산이 수행될 수 있다.The ciphertext generation unit 250 may generate a second ciphertext by performing a second encryption process based on a bit string generated through a bit replacement operation through a first encryption process. The second ciphertext may correspond to a final ciphertext generated by applying an encryption algorithm, particularly a block cipher algorithm, based on the plaintext, and may correspond to a ciphertext generated by performing a second encryption process based on the first ciphertext. . The second encryption process may correspond to an encryption process after performing the bit replacement operation, and additional bit replacement operations may be performed in the second encryption process according to the encryption algorithm used.

제어부(270)는 암호 장치(130)의 전체적인 동작을 제어하고, 평문 수신부(210), 비트치환 수행부(230) 및 암호문 생성부(250) 간의 제어 흐름 또는 데이터 흐름을 관리할 수 있다.The control unit 270 may control the overall operation of the encryption device 130 and manage a control flow or data flow between the plaintext reception unit 210, the bit replacement execution unit 230, and the encryption text generation unit 250.

도 3은 도 1에 있는 암호 장치를 구성하는 비트치환 연산기를 설명하는 블록도이다.FIG. 3 is a block diagram illustrating a bit replacement operator constituting the cryptographic device in FIG. 1.

도 3을 참조하면, 비트치환 연산기(300)는 제1 출력비트 생성부(310), 제2 출력비트 생성부(330), 제3 출력비트 생성부(350), 제4 출력비트 생성부(370) 및 비트치환 제어부(390)를 포함할 수 있다. 일 실시예에서, 비트치환 연산기(300)는 4비트 길이의 비트열을 입력으로 수신하여 비트치환 후 4비트 길이의 비트열을 출력할 수 있다. 비트치환 연산기(300)에 입력되는 4비트 길이의 비트열은 왼쪽부터 순서대로 제1 내지 제4 입력비트에 대응될 수 있고, 비트치환 연산기(300)를 통해 출력되는 4비트 길이의 비트열은 왼쪽부터 순서대로 제1, 제3, 제2 및 제4 출력비트에 대응될 수 있다.Referring to FIG. 3, the bit replacement operator 300 includes a first output bit generator 310, a second output bit generator 330, a third output bit generator 350, and a fourth output bit generator ( 370) and a bit replacement control unit 390. In one embodiment, the bit-change operator 300 may receive a 4-bit long bit string as an input and output a 4-bit long bit string after bit replacement. The 4-bit long bit string input to the bit-change operator 300 may correspond to the first to fourth input bits in order from the left, and the 4-bit long bit string output through the bit-change operator 300 is It may correspond to the first, third, second, and fourth output bits in order from the left.

제1 출력비트 생성부(310)는 제1 내지 제3 입력비트를 기초로 제1 출력비트를 생성할 수 있다. 보다 구체적으로, 제1 출력비트 생성부(310)는 제1 입력비트 및 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제3 입력비트와 배타적 논리합 연산을 수행하여 제1 출력비트를 생성할 수 있다. 이 경우 제1 출력비트는 비트치환 연산기(300)를 통해 출력되는 4비트 길이의 비트열에서 왼쪽부터 1번째 비트에 해당할 수 있다.The first output bit generator 310 may generate the first output bit based on the first to third input bits. More specifically, the first output bit generator 310 performs a logical multiplication operation based on the first input bit and the second input bit, and then performs an exclusive OR operation with the third input bit to generate the first output bit. can do. In this case, the first output bit may correspond to the first bit from the left in a 4-bit long bit string output through the bit replacement operator 300.

제2 출력비트 생성부(330)는 제1 입력비트, 제3 입력비트 및 제4 입력비트를 기초로 제2 출력비트를 생성할 수 있다. 보다 구체적으로, 제2 출력비트 생성부(330)는 제1 입력비트 및 제3 입력비트를 기초로 부정 논리합 연산을 수행한 후 제4 입력비트와 배타적 논리합 연산을 수행하여 제2 출력비트를 생성할 수 있다. 이 경우 제2 출력비트는 비트치환 연산기(300)를 통해 출력되는 4비트 길이의 비트열에서 왼쪽부터 3번째 비트에 해당할 수 있다.The second output bit generator 330 may generate a second output bit based on the first input bit, the third input bit, and the fourth input bit. More specifically, the second output bit generator 330 performs a negative OR operation based on the first input bit and the third input bit, and then performs an exclusive OR operation with the fourth input bit to generate a second output bit. can do. In this case, the second output bit may correspond to the third bit from the left in the 4-bit long bit string output through the bit replacement operator 300.

제3 출력비트 생성부(350)는 제1 입력비트, 제2 입력비트 및 제2 출력비트를 기초로 제3 출력비트를 생성할 수 있다. 보다 구체적으로, 제3 출력비트 생성부(350)는 제2 출력비트 및 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제1 입력비트와 배타적 논리합 연산을 수행하여 제3 출력비트를 생성할 수 있다. 이 경우 제3 출력비트는 비트치환 연산기(300)를 통해 출력되는 4비트 길이의 비트열에서 왼쪽부터 2번째 비트에 해당할 수 있다.The third output bit generator 350 may generate a third output bit based on the first input bit, the second input bit, and the second output bit. More specifically, the third output bit generator 350 performs a logical multiplication operation based on the second output bit and the second input bit, and then performs an exclusive OR operation with the first input bit to generate a third output bit. can do. In this case, the third output bit may correspond to the second bit from the left in a 4-bit long bit string output through the bit replacement operator 300.

제4 출력비트 생성부(370)는 제1 출력비트, 제2 입력비트 및 제4 입력비트를 기초로 제4 출력비트를 생성할 수 있다. 보다 구체적으로, 제4 출력비트 생성부(370)는 제1 출력비트 및 제4 입력비트를 기초로 논리곱 연산을 수행한 후 제2 입력비트와 배타적 논리합 연산을 수행하여 제4 출력비트를 생성할 수 있다. 이 경우 제4 출력비트는 비트치환 연산기(300)를 통해 출력되는 4비트 길이의 비트열에서 왼쪽부터 4번째 비트에 해당할 수 있다.The fourth output bit generator 370 may generate a fourth output bit based on the first output bit, the second input bit, and the fourth input bit. More specifically, the fourth output bit generator 370 performs a logical multiplication operation based on the first output bit and the fourth input bit, and then performs an exclusive OR operation with the second input bit to generate a fourth output bit. can do. In this case, the fourth output bit may correspond to the fourth bit from the left in the 4-bit long bit string output through the bit replacement operator 300.

비트치환 제어부(390)는 비트치환 연산기(300)의 전체적인 동작을 제어하고, 제1 출력비트 생성부(310), 제2 출력비트 생성부(330), 제3 출력비트 생성부(350) 및 제4 출력비트 생성부(370) 간의 제어 흐름 또는 데이터 흐름을 관리할 수 있다.The bit replacement control unit 390 controls the overall operation of the bit replacement operator 300, the first output bit generator 310, the second output bit generator 330, the third output bit generator 350 and The control flow or data flow between the fourth output bit generators 370 may be managed.

도 4는 도 3에 있는 비트치환 연산기를 확장한 확장 비트치환 연산기를 설명하는 블록도이다.FIG. 4 is a block diagram illustrating an extended bit-replacement operator that extends the bit-replacement operator in FIG. 3.

확장 비트치환 연산기(400)는 치환블록 생성부(410), 제1 출력블록 생성부(430), 제2 출력블록 생성부(450) 및 확장 비트치환 제어부(470)를 포함할 수 있다. 일 실시예에서, 확장 비트치환 연산기(400)는 비트치환 연산기(300)를 기초로 확장된 비트열에 대한 비트치환 연산을 수행할 수 있다. 확장 비트치환 연산기(400)는 4비트 길이의 비트열을 하나의 블록 단위로 하여 비트치환을 수행할 수 있다. 확장 비트치환 연산기(400)는 2개의 입력블록 즉, 8비트 길이의 비트열을 입력으로 수신하여 비트치환 후 2개의 출력블록 즉, 8비트 길이의 비트열을 출력할 수 있다. The extended bit replacement operator 400 may include a replacement block generator 410, a first output block generator 430, a second output block generator 450, and an extended bit replacement controller 470. In one embodiment, the extended bit replacement operator 400 may perform bit replacement operations on the extended bit string based on the bit replacement operator 300. The extended bit replacement operator 400 may perform bit replacement by using a 4-bit long bit stream as one block unit. The extended bit-replacement operator 400 may receive two input blocks, that is, an 8-bit long bit string, and output two output blocks, that is, an 8-bit long bit string, after bit replacement.

보다 구체적으로, 확장 비트치환 연산기(400)에 입력되는 8비트 길이의 비트열은 왼쪽부터 순서대로 4비트 단위로 구분하여 각각 제1 입력블록, 제2 입력블록을 구성할 수 있고, 확장 비트치환 연산기(400)를 통해 출력되는 8비트 길이의 비트열은 왼쪽부터 순서대로 4비트 단위로 구분하여 각각 제2 출력블록, 제1 출력블록을 구성할 수 있다.More specifically, the 8-bit long bit string input to the extended bit replacement operator 400 may be divided into 4 bit units in order from the left to configure the first input block and the second input block, respectively. The 8-bit long sequence of bits output through the operator 400 can be divided into 4 bit units in order from the left to configure a second output block and a first output block, respectively.

치환블록 생성부(410)는 제1 및 제2 입력블록들에 대해 각각 비트치환 연산기(300)를 적용하여 제1 및 제2 치환블록들을 생성할 수 있다. 제1 및 제2 치환블록들은 제1 및 제2 입력블록에 해당하는 4비트 길이의 비트열을 비트치환 연산기(300)에 입력하여 출력된 4비트 길이의 비트열에 해당할 수 있다. 따라서, 제1 치환블록은 제1 입력블록을 비트치환 연산기(300)에 입력하여 출력된 4비트 길이의 비트열에 해당할 수 있고, 제2 치환블록은 제2 입력블록을 비트치환 연산기(300)에 입력하여 출력된 4비트 길이의 비트열에 해당할 수 있다.The replacement block generator 410 may generate first and second replacement blocks by applying the bit replacement operator 300 to the first and second input blocks, respectively. The first and second replacement blocks may correspond to a 4-bit long bit string output by inputting a 4-bit long bit string corresponding to the first and second input blocks to the bit replacement operator 300. Accordingly, the first substitution block may correspond to a bit string having a length of 4 bits output by inputting the first input block to the bit substitution operator 300, and the second substitution block is a bit substitution operator 300 for the second input block. Corresponds to a 4-bit long bit string input and output.

제1 출력블록 생성부(430)는 제1 및 제2 치환블록들을 기초로 제1 논리 연산을 수행하여 제1 출력블록을 생성할 수 있다. 제1 논리 연산은 비트열 간의 논리 연산에 해당할 수 있고, 논리합, 논리곱 및 배타적 논리합 연산 등을 포함할 수 있다. 일 실시예에서, 제1 출력블록 생성부(430)는 제1 및 제2 치환블록들을 기초로 배타적 논리합 또는 배타적 부정 논리합 연산들 중 어느 하나를 수행하여 제1 출력블록을 생성할 수 있다. 이 경우 제1 출력블록는 확장 비트치환 연산기(400)를 통해 출력되는 8비트 길이의 비트열에서 왼쪽부터 4비트씩 구분할 경우 오른쪽 4비트에 해당할 수 있다.The first output block generator 430 may generate a first output block by performing a first logical operation based on the first and second replacement blocks. The first logical operation may correspond to a logical operation between bit strings, and may include a logical sum, a logical product, and an exclusive logical sum operation. In one embodiment, the first output block generator 430 may generate either the first output block by performing either the exclusive OR or the exclusive negative OR operations based on the first and second replacement blocks. In this case, the first output block may correspond to the right 4 bits in case of dividing 4 bits from the left in an 8-bit long bit string output through the extended bit replacement operator 400.

제2 출력블록 생성부(450)는 제1 출력블록에 대해 비트치환 연산기(300)를 적용한 후 제2 치환블록과 제2 논리 연산을 수행하여 제2 출력블록을 생성할 수 있다. 제2 논리 연산은 비트열 간의 논리 연산에 해당할 수 있고, 논리합, 논리곱 및 배타적 논리합 연산 등을 포함할 수 있다. 일 실시예에서, 제2 출력블록 생성부(450)는 제1 출력블록에 대해 비트치환 연산기(300)를 적용한 후 제2 치환블록과 배타적 논리합 또는 배타적 부정 논리합 연산들 중 어느 하나를 수행하여 제2 출력블록을 생성할 수 있다. 이 경우 제2 출력블록은 확장 비트치환 연산기(400)를 통해 출력되는 8비트 길이의 비트열에서 왼쪽부터 4비트씩 구분할 경우 왼쪽 4비트에 해당할 수 있다.The second output block generator 450 may generate the second output block by applying the bit replacement operator 300 to the first output block and then performing the second substitution block and the second logical operation. The second logical operation may correspond to a logical operation between bit strings, and may include a logical sum, a logical product, and an exclusive logical sum operation. In one embodiment, the second output block generator 450 applies the bit replacement operator 300 to the first output block and then performs any of the second substitution block and the exclusive OR or exclusive negative OR operation to remove the second block. 2 You can create an output block. In this case, the second output block may correspond to the left 4 bits in case of dividing 4 bits from the left in an 8-bit long bit string output through the extended bit replacement operator 400.

확장 비트치환 제어부(470)는 확장 비트치환 연산기(400)의 전체적인 동작을 제어하고, 치환블록 생성부(410), 제1 출력블록 생성부(430) 및 제2 출력블록 생성부(450) 간의 제어 흐름 또는 데이터 흐름을 관리할 수 있다.The extended bit replacement control unit 470 controls the overall operation of the extended bit replacement operator 400, and between the replacement block generator 410, the first output block generator 430, and the second output block generator 450. You can manage control flow or data flow.

도 5는 도 1에 있는 암호 장치에서 수행되는 비트치환 연산기를 이용한 암호 과정을 설명하는 순서도이다.FIG. 5 is a flowchart illustrating an encryption process using a bit replacement operator performed in the encryption device in FIG. 1.

도 5를 참조하면, 암호 장치(130)는 평문 수신부(210)를 통해 암호화 대상이 되는 평문을 수신할 수 있다(단계 S510). 또한, 평문 수신부(210)는 복호화의 대상이 되는 암호문을 수신할 수 있다. 일 실시예에서, 평문 수신부(210)는 평문을 동일한 크기를 가지는 복수의 블록들로 분할하고 마지막 블록의 크기가 상이한 경우 패딩 연산을 수행할 수 있다.Referring to FIG. 5, the encryption device 130 may receive the plaintext to be encrypted through the plaintext receiving unit 210 (step S510). In addition, the plaintext receiving unit 210 may receive a ciphertext to be decrypted. In one embodiment, the plaintext receiver 210 may divide the plaintext into a plurality of blocks having the same size and perform a padding operation when the size of the last block is different.

암호 장치(130)는 비트치환 수행부(230)를 통해 평문에 암호화 키로 제1 암호화 과정을 수행하여 제1 암호문을 생성하고 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성된 비트치환 연산기(300)를 통해 제1 암호문의 비트치환을 수행할 수 있다(단계 S530).The encryption device 130 generates the first encryption text by performing the first encryption process with the encryption key on the plain text through the bit replacement execution unit 230, and each has a one-to-one relationship such that the output of the front gate is operated as the input of the rear gate. Bit replacement of the first ciphertext may be performed through the bit replacement operator 300 including the first weighted front gates and a plurality of second weighted rear gates (step S530).

암호 장치(130)는 암호문 생성부(250)를 통해 비트치환된 제1 암호문에 관한 제2 암호화 과정을 수행하여 제2 암호문을 생성할 수 있다(단계 550).The encryption device 130 may generate a second ciphertext by performing a second encryption process on the first ciphertext that is bit-exchanged through the ciphertext generation unit 250 (step 550).

도 6은 도 3에 있는 비트치환 연산기에서 수행되는 비트치환 연산 과정을 설명하는 순서도이다.FIG. 6 is a flow chart illustrating a process of bit-replacement performed in the bit-replacement operator of FIG. 3.

도 6을 참조하면, 비트치환 연산기(300)는 제1 출력비트 생성부(610)를 통해 제1 입력비트 및 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제3 입력비트와 배타적 논리합 연산을 수행함으로써 제1 출력비트를 생성할 수 있다(단계 S610). 비트치환 연산기(300)는 제2 출력비트 생성부(630)를 통해 제1 입력비트 및 제3 입력비트를 기초로 부정 논리합 연산을 수행한 후 제4 입력비트와 배타적 논리합 연산을 수행함으로써 제2 출력비트를 생성할 수 있다(단계 S630).Referring to FIG. 6, the bit replacement operator 300 performs an logical multiplication operation based on the first input bit and the second input bit through the first output bit generator 610 and then performs an exclusive OR with the third input bit. A first output bit may be generated by performing an operation (step S610). The bit replacement operator 300 performs a negative OR operation based on the first input bit and the third input bit through the second output bit generator 630 and then performs an exclusive OR operation with the fourth input bit. An output bit may be generated (step S630).

비트치환 연산기(300)는 제3 출력비트 생성부(650)를 통해 제2 출력비트와 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제1 입력비트와 배타적 논리합 연산을 수행함으로써 제3 출력비트를 생성할 수 있다(단계 S650). 비트치환 연산기(300)는 제4 출력비트 생성부(670)를 통해 제1 출력비트와 제4 입력비트를 기초로 논리곱 연산을 수행한 후 제2 입력비트와 배타적 논리합 연산을 수행함으로써 제4 출력비트를 생성할 수 있다(단계 S670).The bit replacement operator 300 performs a logical multiplication operation based on the second output bit and the second input bit through the third output bit generator 650 and then performs an exclusive OR operation with the first input bit. An output bit can be generated (step S650). The bit replacement operator 300 performs a logical multiplication operation based on the first output bit and the fourth input bit through the fourth output bit generator 670 and then performs an exclusive OR operation with the second input bit. An output bit can be generated (step S670).

따라서, 비트치환 연산기(300)는 왼쪽부터 순서대로 제1 내지 제4 입력비트에 대응되는 4비트 길이의 비트열을 수신하여 비트치환을 통해 왼쪽부터 순서대로 제1, 제3, 제2 및 제4 출력비트에 대응되는 4비트 길이의 비트열을 출력할 수 있다.Therefore, the bit replacement operator 300 receives the bit strings of 4 bits in length corresponding to the first to fourth input bits in order from the left to the first, third, second and first in order from the left through bit replacement. A bit string having a length of 4 bits corresponding to 4 output bits can be output.

도 7은 도 4에 있는 확장 비트치환 연산기에서 수행되는 확장 비트치환 연산 과정을 설명하는 순서도이다.FIG. 7 is a flowchart illustrating an extended bit replacement operation performed in the extended bit replacement operator of FIG. 4.

도 7을 참조하면, 확장 비트치환 연산기(400)는 치환블록 생성부(410)를 통해 제1 및 제2 입력블록들에 대해 비트치환 연산기를 적용하여 제1 및 제2 치환블록들을 생성할 수 있다(단계 S710). 확장 비트치환 연산기(400)는 제1 출력블록 생성부(430)를 통해 제1 및 제2 치환블록들을 기초로 제1 논리 연산을 수행하여 제1 출력블록을 생성할 수 있다(단계 S730). 확장 비트치환 연산기(400)는 제2 출력블록 생성부(450)를 통해 제1 출력블록에 대해 비트치환 연산기를 적용한 후 제2 치환블록과 제2 논리 연산을 수행할 수 있다(단계 S750).Referring to FIG. 7, the extended bit replacement operator 400 may generate first and second replacement blocks by applying a bit replacement operator to the first and second input blocks through the replacement block generator 410. There is (step S710). The extended bit replacement operator 400 may generate a first output block by performing a first logical operation based on the first and second replacement blocks through the first output block generator 430 (step S730). The extended bit replacement operator 400 may perform a second replacement block and a second logical operation after applying the bit replacement operator to the first output block through the second output block generator 450 (step S750).

일 실시예에서, 확장 비트치환 연산기(400)는 비트치환 연산기(300)를 기초로 확장된 비트열에 대한 비트치환 연산을 수행할 수 있다. 확장 비트치환 연산기(400)는 왼쪽부터 순서대로 4비트 단위로 구분하여 각각 제1 입력블록 및 제2 입력블록을 구성하는 8비트 길이의 비트열을 수신할 수 있고, 비트치환을 수행한 후 왼쪽부터 순서대로 4비트 단위로 구분하여 각각 제2 출력블록 및 제1 출력블록을 구성하는 8비트 길이의 비트열을 출력할 수 있다.In one embodiment, the extended bit replacement operator 400 may perform bit replacement operations on the extended bit string based on the bit replacement operator 300. The extended bit replacement operator 400 can receive a bit stream of 8 bits in length, each of which constitutes a first input block and a second input block, divided into 4 bit units in order from the left. After performing bit replacement, the left It can be divided into 4 bit units in order, and output a bit stream of 8 bit length constituting the second output block and the first output block, respectively.

도 8은 도 3에 있는 비트치환 연산기의 구조를 설명하는 예시도이다.8 is an exemplary view for explaining the structure of the bit replacement operator in FIG. 3.

도 8을 참조하면, 비트치환 연산기(300)는 4비트 길이의 비트열을 입력으로 수신하여 4비트 길이의 비트열을 출력할 수 있다. 비트치환 연산기(300)에 입력되는 4비트 길이의 비트열은 왼쪽부터 순서대로 제1 입력비트(811), 제2 입력비트(812), 제3 입력비트(813) 및 제4 입력비트(814)에 대응될 수 있다. 비트치환 연산기(300)에서 출력되는 4비트 길이의 비트열은 왼쪽부터 순서대로 제1 출력블록(831), 제3 출력블록(832), 제2 출력블록(833) 및 제4 출력블록(834)에 대응될 수 있다.Referring to FIG. 8, the bit replacement operator 300 may receive a 4-bit long bit string as an input and output a 4-bit long bit string. The bit sequence of the 4-bit length input to the bit replacement operator 300 is first input bit 811, second input bit 812, third input bit 813, and fourth input bit 814 in order from the left. ). The bit sequence having a length of 4 bits output from the bit replacement operator 300 is in order from the left to the first output block 831, the third output block 832, the second output block 833, and the fourth output block 834. ).

일 실시예에서, 비트치환 연산기(300)는 3개의 논리곱 연산 게이트(851)들, 4개의 배타적 논리합 연산 게이트(853)들 및 1개의 부정 논리합 연산 게이트(855)를 포함하여 구현될 수 있다. 또한, 비트치환 연산기(300)는 1개의 부정 논리합 연산 게이트(855)와 3개의 논리곱 연산 게이트(851)들을 복수의 제1 가중치 전단 게이트들로 포함할 수 있고, 4개의 배타적 논리합 연산 게이트(853)들을 복수의 제2 가중치 후단 게이트들로 포함할 수 있으며, 전단 게이트 및 후단 게이트 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 구성될 수 있다.In one embodiment, the bit-replacement operator 300 may be implemented including three logical multiplication gates 851, four exclusive OR gates 853 and one negative OR gate gate 855. . In addition, the bit replacement operator 300 may include one negative OR sum gate 855 and three logical OR gates 851 as a plurality of first weighted shear gates, and four exclusive OR sum gates ( 853) may include a plurality of second weighted rear gates, and each of the front gate and the rear gate may be configured such that the output of the front gate operates as an input of the rear gate as a one-to-one relationship.

도 9는 도 4에 있는 확장 비트치환 연산기의 구조를 설명하는 예시도이다.FIG. 9 is an exemplary view for explaining the structure of the extended bit replacement operator in FIG. 4.

도 9를 참조하면, 확장 비트치환 연산기(400)는 비트치환 연산기(951)와 배타적 논리합 연산(953) 및 배타적 부정 논리합 연산(955)을 결합하여 구현될 수 있다. 도 9의 그림 (a) 내지 (d)는 다양한 조합들 중에서 효율성과 안전성을 가장 높게 만족시키는 확장 구조들에 해당될 수 있다. 확장 비트치환 연산기(400)는 4비트 길이의 비트열에 해당하는 제1 입력블록(911)과 제2 입력블록(912)를 입력으로 수신하여 4비트 길이의 비트열에 해당하는 제1 출력블록(932)과 제2 출력블록(931)을 출력할 수 있다. 따라서, 확장 비트치환 연산기(400)는 8비트 길이의 비트열을 입력으로 수신하여 비트치환 후 8비트 길이의 비트열을 출력할 수 있다.Referring to FIG. 9, the extended bit-replacement operator 400 may be implemented by combining the bit-replacement operator 951 and the exclusive OR operation 953 and the exclusive negative OR operation 955. 9 (a) to (d) of FIG. 9 may correspond to extension structures satisfying the highest efficiency and safety among various combinations. The extended bit substitution operator 400 receives the first input block 911 and the second input block 912 corresponding to a 4-bit long bit string as input, and the first output block 932 corresponding to a 4-bit long bit string. ) And the second output block 931 may be output. Accordingly, the extended bit replacement operator 400 may receive an 8-bit long bit string as an input and output an 8-bit long bit string after bit replacement.

확장 비트치환 연산기(400)는 총 3개의 비트치환 연산기(951)들과 2개의 논리 연산으로 구성될 수 있다. 도 9에서, 그림 (a)는 2개의 배타적 논리합 연산(953)들로 구성된 확장 비트치환 연산기(400)에 해당하고, 그림 (b)와 (c)는 1개의 배타적 논리합 연산(953)과 1개의 배타적 부정 논리합 연산(955)으로 구성된 확장 비트치환 연산기(400)에 해당하며, 그림 (d)는 2개의 배타적 부정 논리합 연산(955)들로 구성된 확장 비트치환 연산기(400)에 해당할 수 있다.The extended bit replacement operator 400 may be composed of a total of three bit replacement operators 951 and two logical operations. In Fig. 9, Figure (a) corresponds to an extended bit-replacement operator 400 composed of two exclusive OR operations 953, and Figures (b) and (c) show one exclusive OR operation 953 and 1 Corresponds to the extended bit-replacement operator 400 composed of two exclusive negative OR operations 955, and figure (d) may correspond to the extended bit-replacement operator 400 composed of two exclusive negative OR operations 955. .

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although described above with reference to preferred embodiments of the present invention, those skilled in the art variously modify and change the present invention without departing from the spirit and scope of the present invention as set forth in the claims below. You can understand that you can.

100: 비트치환 연산기를 이용한 암호 시스템
110: 사용자 단말 130: 암호 장치
150: 데이터베이스
210: 평문 수신부 230: 비트치환 수행부
250: 암호문 생성부 270: 제어부
300: 비트치환 연산기 400: 확장 비트치환 연산기
811 내지 814: 제1 내지 제4 입력비트
831: 제1 출력비트 832: 제3 출력비트
833: 제2 출력비트 834: 제4 출력비트
851: 논리곱 연산 게이트 853: 배타적 논리합 연산 게이트
855: 부정 논리합 연산 게이트
911: 제1 입력블록 912: 제2 입력블록
931: 제2 출력블록 932: 제1 출력블록
951: 비트치환 연산기 953: 배타적 논리합 연산
955: 배타적 부정 논리합 연산
100: cryptographic system using a bit replacement operator
110: user terminal 130: encryption device
150: database
210: plain text receiving unit 230: bit replacement performing unit
250: ciphertext generation unit 270: control unit
300: bit replacement operator 400: extended bit replacement operator
811 to 814: first to fourth input bits
831: first output bit 832: third output bit
833: second output bit 834: fourth output bit
851: logical operation gate 853: exclusive OR operation gate
855: Negative OR operation gate
911: first input block 912: second input block
931: Second output block 932: First output block
951: bit-replacement operator 953: exclusive OR operation
955: exclusive negative OR

Claims (14)

평문을 수신하는 평문 수신부;
상기 평문에 암호화 키로 제1 암호화 과정을 수행하여 제1 암호문을 생성하고 각각은 일대일 관계로서 전단 게이트의 출력이 후단 게이트의 입력으로 동작되도록 복수의 제1 가중치 전단 게이트들 및 복수의 제2 가중치 후단 게이트들로 구성된 비트치환 연산기를 통해 상기 제1 암호문의 비트치환을 수행하는 비트치환 수행부; 및
비트치환된 상기 제1 암호문에 관한 제2 암호화 과정을 수행하여 제2 암호문을 생성하는 암호문 생성부를 포함하되,
상기 비트치환 수행부는 제1 입력비트 및 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제3 입력비트와 배타적 논리합 연산을 수행함으로써 제1 출력비트를 생성하고, 상기 제1 입력비트 및 제3 입력비트를 기초로 부정 논리합 연산을 수행한 후 제4 입력비트와 배타적 논리합 연산을 수행함으로써 제2 출력비트를 생성하며, 상기 제2 출력비트와 상기 제2 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제1 입력비트와 배타적 논리합 연산을 수행함으로써 제3 출력비트를 생성하고, 상기 제1 출력비트와 상기 제4 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제2 입력비트와 배타적 논리합 연산을 수행함으로써 제4 출력비트를 생성하는 상기 비트치환 연산기를 통해 상기 비트치환을 수행하는 것을 특징으로 하는 비트치환 연산기를 이용한 암호 장치.
A plaintext receiver for receiving plaintext;
A plurality of first weighted front-end gates and a plurality of second weighted rear-end so that the first encrypted text is generated by performing the first encryption process with the encryption key on the plain text, and each of them has an one-to-one relationship so that the output of the front-end gate is operated as an input of the rear-end gate. A bit replacement performing unit performing bit replacement of the first ciphertext through a bit replacement operator composed of gates; And
And a second ciphertext generating unit for generating a second ciphertext by performing a second encryption process on the first ciphertext which is bit-substituted,
The bit replacement performing unit generates a first output bit by performing a logical multiplication operation based on the first input bit and the second input bit, and then performing an exclusive OR operation with the third input bit. After performing a negative OR operation based on 3 input bits, a second output bit is generated by performing an exclusive OR operation with the fourth input bit, and a logical product operation is performed based on the second output bit and the second input bit. After performing, an exclusive OR operation is performed with the first input bit to generate a third output bit, a logical multiplication operation is performed based on the first output bit and the fourth input bit, and then the second input bit and A cryptographic device using a bit-replacement operator, characterized in that the bit-replacement is performed through the bit-replacement operator that generates a fourth output bit by performing an exclusive OR operation.
제1항에 있어서, 상기 평문 수신부는
상기 평문을 동일한 크기를 가지는 복수의 블록들로 분할하고 마지막 블록의 크기가 상이한 경우 패딩(padding) 연산을 수행하는 것을 특징으로 하는 비트치환 연산기를 이용한 암호 장치.
The method of claim 1, wherein the plaintext receiving unit
A cryptographic device using a bit replacement operator, characterized in that the plaintext is divided into a plurality of blocks having the same size and a padding operation is performed when the size of the last block is different.
삭제delete 삭제delete 삭제delete 제1항에 있어서, 상기 비트치환 수행부는
제1 및 제2 입력블록들에 대해 상기 비트치환 연산기를 적용하여 제1 및 제2 치환블록들을 생성하고,
상기 제1 및 제2 치환블록들을 기초로 상기 비트치환 연산기와 배타적 논리합 및 배타적 부정 논리합 연산을 결합하여 생성된 확장 비트치환 연산기를 통해 상기 비트치환을 수행하는 것을 특징으로 하는 비트치환 연산기를 이용한 암호 장치.
The method of claim 1, wherein the bit replacement unit
The first and second replacement blocks are generated by applying the bit replacement operator to the first and second input blocks,
Cryptography using a bit substitution operator, characterized in that the bit substitution is performed through an extended bit substitution operator generated by combining the bit substitution operator and an exclusive OR and an exclusive negative OR based on the first and second substitution blocks. Device.
제6항에 있어서, 상기 비트치환 수행부는
상기 제1 및 제2 치환블록들을 배타적 논리합 연산하여 제1 출력 블록을 생성하고,
상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행하는 것을 특징으로 하는 비트치환 연산기를 이용한 암호 장치.
The method of claim 6, wherein the bit replacement unit
Generating first output blocks by exclusively ORing the first and second substitution blocks,
After performing the bit-replacement operator on the first output block, the bit-replacement is performed through the extended bit-replacement operator to generate a second output block by performing an exclusive OR operation with the second replacement block. Cryptographic device using bit replacement operator.
제6항에 있어서, 상기 비트치환 수행부는
상기 제1 및 제2 치환블록들을 배타적 부정 논리합 연산하여 제1 출력 블록을 생성하고,
상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행하는 것을 특징으로 하는 비트치환 연산기를 이용한 암호 장치.
The method of claim 6, wherein the bit replacement unit
Generating first output blocks by exclusively negating the first and second substitution blocks;
After performing the bit-replacement operator on the first output block, the bit-replacement is performed through the extended bit-replacement operator to generate a second output block by performing an exclusive OR operation with the second replacement block. Cryptographic device using bit replacement operator.
제6항에 있어서, 상기 비트치환 수행부는
상기 제1 및 제2 치환블록들을 배타적 논리합 연산하여 제1 출력 블록을 생성하고,
상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 부정 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행하는 것을 특징으로 하는 비트치환 연산기를 이용한 암호 장치.
The method of claim 6, wherein the bit replacement unit
Generating first output blocks by exclusively ORing the first and second substitution blocks,
After performing the bit replacement operator on the first output block, the bit replacement is performed through the extended bit replacement operator that generates a second output block by performing an exclusive negative OR operation with the second replacement block. Cryptographic device using a bit replacement operator.
제6항에 있어서, 상기 비트치환 수행부는
상기 제1 및 제2 치환블록들을 배타적 부정 논리합 연산하여 제1 출력 블록을 생성하고,
상기 제1 출력 블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 부정 논리합 연산을 수행함으로써 제2 출력 블록을 생성하는 상기 확장 비트치환 연산기를 통해 상기 비트치환을 수행하는 것을 특징으로 하는 비트치환 연산기를 이용한 암호 장치.
The method of claim 6, wherein the bit replacement unit
Generating first output blocks by exclusively negating the first and second substitution blocks;
After performing the bit replacement operator on the first output block, the bit replacement is performed through the extended bit replacement operator that generates a second output block by performing an exclusive negative OR operation with the second replacement block. Cryptographic device using a bit replacement operator.
제1 입력비트 및 제2 입력비트를 기초로 논리곱 연산을 수행한 후 제3 입력비트와 배타적 논리합 연산을 수행함으로써 제1 출력비트를 생성하는 제1 출력비트 생성부;
상기 제1 입력비트 및 제3 입력비트를 기초로 부정 논리합 연산을 수행한 후 제4 입력비트와 배타적 논리합 연산을 수행함으로써 제2 출력비트를 생성하는 제2 출력비트 생성부;
상기 제2 출력비트와 상기 제2 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제1 입력비트와 배타적 논리합 연산을 수행함으로써 제3 출력비트를 생성하는 제3 출력비트 생성부; 및
상기 제1 출력비트와 상기 제4 입력비트를 기초로 논리곱 연산을 수행한 후 상기 제2 입력비트와 배타적 논리합 연산을 수행함으로써 제4 출력비트를 생성하는 제4 출력비트 생성부를 포함하는 비트치환 연산기.
A first output bit generator configured to generate a first output bit by performing an exclusive OR operation with the third input bit after performing a logical product operation based on the first input bit and the second input bit;
A second output bit generator for generating a second output bit by performing an exclusive OR operation with the fourth input bit after performing the negative OR operation based on the first input bit and the third input bit;
A third output bit generator which performs a logical multiplication operation based on the second output bit and the second input bit and then generates a third output bit by performing an exclusive OR operation with the first input bit; And
Bit replacement including a fourth output bit generator for generating a fourth output bit by performing an exclusive OR operation with the second input bit after performing a logical product operation based on the first output bit and the fourth input bit. Calculator.
제1 및 제2 입력블록들에 대해 비트치환 연산기를 적용하여 제1 및 제2 치환블록들을 생성하는 치환블록 생성부;
상기 제1 및 제2 치환블록들을 기초로 제1 논리 연산을 수행하여 제1 출력블록을 생성하는 제1 출력블록 생성부; 및
상기 제1 출력블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 제2 논리 연산을 수행하여 제2 출력블록을 생성하는 제2 출력블록 생성부를 포함하는 확장 비트치환 연산기.
A replacement block generator for generating first and second replacement blocks by applying a bit replacement operator to the first and second input blocks;
A first output block generator for generating a first output block by performing a first logical operation based on the first and second substitution blocks; And
And a second output block generator that generates a second output block by performing the second substitution block and the second logical operation after applying the bit replacement operator to the first output block.
제12항에 있어서, 제1 출력블록 생성부는
상기 제1 및 제2 치환블록들을 기초로 배타적 논리합 또는 배타적 부정 논리합 연산들 중 어느 하나를 수행하여 상기 제1 출력블록을 생성하는 것을 특징으로 하는 확장 비트치환 연산기.
The method of claim 12, The first output block generation unit
An extended bit replacement operator, characterized in that the first output block is generated by performing either an exclusive OR or an exclusive negative OR based on the first and second replacement blocks.
제12항에 있어서, 제2 출력블록 생성부는
상기 제1 출력블록에 대해 상기 비트치환 연산기를 적용한 후 상기 제2 치환블록과 배타적 논리합 또는 배타적 부정 논리합 연산들 중 어느 하나를 수행하여 제2 출력블록을 생성하는 것을 특징으로 하는 확장 비트치환 연산기.
The method of claim 12, The second output block generation unit
After applying the bit replacement operator to the first output block, the extended bit replacement operator, characterized in that to generate a second output block by performing either of the second replacement block and an exclusive OR or exclusive negative OR operation.
KR1020180106498A 2018-09-06 2018-09-06 Bit substitution operator, extended bit substitution operator, and encryption apparatus using the same KR102130513B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180106498A KR102130513B1 (en) 2018-09-06 2018-09-06 Bit substitution operator, extended bit substitution operator, and encryption apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180106498A KR102130513B1 (en) 2018-09-06 2018-09-06 Bit substitution operator, extended bit substitution operator, and encryption apparatus using the same

Publications (2)

Publication Number Publication Date
KR20200028164A KR20200028164A (en) 2020-03-16
KR102130513B1 true KR102130513B1 (en) 2020-07-06

Family

ID=69948601

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180106498A KR102130513B1 (en) 2018-09-06 2018-09-06 Bit substitution operator, extended bit substitution operator, and encryption apparatus using the same

Country Status (1)

Country Link
KR (1) KR102130513B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100969961B1 (en) 2007-12-20 2010-07-15 한국전자통신연구원 Substitution apparatus of block code aria and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Grosso, Vincent, et al., LS-designs: Bitslice encryption for efficient masked software implementations, International Workshop on Fast Software Encryption. Springer, pp. 18-37(2014.03.) 1부.*

Also Published As

Publication number Publication date
KR20200028164A (en) 2020-03-16

Similar Documents

Publication Publication Date Title
CN109040090B (en) A kind of data ciphering method and device
JP5402632B2 (en) Common key block encryption apparatus, common key block encryption method, and program
CN107438065B (en) Data encryption device and method, data decryption device and method
JPWO2013129056A1 (en) Information processing apparatus, information processing method, and program
US20140334623A1 (en) Rapid data encryption and decryption for secure communication over open channels with plausible deniability
US20200160755A1 (en) Encryption device, encryption method, decryption device, and decryption method
CN113098675B (en) Binary data encryption system and method based on polynomial complete homomorphism
US10965454B2 (en) Apparatus and method for public key encryption
KR102130513B1 (en) Bit substitution operator, extended bit substitution operator, and encryption apparatus using the same
KR20080072345A (en) Apparatus for encryption and method using the same
KR20230095750A (en) Whitebox cryptographic method and device based on block cipher mode of operation using one-way function
CN111953480B (en) Key generation device and method, operation key generation device and method
JP6203387B2 (en) Encryption device, storage system, decryption device, encryption method, decryption method, encryption program, and decryption program
Soni et al. A Comparative Study of Various Traditional and Hybrid Cryptography Algorithm Models for Data Security
KR20110118273A (en) Method for encrypting and decrypting stream and cryptographic file systems thereof
Mustafa Calculation of encryption algorithm combination for video encryption using two layers of AHP
US20130188790A1 (en) Cryptographic key
Mushtaque et al. Implementation of new encryption algorithm with random key selection and minimum space complexity
Rajashekarappa et al. Study on cryptanalysis of the tiny encryption algorithm
Anitha Kumari et al. Implementation of Present Cipher on FPGA for IoT Applications
Mahalakshmi et al. “Security-as-a-Service” for files in cloud computing—A novel application model
CN112131596B (en) Encryption and decryption method, equipment and storage medium
KR102424922B1 (en) Extended s-box with dbn and lbn are both greater than 2 and bit operation method using the same
US20210160051A1 (en) Method and devices for creating redundancy and encryption using mojette transform
KR102117758B1 (en) Lightweight Cryptographic Accelerated Operation Processing Method In Power Platform Server EnvironmentEnvironment

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