KR20010028468A - Apparatus for encrypting and decrypting data and controlling method thereof - Google Patents

Apparatus for encrypting and decrypting data and controlling method thereof Download PDF

Info

Publication number
KR20010028468A
KR20010028468A KR1019990040731A KR19990040731A KR20010028468A KR 20010028468 A KR20010028468 A KR 20010028468A KR 1019990040731 A KR1019990040731 A KR 1019990040731A KR 19990040731 A KR19990040731 A KR 19990040731A KR 20010028468 A KR20010028468 A KR 20010028468A
Authority
KR
South Korea
Prior art keywords
data
memory
value
encryption
decryption
Prior art date
Application number
KR1019990040731A
Other languages
Korean (ko)
Other versions
KR100342526B1 (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 KR1019990040731A priority Critical patent/KR100342526B1/en
Publication of KR20010028468A publication Critical patent/KR20010028468A/en
Application granted granted Critical
Publication of KR100342526B1 publication Critical patent/KR100342526B1/en

Links

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
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI

Abstract

PURPOSE: A device for encoding and decoding and a method for controlling thereof are provided to reduce the load of CPU carrying out encoding and decoding by using a gate array and to carry out encoding and decoding closely in real time. CONSTITUTION: A device for encoding and decoding and a method for controlling thereof include a CPU interface portion(11), a decoder(12), a memory portion(30), an in/output buffer(13), an engine portion(40), an interrupt controller(20) and a condition register(14). The CPU interface portion(11) is connected to the CPU. The decoder(12) decodes the key value received through the CPU interface portion(11) and data and outputs it. The memory portion(30) confirms a user by the output of the decoder(12) and outputs the data of the set up code. The in/output buffer(13) sends and receives the data between engine portions(40). The engine portion(40) carries out encoding and decoding according to the data received from the in/output buffer(13) and the code value of the memory portion(30). The interrupt controller(20) detects and outputs the condition of the engine portion. The condition register(14) outputs the condition to the CPU through the CPU interface portion(11).

Description

암호화 및 복호화 장치 및 그 제어 방법{APPARATUS FOR ENCRYPTING AND DECRYPTING DATA AND CONTROLLING METHOD THEREOF}Encryption and decryption device and its control method {APPARATUS FOR ENCRYPTING AND DECRYPTING DATA AND CONTROLLING METHOD THEREOF}

본 발명은 암호화 및 복호화 장치 및 그 제어방법에 관한 것으로, 특히 암호화 및 복호화하는 표준 알고리즘인 디이에스(DES:Data Encryption Standard)의 복호화 장치 및 그 제어방법에 관한 것이다.The present invention relates to an encryption and decryption apparatus and a control method thereof, and more particularly, to a decryption apparatus and a control method of a data encryption standard (DES), which is a standard algorithm for encrypting and decrypting.

통상적으로 암호화 및 복호화는 정보통신이 발전하면서 개인의 정보를 안전하게 전송하기 위해 사용하는 하나의 기술적인 방법이다. 이러한 암호화 및 복호화하는 방법은 전자상거래 등에서 사용자의 신분 사용자 정보를 보호하기 위해 많이 사용되고 있으며, 정보통신의 수요자가 많아지면서 통신망을 이용하여 데이터 통신에 더 많은 사용자 정보들이 이동하게 되고 있다. 만일 이러한 암호화 및 복호화를 거치지 않고 직접 평문으로 회사의 기밀정보나 개인의 정보를 전송하는 경우 이러한 데이터는 외부에 노출됨으로써 개인의 정보를 보호할 수 없는 무방비 상태에 처하게 된다. 따라서 대부분의 데이터 통신을 수행하는 기업 또는 여러 가입자들을 두는 통신 서버를 가진 회사에서는 데이터 통신시 암호화 및 복호화 작업을 수행하도록 하고 있다.In general, encryption and decryption are one technical method used to securely transmit personal information as information communication advances. Such encryption and decryption methods are widely used to protect user's identity user information in electronic commerce and the like, and as user demand for information communication increases, more user information is moved to data communication using a communication network. If you send your company's confidential information or personal information directly in plain text without going through such encryption and decryption, these data will be exposed to the outside, and your personal information will be protected. Therefore, companies that perform most data communications or companies with communication servers with multiple subscribers are required to perform encryption and decryption operations during data communications.

이러한 암호화 및 복호화는 대체로 미국에서 표준화되어 사용되고 있는 디이에스(이하 DES라 함)의 규격에 따라 암호화 및 복호화를 수행하게 된다. 상기 DES의 규격에 따라 암호화 및 복호화는 통신 시스템의 중앙처리장치(CPU)에서 이루어지며, 이러한 규격을 만족하는 프로그램을 수행하여 이루어지게 된다. 또한 DES 규격에서는 동일한 알고리즘을 16회 반복하여 암호화 및 복호화하도록 구성되어 있으므로 프로그램으로 이러한 작업을 수행할 경우 매우 많은 시간이 소요되는 문제가 있었다.Such encryption and decryption is generally performed in accordance with the standard of the standard (hereinafter referred to as DES) standardized and used in the United States to perform encryption and decryption. According to the DES standard, encryption and decryption are performed in a central processing unit (CPU) of a communication system and are performed by executing a program that satisfies this standard. In addition, since the DES standard is configured to encrypt and decrypt the same algorithm 16 times, there is a problem that it takes a lot of time to perform such a task with a program.

또한 하나의 암호문을 생성 및 복호화하기 위해 많은 시간이 소요됨으로써 실시간으로 데이터를 전송하거나 수신하더라도 암호화 및 복호화 과정에서 처리되는 시간이 많이 소요됨으로써 사용자는 실제적으로 실시간으로 데이터가 송수신되는 것으로 인지하지 못하는 문제가 있었으며 암호문을 생성 및 처리하는 서버를 두는 경우 상기 서버에서 수행되는 다른 작업의 처리 속도가 매우 저하되는 문제가 발생하였다.In addition, it takes a lot of time to generate and decrypt a single ciphertext, so even if data is transmitted or received in real time, a lot of processing time is required in the process of encryption and decryption. There is a problem that the processing speed of other tasks performed in the server is very slow when the server to generate and process the cipher text.

따라서 본 발명의 목적은 빠른 속도로 암호화 및 복호화를 수행하는 장치 및 그 제어방법을 제공함에 있다.Accordingly, an object of the present invention is to provide an apparatus for performing encryption and decryption at a high speed and a control method thereof.

본 발명의 다른 목적은 DES 알고리즘을 만족하며 암호화 및 복호화를 수행하는 장치 및 그 제어방법을 제공함에 있다.Another object of the present invention is to provide an apparatus for satisfying a DES algorithm and performing encryption and decryption and a control method thereof.

상기한 목적들을 달성하기 위한 본 발명의 장치는 암호화 및 복호화를 수행하는 장치로, 중앙처리장치와 접속하는 씨피유(CPU) 인터페이스부와, 상기 씨피유 인터페이스부를 통해 수신되는 키 값과 데이터(Data)를 디코딩하여 출력하는 디코더와, 상기 디코더의 출력에 의해 사용자를 확인하며 설정된 코드의 데이터를 출력하는 메모리부와, 상기 씨피유 인터페이스부와 암호화 및 복호화 과정을 수행하는 엔진부간 데이터를 송수신하는 입출력 버퍼와, 상기 입출력 버퍼로부터 수신되는 데이터와 상기 메모리부의 코드값에 따라 암호화 및 복호화를 수행하는 엔진부와, 상기 엔진부의 상태를 검출하여 출력하는 인터럽트 제어기와, 상기 인터럽트 제어기의 출력에 따라 상기 씨피유 인터페이스부를 통해 중앙처리 장치로 상태를 출력하는 상태 래지스터로 구성됨을 특징으로 한다.The apparatus of the present invention for achieving the above objects is a device for performing encryption and decryption, the CPU interface unit and the key value and data received through the CPU interface unit A decoder which decodes and outputs a memory, a memory unit which outputs data of a set code by identifying a user by an output of the decoder, an input / output buffer which transmits and receives data between the CPI interface unit and an engine unit which performs an encryption and decryption process; An engine unit that performs encryption and decryption according to data received from the input / output buffer and a code value of the memory unit, an interrupt controller that detects and outputs a state of the engine unit, and the CPI interface unit according to an output of the interrupt controller. Status registers that output status to the central processing unit Characterized by configured.

상기한 목적들을 달성하기 위한 본 발명의 방법은 암호화 및 복호화를 수행하는 장치의 제어 방법으로, 데이터와 키 값을 수신하여 소정 비트의 데이터만을 추출하는 고정 추출 과정과, 상기 고정 추출된 데이터를 익스클로시브 오아 연산하는 과정과, 상기 익스클로시브 오아 연산 후 메모리의 주소를 추출하여 데이터를 리드(Read)하는 과정과, 상기 리드된 데이터를 상기 키 값에 따라 소정 자리수 만큼 쉬프트시키는 과정과, 상기 쉬프트시킨 후 데이터를 소정의 레지스터에 저장시키는 과정과, 상기 데이터를 저장한 후 카우터를 증가시키고 상기 증가된 카운터 값이 미리 설정된 소정의 값인가를 검사하는 과정과, 상기 검사결과 카운터의 값이 미리 설정된 소정의 값인 경우 상기 데이터를 출력하고 소정의 값이 아닌 경우 추출하는 과정으로 진행하는 과정으로 이루어짐을 특징으로 한다.A method of the present invention for achieving the above objects is a control method of an apparatus for performing encryption and decryption, a fixed extraction process for receiving data and key values to extract only a predetermined bit of data, and extracting the fixed extracted data A process of performing a closed ora operation, a process of reading data by extracting an address of a memory after the exclusive ora operation, and shifting the read data by a predetermined number according to the key value; Storing the data in a predetermined register after the shift, increasing the counter after storing the data, checking whether the increased counter value is a predetermined value, and checking the counter value If the predetermined value is preset, the data is outputted. It characterized by constituted by any process.

도 1은 본 발명의 바람직한 실시에에 따라 암호화 및 복호화를 수행하기 위한 장치의 블록 구성도,1 is a block diagram of an apparatus for performing encryption and decryption according to a preferred embodiment of the present invention;

도 2는 상기 도 1에 도시된 디코더(12)를 실시예로 도시한 상세 블록 구성도,FIG. 2 is a detailed block diagram showing an example of the decoder 12 shown in FIG.

도 3은 상기 도 1의 입출력 버퍼의 구조 중 입력 버퍼의 상세 블록 구성도,3 is a detailed block diagram of an input buffer in the structure of the input / output buffer of FIG. 1;

도 4는 상기 도 1의 입출력 버퍼의 구조 중 출력 버퍼의 상세 블록 구성도,4 is a detailed block diagram of an output buffer in the structure of the input / output buffer of FIG. 1;

도 5는 상기 도 1의 DES 엔진의 초기 치환 과정을 설명하기 위한 블록 구성도,FIG. 5 is a block diagram illustrating an initial replacement process of the DES engine of FIG. 1. FIG.

도 6은 DES 엔진의 상세한 블록 구성도,6 is a detailed block diagram of a DES engine;

도 7은 암호화 및 복호화 장치의 동작에 따른 제어 흐름도.7 is a control flowchart according to the operation of the encryption and decryption apparatus.

이하 첨부된 도면을 참조하여 본 발명을 상세히 설명한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 바람직한 실시에에 따라 암호화 및 복호화를 수행하기 위한 장치의 블록 구성도이다. 이하 도 1을 참조하여 각 암호화 및 복호화를 수행하는 장치의 구성 및 동작을 상세히 설명한다.1 is a block diagram of an apparatus for performing encryption and decryption according to a preferred embodiment of the present invention. Hereinafter, a configuration and an operation of an apparatus for performing each encryption and decryption will be described in detail with reference to FIG. 1.

프로세서 접속부(10)는 CPU 인터페이스부(11)와 디코더(12)와 입출력 버퍼(13)와 상태 래지스터(14)로 구성된다. 먼저 CPU 인터페이스부(11)는 CPU의 중앙처리장치와 연결되며, 제어신호 및 암호화할 데이터 및 복호화할 데이터의 인터페이스를 수행한다. 또한 CPU 인터페이스부(11)는 내부에 신호 래치와 드라이버를 구비한다. 디코더(12)는 CPU 인터페이스부(11)로부터 수신되는 키신호에 따라 이를 디코딩하여 메모리부로 출력한다. 이때 사용자가 입력한 키신호는 자신의 패스워드와 암호화 및 복호화시 코드를 선택할 코드값이 된다. 또한 디코더에는 소정 크기의 메모리와 레지스터를 구비한다. 입출력 버퍼(13)는 선입선출(FIFO:First In First Out)의 메모리로 구성되어 있으며, CPU 인터페이스부(11)로부터 데이터를 암호화 및 복호화할 데이터를 CPU 인터페이스부(11)와 DES 엔진부(40)간 인터페이스를 수행한다. 상태 래지스터(14)는 제어신호와 상태신호를 수신하여 CPU 인터페이스부(11)와 DES 엔진부(40)간 송수신되는 처리한다. 그리고, 인터럽트 제어기(20)는 DES 엔진부(40)의 상태신호를 수신하여 암호화중 또는 암호화 종료 및 복호화 중 또는 복호화 종료에 따른 신호를 발생하여 상태 래지스터(14)로 출력한다.The processor connection unit 10 includes a CPU interface unit 11, a decoder 12, an input / output buffer 13, and a state register 14. First, the CPU interface unit 11 is connected to the central processing unit of the CPU and performs an interface between control signals, data to be encrypted, and data to be decrypted. In addition, the CPU interface unit 11 includes a signal latch and a driver therein. The decoder 12 decodes the key signal received from the CPU interface unit 11 and outputs it to the memory unit. At this time, the key signal input by the user is a code value for selecting a password and a code for encryption and decryption. The decoder also has a predetermined size of memory and registers. The input / output buffer 13 is composed of first-in-first-out (FIFO) memory, and the CPU interface unit 11 and the DES engine unit 40 store data to be encrypted and decrypted from the CPU interface unit 11. Perform interface between The state register 14 receives and transmits a control signal and a state signal between the CPU interface unit 11 and the DES engine unit 40. Then, the interrupt controller 20 receives the state signal of the DES engine unit 40 and generates a signal according to the encryption or the end of the encryption and the decryption or the end of the decryption and outputs the signal to the state register 14.

메모리부(30)는 키메모리(31)와 코드 메모리(32)로 구성되며, 상기 키 메모리는 사용자별로 키 값을 가지는 즉, 패스워드(Pass Word)를 저장하고 있다. 또한 코드 메모리(32)는 다수의 코드값을 가지고 있으며, 상기 디코더(12)로부터 수신되는 키 값에 따라 암호화 또는 복호화할 코드를 선택하여 인에이블 시킨다. 상기 인에이블된 코드는 DES 엔진부(40)로 입력된다. DES 엔진부(40)는 상태 출력부(41)와 DES 엔진(42)과 키 이동 메모리(43)로 구성된다. 먼저 상기 상태 출력부(41)는 엔진의 상태를 검사하여 검사된 결과에 따른 상태를 출력한다. DES 엔진(42)은 상기 코드 메모리(42)로부터 수신된 코드값에 따라 입출력 버퍼(13)으로부터 수신된 데이터를 암호화 및 복호화하여 출력한다. 키 이동 메모리(43)은 수신된 데이터를 오른쪽 또는 왼쪽으로 이동시키기 위한 쉬프트(Shift Table)을 구비하고 있으며, 이를 DES 규격에 따른 테이블을 도시하면 하기 표 1과 같다.The memory unit 30 includes a key memory 31 and a code memory 32. The key memory has a key value for each user, that is, stores a password. In addition, the code memory 32 has a plurality of code values, and selects and enables codes to be encrypted or decrypted according to key values received from the decoder 12. The enabled code is input to the DES engine unit 40. The DES engine unit 40 is composed of a state output unit 41, a DES engine 42, and a key moving memory 43. First, the state output unit 41 inspects the state of the engine and outputs a state according to the result of the inspection. The DES engine 42 encrypts and decrypts data received from the input / output buffer 13 in accordance with the code value received from the code memory 42. The key shift memory 43 has a shift table for shifting the received data to the right or the left. The table according to the DES standard is shown in Table 1 below.

En/DeEn / De q1q1 q2q2 q3q3 q4q4 c0c0 c1c1 c3c3 c4c4 outout 1One 00 00 00 00 00 00 00 00 1One 1One 00 00 00 1One 00 00 00 1One 1One 1One 00 00 00 1One 00 00 1One 00 22 1One 00 00 00 1One 00 00 1One 1One 22 1One 00 00 00 1One 00 1One 00 00 22 1One 00 00 00 1One 00 1One 00 1One 22 1One 00 00 00 00 00 1One 1One 00 22

상기 표 1에 도시된 바와 같이 키 이동 메모리(43)의 값을 읽어와 수신된 데이터를 좌측 또는 우측으로 이동하여 암호화 및 복호화시에 사용한다. 상기 도 1의 블록 구성도는 프로그램이 가능한 게이트 어래이(FPGA)로 구성할 수 있다.As shown in Table 1, the value of the key shift memory 43 is read and the received data is shifted left or right for use in encryption and decryption. The block diagram of FIG. 1 may be configured as a programmable gate array (FPGA).

도 2는 상기 도 1에 도시된 디코더(12)를 실시예로 도시한 상세 블록 구성도이다. 이하 도 2를 참조하여 디코더(12)의 구성 및 동작을 상세히 설명한다.FIG. 2 is a detailed block diagram showing an example of the decoder 12 shown in FIG. Hereinafter, the configuration and operation of the decoder 12 will be described in detail with reference to FIG. 2.

디코더(101)는 A0 내지 A2의 3비트의 데이터와 CS신호 및 리셋신호(RESET)를 수신한다. 따라서 디코더(101)는 수신된 데이터와 CS신호 및 리셋신호에 따라 출력되는 신호를 제어 래지스터(102)와 상태 래지스터(103)에 저장하며, 입력 버퍼 카운터(104)는 00 ∼ 11의 4비트를 수용할 수 있도록 구성되어 있다. 또한 출력 버퍼 카운터(105)도 동일한 구성을 가진다. 그리고 디코더 (101)에서 디코딩된 값은 데이터 포트(106)를 통해 메모리부(30)으로 출력된다.The decoder 101 receives three bits of data A0 to A2, a CS signal, and a reset signal RESET. Therefore, the decoder 101 stores the received data, the signal output according to the CS signal, and the reset signal, in the control register 102 and the state register 103, and the input buffer counter 104 is 4 to 00-11. It is configured to accept bits. The output buffer counter 105 also has the same configuration. The value decoded by the decoder 101 is output to the memory unit 30 through the data port 106.

도 3은 상기 도 1의 입출력 버퍼의 구조 중 입력 버퍼의 상세 블록 구성도이다. 이하 도 3을 참조하여 입력 버퍼의 구성 및 동작을 상세히 설명한다.3 is a detailed block diagram illustrating an input buffer in the structure of the input / output buffer of FIG. 1. Hereinafter, the configuration and operation of the input buffer will be described in detail with reference to FIG. 3.

CPU 인터페이스부(11)로부터 64비트씩 수신되는 데이터는 기록 포인터(111)가 지시하는 어드레스에 따라 FIFO(110)에 따라 순차적으로 저장한다. 그리고 읽기 포인터(113)이 지시하는 어드레스에 따라 데이터를 읽어 익스클로시브 오아하는 4개의 연산기(115a, 115b, 115c, 115d)로 입력된다. 따라서 상기 FIFO(110)에 기록된 데이터는 16비트씩 연산기로 입력된다. 또한 읽기/기록 제어기(112)는 FIFO(110)의 상태를 검사하여 풀(Full)과 엠티(Empty)신호를 출력하며, 읽기 및 기록신호(R/W)를 수신하여 이에 따른 어드레스를 기록 포인터(111)로 출력하거나 읽기 포인터(113)로 출력한다. 코드 버퍼(114)는 코드 메모리(114)로부터 데이터를 수신하여 각 연산기(115a, 115b, 115c, 115d)로 입력한다. 상기 각 연산기(115a, 115b, 115c, 115d)는 코드버퍼(114)로부터 수신된 데이터와 상기 FIFO(110)로부터 수신된 데이터를 상기 익스클로시브 오아하여 입력 레지스터(116)로 출력한다. 상기 입력 레지스터(116)에는 좌측 레지스터(116a)와 우측 레지스터(116b)로 구성되며, 좌측 레지스터(116a)는 두 개의 연산기(115a, 115b)로부터 익스클로시브 오아되어 입력된 데이터를 수신하여 저장하며, 우측 레지스터(116b)는 다른 두 개의 연산기(115c, 115d)로부터 입력된 데이터를 수신하여 저장한다.The data received in 64 bits from the CPU interface unit 11 are sequentially stored in accordance with the FIFO 110 according to the address indicated by the write pointer 111. The data is inputted to four arithmetic operators 115a, 115b, 115c, and 115d that read out data according to an address indicated by the read pointer 113. Therefore, the data recorded in the FIFO 110 is input to the calculator by 16 bits. In addition, the read / write controller 112 examines the state of the FIFO 110 to output a full and empty signals, receives a read and write signal R / W, and writes an address accordingly. Output to 111 or output to read pointer 113. The code buffer 114 receives data from the code memory 114 and inputs the data to each of the calculators 115a, 115b, 115c, and 115d. Each of the calculators 115a, 115b, 115c, and 115d outputs the data received from the code buffer 114 and the data received from the FIFO 110 to the input register 116. The input register 116 is composed of a left register 116a and a right register 116b, and the left register 116a receives and stores the data input by the exclusive truncation from two operators 115a and 115b. The right register 116b receives and stores data input from the other two calculators 115c and 115d.

도 4는 상기 도 1의 입출력 버퍼의 구조 중 출력 버퍼의 상세 블록 구성도이다. 이하 도 4를 참조하여 출력 버퍼의 구성 및 동작을 상세히 설명한다.4 is a detailed block diagram illustrating an output buffer in the structure of the input / output buffer of FIG. 1. Hereinafter, the configuration and operation of the output buffer will be described in detail with reference to FIG. 4.

엔진부(30)에서 16회의 동작을 종료한 후 암호화 및 복호화를 수행한 경우 두 부분으로 구성된 레지스터(124a, 124b)에 저장된 데이터는 암호화 또는 복호화가 종료된 데이터이다. 이에 따라 상기 레지스터(124)의 각 부분에 저장된 데이터는 출력을 위한 FIFO(120)에 저장된다. 이때도 상기 읽기/기록 포인터(122)에 기록 포인터(121)가 지시하는 어드레스에 데이터를 기록하며, 우측 레지스터(124a)는 0부터 31비트까지 데이터를 저장하며, 좌측 레지스터(124b)는 32부터 63비트까지 데이터를 저장한다. 또한 상기 읽기/기록 포인터(122)의 제어에 의해 읽기 포인터(123)는 출력할 데이터의 어드레스를 지시하며, 상기 지시된 어드레스의 데이터는 CPU 인터페이스부(11)로 출력된다. 또한 상기 읽기/기록 제어기(112)는 FIFO(110)의 상태를 검사하여 풀(Full)과 엠티(Empty)신호를 출력하며, 읽기 및 기록신호(R/W)를 수신하여 이에 따른 어드레스를 기록 포인터(121)로 출력하거나 읽기 포인터(123)로 출력한다.When the engine unit 30 performs 16 times of operations and then encrypts and decrypts the data stored in the two-part registers 124a and 124b, the data is encrypted or decrypted. Accordingly, the data stored in each part of the register 124 is stored in the FIFO 120 for output. In this case, data is also written to the read / write pointer 122 at the address indicated by the write pointer 121, the right register 124a stores data from 0 to 31 bits, and the left register 124b is from 32. Stores data up to 63 bits. In addition, under the control of the read / write pointer 122, the read pointer 123 indicates an address of data to be output, and the data of the indicated address is output to the CPU interface unit 11. In addition, the read / write controller 112 examines the state of the FIFO 110 and outputs a full and empty signals, receives the read and write signals R / W, and records the address accordingly. The output is performed by the pointer 121 or the read pointer 123.

도 5는 상기 DES 엔진의 초기 치환 과정을 설명하기 위한 DES 엔진의 일부 블록 구성도이다. 이하 도 5를 참조하여 DES 엔진의 초기 치환과정을 상세히 설명한다.5 is a block diagram of a part of a DES engine for explaining an initial replacement process of the DES engine. Hereinafter, an initial substitution process of the DES engine will be described in detail with reference to FIG. 5.

64비트의 데이터를 저장하는 FIFO(130)는 16비트씩 익스클로시브 오아 연산기(133a, 133b, 133c, 133d)로 데이터를 출력한다. 또한 모드신호(EBC/CBC)는 앤드 게이트(131)로 입력되며, 상기 앤드 게이트(131)의 다른 입력단은 코드 버퍼(132)의 출력단에 연결된다. 코드버퍼(132)는 스텝에 따른 데이터를 앤드 게이트(131)로 출력한다. 그리고 앤드 게이트(131)는 두 신호를 논리합하여 각 익스클로시브 오아 연산기(133a, 133b, 133c, 133d)로 입력한다. 이때 앤드게이트(131)의 출력값이 "0"인 경우 각 익스클로시브 오아 연산기(133a, 133b, 133c, 133d)의 출력에는 아무런 영향을 미치지 않게 된다. 상기 각 익스클로시브 오아 연산기(133a, 133b, 133c, 133d)의 출력값은 멀티플렉서(134)에 입력되며, 상기 멀티플렉서(134)는 이전 스텝의 값과 함께 익스클로시브 오아된 데이터를 수신하여 멀티플렉싱한다. 이에 따라 멀티플렉싱된 데이터는 레지스터(135)에 저장된다. 상기 레지스터(135)는 좌측 레지스터(135a)와 우측 레지스터(135b)로 구성되며, 각각 32비트로 구성된다.The FIFO 130 storing 64-bit data outputs the data to the exclusive OR calculators 133a, 133b, 133c, and 133d by 16 bits. In addition, the mode signal EBC / CBC is input to the AND gate 131, and the other input terminal of the AND gate 131 is connected to the output terminal of the code buffer 132. The code buffer 132 outputs data according to the step to the AND gate 131. The AND gate 131 combines the two signals and inputs them to each exclusive OR operator 133a, 133b, 133c, and 133d. In this case, when the output value of the AND gate 131 is "0", the output of each of the exclusive OR calculators 133a, 133b, 133c, and 133d is not affected. The output values of each of the exclusive ore calculators 133a, 133b, 133c, and 133d are input to the multiplexer 134, and the multiplexer 134 receives and multiplexes the exclusive ored data together with the value of the previous step. . Accordingly, the multiplexed data is stored in the register 135. The register 135 is composed of a left register 135a and a right register 135b, each composed of 32 bits.

도 6은 DES 엔진의 상세한 블록 구성도이다. 이하 도 6을 참조하여 DES 엔진의 블록 구성 및 동작을 상세히 설명한다.6 is a detailed block diagram of a DES engine. Hereinafter, the block configuration and operation of the DES engine will be described in detail with reference to FIG. 6.

입출력 버퍼(13)의 출력 메모리부분(200)에서 출력된 데이터는 4개로 이루어진 익스클로시브 오아 연산기(215a, 215b, 215c, 215d)의 한 입력단에 연결되고, 모드신호(201)와 코드버퍼(204)의 데이터를 논리합하여 출력하는 앤드 게이트(203)의 출력단이 상기 각 익스클로시브 오아 연산기(215a, 215b, 215c, 215d)의 다른 입력단에 연결된다. 따라서 상기 각 익스클로시브 오아 연산기(215a, 215b, 215c, 215d)는 입력된 신호를 익스클로시브 오아하여 좌측 레지스터(217)과 우측 레지스터(218)로 입력한다. 그리고 상기 우측 레지스터(218)은 입력된 데이터를 좌측 레지스터(217)에 저장된 데이터와 합하여 제2연산기(224)로 출력한다. 또한 상기 우측 레지스터(218)는 확장 치환기(219)에서 확장 치환되어 제1연산기(220)로 입력된다.Data output from the output memory portion 200 of the input / output buffer 13 is connected to one input terminal of the four exclusive OR calculators 215a, 215b, 215c, and 215d, and the mode signal 201 and the code buffer ( An output terminal of the AND gate 203 for ORing and outputting the data of 204 is connected to the other input terminal of each of the exclusive OR calculators 215a, 215b, 215c, and 215d. Accordingly, each of the exclusive ore calculators 215a, 215b, 215c, and 215d inputs the input signal to the left register 217 and the right register 218. The right register 218 sums the input data with the data stored in the left register 217 and outputs the data to the second operator 224. In addition, the right register 218 is extended by the expansion substituent 219 and is input to the first operator 220.

또한 키 메모리(206)으로부터 출력된 56비트의 데이터는 28비트씩 분리되어 좌측 버퍼(207)과 우측 버퍼(208)로 입력된다. 상기 각 버퍼들(207, 208)의 출력 데이터는 키이동 메모리(Shift Table)에서 출력된 이동값에 따라 두 이동기(210, 211)는 수신된 데이터를 이동하여 각 버퍼(212, 213)로 출력한다. 상기 각 버퍼(212)에 출력된 데이터는 치환 선택기(214)에서 48비트만 선택적으로 치환되어 제1연산기로 출력한다. 그러면 상기 제1연산기(220)는 확장 치환기(219)에서 입력된 48비트의 데이터와 치환 선택기(214)로부터 입력된 47비트의 데이터를 익스클로시브 오아하여 출력한다. 이렇게 출력된 데이터는 비교버퍼(221)에 6비트씩 저장되며, 사용자가 입력한 키 값에 의해 선택되어 입력된 코드 메모리 데이터(222)를 이용하여 복화화를 수행한다. 그리고 복호화가 수행된 데이터는 버퍼(223)에 1차 저장되며, 상기 버퍼(223)에 저장된 데이터는 다시 제2연산기(224)로 입력된다. 따라서 상기 제2연산기(224)는 32비트씩 입력되는 데이터를 익스클로시브 오아하여 스텝 버퍼(step(i-1))(202)로 입력한다.56 bits of data output from the key memory 206 are separated into 28 bits and input to the left buffer 207 and the right buffer 208. The output data of each of the buffers 207 and 208 is output to each of the buffers 212 and 213 by moving the received data according to the shift value output from the shift table. do. The data output to each of the buffers 212 is selectively substituted by only 48 bits in the substitution selector 214 and output to the first operator. The first operator 220 then outputs the 48-bit data input from the expansion substituent 219 and the 47-bit data input from the substitution selector 214 by using an exclusive or output. The data thus output is stored in the comparison buffer 221 by 6 bits, and is demodulated using the code memory data 222 selected and selected by the key value input by the user. The decoded data is primarily stored in the buffer 223, and the data stored in the buffer 223 is input to the second operator 224. Accordingly, the second operator 224 inputs exclusively 32 bits of data into the step buffer (step (i-1)) 202.

도 7은 암호화 및 복호화 장치의 동작에 따른 제어 흐름도이다. 이하 도 1 내지 도 7을 참조하여 본 발명에 따른 암호화 및 복호화의 과정을 상세히 설명한다.7 is a control flowchart according to the operation of the encryption and decryption apparatus. Hereinafter, a process of encryption and decryption according to the present invention will be described in detail with reference to FIGS. 1 to 7.

최초 (300)단계에서 암호화 및 복호화를 수행하는 장치는 대기상태를 유지한다. 그리고, (302)단계에서 CPU 인터페이스부(11)을 통해 암화화 및 복호화를 수행할 데이터를 수신하면, 엔진부(40)는 디코더(12)를 통해 메모리부(30)으로부터 키 값을 읽어들인다. 이때 상기 키 값은 미리 CPU 인터레이스부(11)을 통해 입력되어 상기 키 메모리(31)와 상기 코드 메모리(32)에 의해 대기되고 있는 상태이다. 이후 (306)단계로 진행하여 64비트로 수신된 데이터를 32비트의 고정된 비트로 추출한다. 그리고 (308)단계로 진행하여 익스클로시브 오아 연산을 수행한 후 상기 메모리부(30)의 코드 메모리(32)로부터 코드를 읽어온다. 그런후 (310)단계로 진행하여 상기 읽어온 코드로부터 메모리 주소를 추출하고, (312)단계로 진행하여 상기 입출력 버퍼(13)에 저장된 데이터를 리드(Read)한한다. 그리고 리드한 데이터를 상기 키 이동 메모리(43)에 설정된 값만큼 우측 또는 좌측으로 데이터를 쉬프트(Shift)시킨다. 이후 (316)단계로 진행하면, Ri의 값을 Li에 저장하며, (318)단계로 진행하여 카운터 값(CT)을 1 증가하여 저장한다??. 그리고 (320)단계로 진행하여 상기 증가된 카운터 값이 15인가를 검사한다. 여기서 15는 DES의 암호화 및 복호화를 수행할 경우 16회의 과정을 반복함으로써 0부터 15까지 16회의 암호화 또는 복호화 과정을 모두 수행했는가를 검사하는 것이다. 상기 (320)단계의 검사결과 카운터 값이 15이면 (322)단계로 진행하여 상기 입출력 버퍼(13)에 저장한다. 그러면 상기 입출력 버퍼(13)에 저장된 데이터는 CPU 인터페이스부(11)을 통해 CPU로 출력된다. 그러나 상기 카운터 값이 15 미만인 경우 (306)단계로 진행하여 고정 추출의 과정부터 다시 수행하게 된다.In operation 300, the apparatus for performing encryption and decryption maintains a standby state. When receiving data to be encrypted and decrypted through the CPU interface unit 11 in step 302, the engine unit 40 reads a key value from the memory unit 30 through the decoder 12. . At this time, the key value is inputted through the CPU interlace unit 11 in advance and is held by the key memory 31 and the code memory 32. Subsequently, the process proceeds to step 306 to extract the data received in 64 bits into 32 bits of fixed bits. In operation 308, after performing an exclusive OR operation, the code is read from the code memory 32 of the memory unit 30. Thereafter, the process proceeds to step 310 to extract the memory address from the read code, and to step 312, the data stored in the input / output buffer 13 is read. Then, the read data is shifted to the right or left by the value set in the key shift memory 43. Subsequently, if the process proceeds to step 316, the Ri value is stored in Li, and the process proceeds to step 318, where the counter value CT is incremented by one and stored. In step 320, it is checked whether the increased counter value is 15. In this case, 15 is a case in which 16 times of encryption or decryption are performed from 0 to 15 by repeating 16 times when performing DES encryption and decryption. If the check result counter value of step 320 is 15, the process proceeds to step 322 and stores the counter value in the input / output buffer 13. Then, the data stored in the input / output buffer 13 is output to the CPU through the CPU interface unit 11. However, if the counter value is less than 15, the process proceeds to step 306 to perform the process again from the fixed extraction process.

상술한 바와 같이 암호화 및 복호화를 수행하는 장치를 프로그램이 가능한 게이트 어래이를 이용함으로써 암호화 및 복호화를 수행하는 CPU의 부하가 적어지며, 또한 암호화 및 부호화를 실시간에 가깝게 수행할 수 있는 잇점이 있다.As described above, by using a gate array which is programmable in an apparatus that performs encryption and decryption, a load on the CPU that performs encryption and decryption is reduced, and there is an advantage that encryption and encryption can be performed in near real time.

Claims (3)

암호화 및 복호화를 수행하는 장치에 있어서,An apparatus for performing encryption and decryption, 중앙처리장치와 접속하는 씨피유(CPU) 인터페이스부와,CPU interface unit connected to the central processing unit, 상기 씨피유 인터페이스부를 통해 수신되는 키 값을 디코딩과 데이터(Data)를 디코딩하여 출력하는 디코더와,A decoder for decoding the key value received through the CPI interface unit and decoding and outputting data; 상기 디코더의 출력에 의해 사용자를 확인하며 설정된 코드의 데이터를 출력하는 메모리부와,A memory unit for identifying a user by the output of the decoder and outputting data of a set code; 상기 씨피유 인터페이스부와 암호화 및 복호화 과정을 수행하는 엔진부간 데이터를 송수신하는 입출력 버퍼와,An input / output buffer for transmitting and receiving data between the engine unit performing an encryption and decryption process with the CPI interface unit; 상기 입출력 버퍼로부터 수신되는 데이터와 상기 메모리부의 코드값에 따라 암호화 및 복호화를 수행하는 엔진부와,An engine unit for performing encryption and decryption according to data received from the input / output buffer and code values of the memory unit; 상기 엔진부의 상태를 검출하여 출력하는 인터럽트 제어기와,An interrupt controller for detecting and outputting a state of the engine unit; 상기 인터럽트 제어기의 출력에 따라 상기 씨피유 인터페이스부를 통해 중앙처리 장치로 상태를 출력하는 상태 래지스터로 구성됨을 특징으로 하는 암호화 및 복호화 장치.And a state register configured to output a state to the central processing unit through the CPI interface unit according to the output of the interrupt controller. 제1항에 있어서, 상기 메모리가,The method of claim 1, wherein the memory, 키 값을 저장하고 있는 키 메모리와 코드값을 선택할 수 있는 코드 메모리로 구성됨을 특징으로 하는 암호화 및 복호화 장치.An encryption and decryption apparatus, comprising: a key memory for storing a key value and a code memory for selecting a code value. 암호화 및 복호화를 수행하는 장치의 제어 방법에 있어서,In the control method of the device for performing the encryption and decryption, 데이터와 키 값을 수신하여 소정 비트의 데이터만을 추출하는 고정 추출 과정과,A fixed extraction process of receiving data and key values and extracting only predetermined bits of data; 상기 고정 추출된 데이터를 익스클로시브 오아 연산하는 과정과,Performing an exclusive ora operation on the fixed extracted data; 상기 익스클로시브 오아 연산 후 메모리의 주소를 추출하여 데이터를 리드(Read)하는 과정과,Reading data by extracting an address of a memory after the exclusive OR operation; 상기 리드된 데이터를 상기 키 값에 따라 소정 자리수 만큼 쉬프트시키는 과정과,Shifting the read data by a predetermined digit according to the key value; 상기 쉬프트시킨 후 데이터를 소정의 레지스터에 저장시키는 과정과,Storing the data in a predetermined register after the shift; 상기 데이터를 저장한 후 카우터를 증가시키고 상기 증가된 카운터 값이 미리 설정된 소정의 값인가를 검사하는 과정과,Increasing the counter after storing the data and checking whether the increased counter value is a predetermined value; 상기 검사결과 카운터의 값이 미리 설정된 소정의 값인 경우 상기 데이터를 출력하고 소정의 값이 아닌 경우 추출하는 과정으로 진행하는 과정으로 이루어짐을 특징으로 하는 암호화 및 복호화 장치의 제어 방법.And if the value of the check result counter is a predetermined value, outputting the data and extracting the data if the value is not the predetermined value.
KR1019990040731A 1999-09-21 1999-09-21 Apparatus for encrypting and decrypting data KR100342526B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019990040731A KR100342526B1 (en) 1999-09-21 1999-09-21 Apparatus for encrypting and decrypting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019990040731A KR100342526B1 (en) 1999-09-21 1999-09-21 Apparatus for encrypting and decrypting data

Publications (2)

Publication Number Publication Date
KR20010028468A true KR20010028468A (en) 2001-04-06
KR100342526B1 KR100342526B1 (en) 2002-06-28

Family

ID=19612486

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019990040731A KR100342526B1 (en) 1999-09-21 1999-09-21 Apparatus for encrypting and decrypting data

Country Status (1)

Country Link
KR (1) KR100342526B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100356013B1 (en) * 2000-08-10 2002-10-12 한국전자통신연구원 Interface Device Of A General Processor And Encryption Coprocessor For Encryption

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100418965B1 (en) * 2001-10-29 2004-02-14 엘지전자 주식회사 Message Transfering Method For Multi-channel Realtime Speech Coder/Decoder
KR100406139B1 (en) * 2001-11-28 2003-11-14 한국전자통신연구원 system and method for Symmetric and Asymmetric Key Crypto Processing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100356013B1 (en) * 2000-08-10 2002-10-12 한국전자통신연구원 Interface Device Of A General Processor And Encryption Coprocessor For Encryption

Also Published As

Publication number Publication date
KR100342526B1 (en) 2002-06-28

Similar Documents

Publication Publication Date Title
KR100583635B1 (en) Cryptographic apparatus for supporting multiple modes
US5224166A (en) System for seamless processing of encrypted and non-encrypted data and instructions
KR101863143B1 (en) Memory integrity
CN1592877B (en) Method and device for encryption/decryption of data on mass storage device
CN100421046C (en) Method and computing device that securely runs authorized software
US7451288B2 (en) Word-individual key generation
US20030084308A1 (en) Memory encryption
US20040177257A1 (en) Data processing device and data processing method
US20060041747A1 (en) Encryption instruction processing apparatus
US8594322B2 (en) Encoding/decoding apparatus
CN101448127B (en) Secure information storage system and method
JPH09270785A (en) Information processor
WO2008031109A2 (en) System and method for encrypting data
US7657034B2 (en) Data encryption in a symmetric multiprocessor electronic apparatus
KR100876525B1 (en) Complementary method of symmetric key cryptography for multilingual text string encryption
KR0137709B1 (en) Method for protecting an enciphered computer object code against cryptanalysis
JPH01503028A (en) Encryption and decryption equipment
KR20010028468A (en) Apparatus for encrypting and decrypting data and controlling method thereof
KR20180059217A (en) Apparatus and method for secure processing of memory data
KR100494560B1 (en) Real time block data encryption/decryption processor using Rijndael block cipher and method therefor
KR100546777B1 (en) Apparatus and method for SEED Encryption/Decryption, and F function processor therefor
KR920001575B1 (en) Ciphering and deciphering device
US20030233560A1 (en) Method for protecting program in microcomputer
EP0403456A2 (en) Encryption circuit
JP2000076144A (en) Logic circuit, microcomputer and communication method between logic circuit and storage device

Legal Events

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

Payment date: 20110530

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee