KR102241390B1 - Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof - Google Patents

Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof Download PDF

Info

Publication number
KR102241390B1
KR102241390B1 KR1020190116919A KR20190116919A KR102241390B1 KR 102241390 B1 KR102241390 B1 KR 102241390B1 KR 1020190116919 A KR1020190116919 A KR 1020190116919A KR 20190116919 A KR20190116919 A KR 20190116919A KR 102241390 B1 KR102241390 B1 KR 102241390B1
Authority
KR
South Korea
Prior art keywords
encryption
data
encrypted
key
communication
Prior art date
Application number
KR1020190116919A
Other languages
Korean (ko)
Other versions
KR20210034937A (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 KR1020190116919A priority Critical patent/KR102241390B1/en
Publication of KR20210034937A publication Critical patent/KR20210034937A/en
Application granted granted Critical
Publication of KR102241390B1 publication Critical patent/KR102241390B1/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
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/08Randomization, e.g. dummy operations or using noise
    • 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/30Compression, e.g. Merkle-Damgard construction

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

본 발명은 고속 암호통신을 위한 암호화 장치 및 그 장치의 구동방법에 관한 것으로서, 본 발명의 실시예에 따른 고속 암호통신을 위한 암호화 장치는, 마스터 및 슬래이브 동작이 가능한 SPI 통신에 의해 주변장치로부터 압축 데이터를 수신하고, 수신한 압축 데이터를 암호화하여 주변장치로 전송하는 인터페이스부, 및 수신한 압축 데이터를 대칭키 암호 방식으로 암호화하여 암호 데이터를 생성하며, 난수로 생성되는 패킷 암호용 비밀키를 대칭키로 암호화하여 생성하는 비밀키에 대하여 복호화를 위한 비밀키 공유를 수행하는 암호화부를 포함할 수 있다.The present invention relates to an encryption device for high-speed encryption communication and a method of driving the device, wherein the encryption device for high-speed encryption communication according to an embodiment of the present invention is provided from a peripheral device through SPI communication capable of master and slave operation. An interface unit that receives compressed data, encrypts the received compressed data and transmits it to a peripheral device, and generates encrypted data by encrypting the received compressed data using a symmetric key encryption method, and a secret key for packet encryption that is generated as a random number. It may include an encryption unit for sharing a secret key for decryption on a secret key generated by encrypting with a symmetric key.

Description

고속 암호통신을 위한 암호화 장치 및 그 장치의 구동 방법{Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof}Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof

본 발명은 고속 암호통신을 위한 암호화 장치 및 그 장치의 구동 방법에 관한 것으로서, 보다 상세하게는 가령 네트워크 카메라의 호스트와 암호모듈간에 SPI(Serial Peripheral Interface)로 연결된 환경에서 암호통신 등의 암호화 성능을 최대로 하는 고속 암호통신을 위한 암호화 장치 및 그 장치의 구동방법에 관한 것이다.The present invention relates to an encryption device for high-speed cryptographic communication and a method of driving the device, and more particularly, encryption performance such as cryptographic communication in an environment connected between a host of a network camera and an encryption module through a serial peripheral interface (SPI). The present invention relates to an encryption device for maximizing high-speed encryption communication and a method of driving the device.

네트워크 카메라는 인터넷에 연결돼 PC나 스마트폰에 화상을 실시간 송출할 수 있는 감시 카메라이다. 별도의 녹화기가 없어도 손쉽게 지정 장소를 감시할 수 있어 가정이나 소규모 사업장에서 사용하기 적합하다. 온라인 네트워크를 이용하기 때문에 인터넷 프로토콜(IP) 카메라라고도 불린다. 이러한 IP 카메라는 안전을 위해 도로, 빌딩 등에 설치되어 주변의 영상을 촬영한다. IP 카메라에 의해 촬영된 영상이 네트워크를 통해 전송될 때, 해킹의 우려가 있다. 따라서 영상이 네트워크를 통해 전송될 때, 영상의 해킹을 방지하기 위해 영상의 암호화가 필요하다.A network camera is a surveillance camera that is connected to the Internet and can transmit images to a PC or smartphone in real time. It is suitable for use in homes or small businesses because it is possible to easily monitor a designated place without a separate recorder. It is also called an Internet Protocol (IP) camera because it uses an online network. These IP cameras are installed on roads and buildings for safety to take pictures of the surroundings. When an image captured by an IP camera is transmitted through a network, there is a risk of hacking. Therefore, when an image is transmitted through a network, it is necessary to encrypt the image to prevent hacking of the image.

IP 카메라의 일반적인 암호화 통신은 가령 리눅스(Linux) 기반의 SPI 라이브러리(Library)와 소프트웨어 암호 라이브러리(Library)를 이용하는 경우, 호스트 즉 네트워크 카메라의 SPI API(Application Programming Interface)에서 명령을 모두 송신하고 그 명령에 대한 영상 데이터를 암호칩에 전달한다. 암호칩에서는 그 요청한 명령을 모두 수신한 후에 평문(Plain Text)을 암호화하고 암호화된 영상 데이터를 순차적으로 호스트로 전달하는 방식으로 이루어진다.In the case of using a Linux-based SPI library and a software encryption library, for example, the IP camera's general encryption communication is performed by sending all commands from the host, that is, the SPI application programming interface (API) of the network camera. The image data for is transmitted to the encryption chip. In the encryption chip, after receiving all the requested commands, the plain text is encrypted and the encrypted image data is sequentially delivered to the host.

그런데, 이러한 일반적인 암호화 통신 방식은 암호화 과정에 시간이 많이 소요되는 문제가 있으며, 이는 결국 영상 처리에 시간 지연을 발생시킨다.However, such a general encryption communication method has a problem in that the encryption process takes a lot of time, which in turn causes a time delay in image processing.

한국등록특허공보 제10-0835372호(2008.05.29)Korean Registered Patent Publication No. 10-0835372 (2008.05.29) 한국공개특허공보 제10-2006-0033768호(2006.04.19)Korean Patent Publication No. 10-2006-0033768 (2006.04.19) 한국공개특허공보 제10-2018-0065183호(2018.06.18)Korean Patent Publication No. 10-2018-0065183 (2018.06.18) 한국등록특허공보 제10-1930950호(2018.12.13)Korean Registered Patent Publication No. 10-1930950 (2018.12.13) 한국등록특허공보 제10-2002523호(2019.07.16)Korean Registered Patent Publication No. 10-2002523 (2019.07.16)

본 발명의 실시예는, 가령 네트워크 카메라의 호스트와 암호모듈간에 SPI 인터페이스로 연결된 환경에서 암호통신 등의 암호화 성능을 최대로 하는 고속 암호통신을 위한 암호화 장치 및 그 장치의 구동방법을 제공함에 그 목적이 있다.An embodiment of the present invention is to provide an encryption device for high-speed cryptographic communication and a driving method of the device that maximizes encryption performance, such as cryptographic communication, in an environment connected between a host of a network camera and an encryption module through an SPI interface. There is this.

본 발명의 실시예에 따른 고속 암호통신을 위한 암호화 장치는, 마스터(master) 및 슬래이브(slave) 동작이 가능한 SPI 통신에 의해 주변장치로부터 압축 데이터를 수신하고, 상기 수신한 압축 데이터를 암호화하여 상기 주변장치로 전송하는 인터페이스부, 및 상기 수신한 압축 데이터를 대칭키 암호 방식으로 암호화하여 암호 데이터를 생성하며, 난수로 생성되는 패킷 암호용 비밀키를 대칭키로 암호화하여 생성하는 비밀키에 대하여 복호화를 위한 비밀키 공유를 수행하는 암호화부를 포함한다.An encryption device for high-speed encryption communication according to an embodiment of the present invention receives compressed data from a peripheral device through SPI communication capable of master and slave operations, and encrypts the received compressed data. The interface unit transmitted to the peripheral device and the received compressed data are encrypted with a symmetric key encryption method to generate encrypted data, and a secret key generated by encrypting a packet encryption secret key generated as a random number with a symmetric key is decrypted. It includes an encryption unit that performs the secret key sharing for.

상기 암호화부는, 난수로 생성되는 개인키 값과 상기 주변장치의 공개키값을 연산하여 상기 대칭키를 생성할 수 있다.The encryption unit may generate the symmetric key by calculating a private key value generated as a random number and a public key value of the peripheral device.

상기 암호화부는, 대칭키 암호 엔진으로서 국내표준 알고리즘인 아리아(ARIA) 또는 국제표준 알고리즘인 AES(Advanced Encryption Standard)를 실행하며, 256 비트(bit)의 키 길이를 사용할 수 있다.The encryption unit executes AIA, which is a national standard algorithm or AES (Advanced Encryption Standard), which is an international standard algorithm as a symmetric key encryption engine, and may use a key length of 256 bits.

상기 암호화부는, 상기 주변장치로부터 N번째 블록의 압축 데이터가 수신되면, 상기 N번째 블록의 압축 데이터를 암호화하면서 기 암호화한 (N-2)번째 블록의 암호 데이터를 상기 주변장치로 제공할 수 있다.When the compressed data of the N-th block is received from the peripheral device, the encryption unit may encrypt the compressed data of the N-th block and provide the encrypted data of the (N-2)-th block to the peripheral device. .

상기 암호화부는, N개(여기서, N은 정수)의 상기 압축 데이터를 암호화하기 위하여 N-(N-4)개의 더미(dummy) 데이터를 이용하며, 항상 4개의 더미 데이터를 이용할 수 있다.The encryption unit uses N-(N-4) dummy data to encrypt N (here, N is an integer) of the compressed data, and can always use 4 dummy data.

또한, 본 발명의 실시예에 따른 고속 암호통신을 위한 암호화 장치의 구동방법은, 인터페이부가, 마스터 및 슬래이브 동작이 가능한 SPI 통신에 의해 주변장치로부터 압축 데이터를 수신하고, 상기 수신한 압축 데이터를 암호화한 암호 데이터를 상기 주변장치로 전송하는 단계, 및 암호화부가, 상기 수신한 압축 데이터를 대칭키 암호 방식으로 암호화하여 암호 데이터를 생성하며, 난수로 생성되는 패킷 암호용 비밀키를 대칭키로 암호화하여 생성하는 비밀키에 대하여 복호화를 위한 비밀키 공유를 수행하는 단계를 포함한다.In addition, in the driving method of the encryption device for high-speed encryption communication according to an embodiment of the present invention, the interface unit receives compressed data from a peripheral device through SPI communication capable of master and slave operation, and receives the received compressed data. Transmitting the encrypted encrypted data to the peripheral device, and the encryption unit encrypts the received compressed data using a symmetric key encryption method to generate encrypted data, and encrypts a packet encryption secret key generated as a random number with a symmetric key. And sharing a secret key for decryption on the generated secret key.

상기 암호 데이터를 생성하는 단계는, 난수로 생성되는 개인키 값과 상기 주변장치의 공개키값을 연산하여 상기 대칭키를 생성할 수 있다.In the generating of the encryption data, the symmetric key may be generated by calculating a private key value generated as a random number and a public key value of the peripheral device.

상기 암호 데이터를 생성하는 단계는, 대칭키 암호 엔진으로서 아리아(ARIA) 또는 AES를 실행하며, 256 비트(bit)의 키 길이를 사용할 수 있다.In the step of generating the encryption data, ARIA or AES is executed as a symmetric key encryption engine, and a key length of 256 bits may be used.

상기 암호 데이터를 생성하는 단계는, 상기 주변장치로부터 N번째 블록의 압축 데이터가 수신되면, 상기 N번째 블록의 압축 데이터를 암호화하면서 기암호화한 (N-2)번째 블록의 암호 데이터를 상기 주변장치로 제공할 수 있다.In the generating of the encryption data, when the compressed data of the N-th block is received from the peripheral device, the encrypted data of the (N-2)-th block, which is previously encrypted while encrypting the compressed data of the N-th block, is stored in the peripheral device. Can be provided as.

상기 암호 데이터를 생성하는 단계는, N개(여기서, N은 정수)의 상기 압축 데이터를 암호화하기 위하여 N-(N-4)개의 더미 데이터를 이용하며, 항상 4개의 더미 데이터를 이용할 수 있다.In the step of generating the encrypted data, N-(N-4) dummy data are used to encrypt N (here, N is an integer) of the compressed data, and 4 dummy data may always be used.

본 발명의 실시예에 따르면, 가령 IP 카메라의 촬영 영상을 고속으로 암호화 처리함으로써 영상 처리 시간을 빠르게 증가시킬 수 있을 것이다.According to an embodiment of the present invention, it is possible to rapidly increase an image processing time by encrypting an image captured by an IP camera at high speed.

또한, IP 카메라의 촬영 영상을 실시간으로 암호화하여 전송할 수 있으며, 복호화시 프레임 손실 및 딜레이(delay)를 없앨 수 있을 것이다.In addition, the captured image of the IP camera may be encrypted and transmitted in real time, and frame loss and delay during decryption may be eliminated.

나아가, IP 카메라뿐 아니라 홈 사물인터넷(Home IoT), 스마트 팩토리, 커넥티드카, 드론 등 다양한 분야에서 적용이 가능할 수 있을 것이다.Furthermore, it can be applied not only to IP cameras, but also to various fields such as Home IoT, smart factories, connected cars, and drones.

뿐만 아니라, 소형 사이즈(예: 6mmㅧ6㎜)의 SoC(System-one-chip)로써 저성능/저전력 IoT 디바이스의 실시간 데이터 암호화에 유용할 수 있을 것이다.In addition, as a system-one-chip (SoC) of a small size (eg 6mm x 6mm), it will be useful for real-time data encryption of low-performance/low-power IoT devices.

도 1은 본 발명의 실시예에 따른 영상서비스 시스템을 나타내는 도면,
도 2는 도 1의 암호화 장치의 세부 구조를 예시한 블록다이어그램,
도 3은 도 1의 암호화 장치로서 IP 카메라를 도식화하여 나타낸 도면,
도 4는 일반적인 암호화 통신을 설명하기 위한 도면,
도 5는 본 발명의 실시예에 따른 고속 암호화 통신을 설명하기 위한 도면,
도 6은 도 4 및 도 5의 암호화 통신을 비교 설명하기 위한 도면,
도 7 및 도 8은 도 3의 IP 카메라 모듈과 암호 모듈의 통신 과정과 운영과정을 설명하기 위한 도면,
도 9는 본 발명의 실시예에 따른 암호화 장치의 구동 과정의 흐름도,
도 10은 도 3의 SPI API 처리 장치의 구동 과정을 나타내는 흐름도, 그리고
도 11은 도 3의 암호 모듈의 구동 과정을 나타내는 흐름도,
1 is a diagram showing a video service system according to an embodiment of the present invention;
2 is a block diagram illustrating a detailed structure of the encryption device of FIG. 1;
3 is a diagram schematically showing an IP camera as the encryption device of FIG. 1;
4 is a diagram for explaining a general encrypted communication;
5 is a diagram for explaining a high-speed encrypted communication according to an embodiment of the present invention;
6 is a view for explaining a comparison of the encrypted communication of FIGS. 4 and 5;
7 and 8 are diagrams for explaining a communication process and an operation process between the IP camera module and the encryption module of FIG. 3;
9 is a flowchart of a driving process of an encryption device according to an embodiment of the present invention;
10 is a flowchart illustrating a driving process of the SPI API processing device of FIG. 3, and
11 is a flowchart illustrating a driving process of the encryption module of FIG. 3;

이하, 도면을 참조하여 본 발명의 실시예에 대하여 상세히 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

도 1은 본 발명의 실시예에 따른 영상서비스시스템을 나타내는 도면이다.1 is a diagram showing a video service system according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 실시예에 따른 영상서비스시스템(90)은 암호화장치(100), 사용자 단말장치(110), 통신망(120) 및 영상서비스장치(130)의 일부 또는 전부를 포함한다.As shown in FIG. 1, the image service system 90 according to the embodiment of the present invention includes part or all of the encryption device 100, the user terminal device 110, the communication network 120, and the image service device 130. Includes.

여기서, "일부 또는 전부를 포함한다"는 것은 통신망(120)과 같은 일부 구성요소가 생략되어 암호화장치(100)와 영상서비스장치(130)가 다이렉트 통신(예: P2P 통신)을 수행하거나, 영상서비스장치(130)의 일부 또는 전부가 통신망(120)을 구성하는 네트워크장치(예: 무선교환장치 등)에 통합되어 구성될 수 있는 것 등을 의미하는 것으로서, 발명의 충분한 이해를 돕기 위하여 전부 포함하는 것으로 설명한다.Here, "including some or all" means that some components such as the communication network 120 are omitted so that the encryption device 100 and the image service device 130 perform direct communication (eg, P2P communication), or A part or all of the service device 130 is meant to be integrated and configured in a network device (eg, a wireless switching device, etc.) constituting the communication network 120, and includes all to help a sufficient understanding of the invention. Explain that.

암호화 장치(100)는 IP 카메라, 드론, 사물인터넷(IoT) 기기, 커넥티드카, 스마트 팩토리 등 다양한 장치에 구성될 수 있다. 더 정확하게는 카메라 등의 촬영장치에 구비되거나 연동하는 것이 바람직하지만, 영상 데이터를 압축하지 않고 암호화만 수행하여 전송하거나 압축 데이터를 전송하는 시스템에도 사용될 수 있다.The encryption device 100 may be configured in various devices such as IP cameras, drones, Internet of Things (IoT) devices, connected cars, and smart factories. More precisely, it is preferable to be provided with or interlocked with a photographing device such as a camera, but it may be used in a system that transmits video data by performing encryption without compressing it or transmits compressed data.

본 발명의 실시예에 따른 암호화 장치(100)는 고속 암호통신을 위한 암호칩(예: KEV7)(101)을 포함할 수 있다. 고속 암호통신을 위하여 암호화 장치(100)는 호스트(예: 제어부)와 마스터 및 슬래이브 동작이 가능한 SPI 통신을 수행하고, 암호화 엔진(혹은 알고리즘)은 대칭키 암호화 방식을 사용할 수 있다. 또한, 암호화 엔진은 국내 표준 알고리즘인 아리아(ARIA)를 사용할 수 있으며, 키 길이는 256 비트(bit)를 사용할 수 있다. 나아가 암호화 장치(100)는 암호화 패킷의 복호화를 위해 비밀키를 공유하며, 비밀키 생성을 위해 난수를 이용할 수 있다.The encryption device 100 according to an embodiment of the present invention may include an encryption chip (eg, KEV7) 101 for high-speed encryption communication. For high-speed encryption communication, the encryption device 100 may perform SPI communication capable of master and slave operations with a host (eg, a control unit), and an encryption engine (or algorithm) may use a symmetric key encryption method. In addition, the encryption engine can use ARIA, which is a national standard algorithm, and the key length can use 256 bits. Furthermore, the encryption apparatus 100 shares a secret key for decryption of the encrypted packet, and may use a random number to generate the secret key.

암호화 장치(100)는 가령 IP 카메라로서 지정 장소에서 설치되어 촬영되는 촬영영상을 실시간으로 암호화하여 영상서비스장치(130)로 전송할 수 있다. 물론, 암호화 장치(100)는 촬영 영상을 영상서비스장치(130)로 제공하기에 앞서 주변에 설치되는 DVR이나 NVR 등에 저장시킬 수도 있다.The encryption device 100 may encrypt a captured image installed and photographed at a designated place as an IP camera and transmit it to the image service device 130 in real time. Of course, the encryption device 100 may store the captured image in a DVR or NVR installed nearby before providing the captured image to the image service device 130.

사용자 단말장치(110)는 스마트폰, 데스크탑컴퓨터, 랩탑컴퓨터, 태블릿PC, 국내 S사의 갤*시기기와 같은 웨어러블기기 등을 포함한다. 사용자 단말장치(110)는 가정이나 공장 등에 설치되어 해당 공간을 촬영하는 IP 카메라로부터 제공하는 촬영영상을 통해 해당 공간을 감시할 수 있다. 물론 여기서 IP 카메라는 도 1의 암호화 장치(100)를 구비하는 것이 바람직하다.The user terminal device 110 includes a smart phone, a desktop computer, a laptop computer, a tablet PC, and a wearable device such as a domestic S company's gal* device. The user terminal device 110 may be installed in a home or a factory to monitor a corresponding space through a photographed image provided from an IP camera that photographs the space. Of course, it is preferable that the IP camera includes the encryption device 100 of FIG. 1.

사용자는 자신이 구입한 IP 카메라 등을 통해 특정 공간을 실시간을 감시하기 위하여 IP 카메라의 구입처 또는 제조사 등에서 제공하는 서비스에 가입할 수 있다. 이를 통해 지난 촬영영상 등도 시청이 가능할 수 있다. 이러한 점에서 보면 IP 카메라는 웹 서버와 같은 동작을 수행한다고도 볼 수 있다.In order to monitor a specific space in real time through an IP camera purchased by the user, the user can subscribe to a service provided by the purchaser or manufacturer of the IP camera. Through this, it may be possible to watch past images. In this respect, it can be seen that the IP camera performs the same operation as a web server.

통신망(120)은 유무선 통신망을 모두 포함한다. 가령 통신망(120)으로서 유무선 인터넷망이 이용되거나 연동될 수 있다. 여기서 유선망은 케이블망이나 공중 전화망(PSTN)과 같은 인터넷망을 포함하는 것이고, 무선 통신망은 CDMA, WCDMA, GSM, EPC(Evolved Packet Core), LTE(Long Term Evolution), 와이브로(Wibro) 망 등을 포함하는 의미이다. 물론 본 발명의 실시예에 따른 통신망(120)은 이에 한정되는 것이 아니며, 가령 클라우드 컴퓨팅 환경하의 클라우드 컴퓨팅망, 5G망 등에 사용될 수 있다. 가령, 통신망(120)이 유선 통신망인 경우 통신망(120) 내의 액세스포인트는 전화국의 교환국 등에 접속할 수 있지만, 무선 통신망인 경우에는 통신사에서 운용하는 SGSN 또는 GGSN(Gateway GPRS Support Node)에 접속하여 데이터를 처리하거나, BTS(Base Station Transmission), NodeB, e-NodeB 등의 다양한 중계기에 접속하여 데이터를 처리할 수 있다.The communication network 120 includes all wired and wireless communication networks. For example, as the communication network 120, a wired or wireless Internet network may be used or interlocked. Here, the wired network includes an Internet network such as a cable network or a public telephone network (PSTN), and the wireless communication network includes CDMA, WCDMA, GSM, Evolved Packet Core (EPC), Long Term Evolution (LTE), and Wibro networks. It is meant to include. Of course, the communication network 120 according to the embodiment of the present invention is not limited thereto, and may be used, for example, a cloud computing network or a 5G network under a cloud computing environment. For example, when the communication network 120 is a wired communication network, the access point in the communication network 120 can be connected to the switching center of the telephone office, but in the case of a wireless communication network, data can be accessed by accessing SGSN or GGSN (Gateway GPRS Support Node) operated by a communication company. Alternatively, data can be processed by accessing various repeaters such as BTS (Base Station Transmission), NodeB, and e-NodeB.

통신망(120)은 액세스포인트를 포함할 수 있다. 여기서의 액세스포인트는 건물 내에 많이 설치되는 펨토(femto) 또는 피코(pico) 기지국과 같은 소형 기지국을 포함한다. 펨토 또는 피코 기지국은 소형 기지국의 분류상 암호화 장치(100)나 사용자 단말장치(110) 등을 최대 몇 대까지 접속할 수 있느냐에 따라 구분된다. 물론 액세스포인트는 암호화 장치(100)나 사용자 단말장치(110) 등과 유선 외에도 지그비 및 와이파이 등의 근거리 통신을 수행하기 위한 근거리 통신모듈을 포함할 수 있다. 액세스포인트는 무선통신을 위하여 TCP/IP 혹은 RTSP(Real-Time Streaming Protocol)를 이용할 수 있다. 여기서, 근거리 통신은 와이파이 이외에 블루투스, 지그비, 적외선, UHF(Ultra High Frequency) 및 VHF(Very High Frequency)와 같은 RF(Radio Frequency) 및 초광대역 통신(UWB) 등의 다양한 규격으로 수행될 수 있다. 이에 따라 액세스포인트는 데이터 패킷의 위치를 추출하고, 추출된 위치에 대한 최상의 통신 경로를 지정하며, 지정된 통신 경로를 따라 데이터 패킷을 다음 장치, 예컨대 영상서비스장치(130) 등으로 전달할 수 있다. 액세스포인트는 일반적인 네트워크 환경에서 여러 회선을 공유할 수 있으며, 예컨대 라우터(router), 리피터(repeater) 및 중계기 등이 포함된다.The communication network 120 may include an access point. Here, the access point includes a small base station such as a femto or pico base station that is frequently installed in a building. Femto or pico base stations are classified according to how many encryption devices 100 or user terminal devices 110 can be accessed according to the classification of small base stations. Of course, the access point may include a short-range communication module for performing short-range communication such as ZigBee and Wi-Fi in addition to wired lines such as the encryption device 100 or the user terminal device 110. The access point may use TCP/IP or Real-Time Streaming Protocol (RTSP) for wireless communication. Here, short-range communication may be performed in various standards such as Bluetooth, Zigbee, infrared, radio frequency (RF) such as ultra high frequency (UHF) and very high frequency (VHF), and ultra wideband communication (UWB) in addition to Wi-Fi. Accordingly, the access point may extract the location of the data packet, designate the best communication path for the extracted location, and transmit the data packet to the next device, for example, the video service device 130 along the designated communication path. The access point can share several lines in a general network environment, and includes, for example, a router, a repeater, and a repeater.

영상서비스장치(130)는 IP 카메라나 드론 등에 의해 촬영된 촬영영상을 제공하는 장치를 포함한다. 예를 들어, IP 카메라를 설치하고 다수에게 영상 서비스를 제공하는 운영사의 서버를 포함할 수 있다. 가령, IP 카메라를 임대하여 사용하는 경우, 서비스 업체는 IP 카메라를 설치한 후, 사용자 단말장치(110)에서 실시간으로 촬영영상을 시청하도록 할 수 있다.The image service device 130 includes a device that provides a photographed image captured by an IP camera or a drone. For example, it may include an operator's server that installs IP cameras and provides video services to a large number of them. For example, in the case of renting and using an IP camera, the service company may install the IP camera and then allow the user terminal device 110 to view the captured image in real time.

따라서, 사용자는 사용자 단말장치(110)를 통해 영상서비스장치(130)에 접속하여 자신이 확인하고 싶은 IP 카메라, 더 정확하게는 자신이 계약한 바 있는 IP 카메라에 의해 취득되는 촬영영상을 확인할 수 있다. 예를 들어, 매장에 IP 카메라를 설치한 경우 촬영영상을 영상서비스장치(130)로 제공되어 DB(130a)에 저장될 수 있다. 또는 집의 거실에 IP 카메라를 설치한 경우, 촬영된 영상은 영상서비스장치(130)로 제공되어 저장될 수 있다. 이에 따라 사용자는 자신이 원하는 시간에 언제든지 촬영된 영상을 확인할 수 있게 된다.Accordingly, the user can access the video service device 130 through the user terminal device 110 to check the IP camera he wants to check, more precisely, the captured image acquired by the IP camera he has contracted with. . For example, when an IP camera is installed in a store, a photographed image may be provided to the image service device 130 and stored in the DB 130a. Alternatively, when an IP camera is installed in the living room of the house, the captured image may be provided to the image service device 130 and stored. Accordingly, the user can check the captured image at any time he desires.

영상서비스장치(130)는 암호화 장치(100)를 포함하는 IP 카메라 등으로부터 암호화된 압축 데이터를 수신하여 별도의 복호화를 수행하지 않고 DB(130a)에 저장한 후 사용자 단말장치(110)로 전송할 수 있다. 물론 이러한 동작은 시스템 설계자의 의도에 따라 다양하게 이루어지므로 어느 하나의 형태에 특별히 한정하지는 않을 것이다. 여기서, 복호화는 압축 데이터를 원래 영상 데이터로 복원하는 복호화와, 암호화를 해독하는 복호화를 포함할 수 있지만, 의미의 혼동을 줄이기 위해 전자의 경우는 디코딩이라 명명될 수 있다. 본 발명의 실시예에서는 패킷 암호화를 다루고 있으므로, 암호화의 해독 동작을 복호화로 명명하기로 한다.The video service device 130 may receive encrypted compressed data from an IP camera including the encryption device 100, store it in the DB 130a without performing separate decryption, and transmit it to the user terminal device 110. have. Of course, since such an operation is performed in various ways according to the intention of the system designer, it will not be specifically limited to any one form. Here, decryption may include decryption for restoring compressed data to original image data and decryption for decryption of encryption, but in the former case may be referred to as decoding to reduce confusion in meaning. Since the embodiment of the present invention deals with packet encryption, the decryption operation of encryption will be referred to as decryption.

도 2는 도 1의 암호화 장치의 세부 구조를 예시한 블록다이어그램, 도 3은 도 1의 암호화 장치로서 IP 카메라를 도식화하여 나타낸 도면, 도 4는 일반적인 암호화 통신을 설명하기 위한 도면, 도 5는 본 발명의 실시예에 따른 고속 암호화 통신을 설명하기 위한 도면, 그리고 도 6은 도 4 및 도 5의 암호화 통신을 비교 설명하기 위한 도면이다.FIG. 2 is a block diagram illustrating a detailed structure of the encryption device of FIG. 1, FIG. 3 is a schematic diagram of an IP camera as the encryption device of FIG. 1, FIG. 4 is a diagram for explaining a general encrypted communication, and FIG. 5 is A diagram for describing a high-speed encrypted communication according to an embodiment of the present invention, and FIG. 6 is a diagram for describing a comparison between the encrypted communication of FIGS. 4 and 5.

도 2에 도시된 바와 같이, 본 발명의 실시예에 따른 도 1의 암호화 장치(100)는 가령 고속 암호화를 수행하는 IP 카메라로서, 영상 처리부(혹은 호스트)(200) 및 암호화부(210)의 일부 또는 전부를 포함하며, 여기서 "일부 또는 전부를 포함"한다는 것은 앞서서의 의미와 동일하다.As shown in FIG. 2, the encryption apparatus 100 of FIG. 1 according to an embodiment of the present invention is an IP camera that performs high-speed encryption, and the image processing unit (or host) 200 and the encryption unit 210 Including some or all, where "including some or all" is the same as the previous meaning.

영상 처리부(200)는 촬상부, 통신 인터페이스부, 제어부, 저장부, 인코딩부(혹은 부호화부)의 일부 또는 전부를 포함할 수 있다.The image processing unit 200 may include some or all of an imaging unit, a communication interface unit, a control unit, a storage unit, and an encoding unit (or encoding unit).

촬상부는 가령 CCD(Charge-Coupled Device) 등의 촬상소자로 구성되는 CCD 모듈을 포함할 수 있다. CCD 센서는 빛을 전하로 변환시켜 이미지를 얻어내는 센서이다. 본 발명의 실시예에 따른 촬상부는 암호화 장치(100)에 일체화되어 구성될 수 있지만, 별도 제작되어 잭(jack) 등에 의해 암호화 장치(100)에 연결되어 사용될 수도 있으므로 본 발명의 실시예에서는 어떠한 형태로 촬상부를 구성하느냐에 특별히 한정하지는 않을 것이다.The image pickup unit may include a CCD module composed of an image pickup device such as a charge-coupled device (CCD). The CCD sensor is a sensor that converts light into electric charges to obtain an image. The imaging unit according to the embodiment of the present invention may be integrated and configured with the encryption device 100, but may be separately manufactured and connected to the encryption device 100 by a jack, etc., so that any form in the embodiment of the present invention There will be no particular limitation on whether or not to configure the image pickup unit with.

통신 인터페이스부는 촬상부에서 촬영된 촬영 영상 즉 영상 데이터를 압축 및 암호화하여 외부 장치로 전송한다. 물론 암호화된 압축 데이터 즉 암호 데이터는 제어부의 제어하에 외부 장치로 전송된다. 여기서, 외부 장치는 다양한 장치를 포함할 수 있겠지만, 압축 및 암호화되어 전송되는 만큼 도 1의 통신망(120)을 경유하여 촬영영상을 저장하는 영상서비스장치(130)나 그에 연동하는 DB(130a)가 될 수 있다. 이에 따라 사용자들은 인터넷망을 통해 자신의 스마트폰이나 컴퓨터 등의 사용자 단말장치(110)를 통해 특정 장소에 설치되는 가령 IP 카메라의 촬영영상을 언제든지 또는 실시간으로 확인할 수 있게 된다.The communication interface unit compresses and encrypts a captured image, that is, image data captured by the imaging unit, and transmits the compressed and encrypted data to an external device. Of course, the encrypted compressed data, that is, the encrypted data is transmitted to an external device under the control of the controller. Here, the external device may include various devices, but the image service device 130 that stores the captured image via the communication network 120 of FIG. 1 or the DB 130a interlocking therewith as it is compressed and encrypted and transmitted. Can be. Accordingly, users can check the captured image of an IP camera installed in a specific place at any time or in real time through the user terminal device 110 such as their smartphone or computer through the Internet network.

또한, 통신 인터페이스부는 촬상부에서 촬영되는 촬영영상을 저장하기 위한 저장 장치로서 DVR(Digital Video Recorder)이나 NVR에 연결될 수도 있다. 통신 인터페이스부는 DVR이나 NVR과 동축케이블 또는 광케이블 등 랜케이블에 의해 연결될 수 있으며, 촬영영상은 저장 장치에 저장된 후 통신망을 경유하여 가령 영상서비스 서버로 전송될 수 있다.In addition, the communication interface unit may be connected to a digital video recorder (DVR) or an NVR as a storage device for storing a photographed image captured by the imaging unit. The communication interface unit may be connected to a DVR or NVR by a LAN cable such as a coaxial cable or an optical cable, and the captured image may be stored in a storage device and then transmitted to, for example, a video service server through a communication network.

제어부는 IP 카메라 등의 암호화 장치(100)를 구성하는 촬상부, 통신 인터페이스부, 저장부 및 암호화부(210)의 전반적인 제어 동작을 담당한다. 촬상부에서 촬영된 촬영 영상을 가령 저장부에 임시 저장한 후 불러내어 압축(인코딩 혹은 부호화)하고, 압축한 영상 데이터를 암호화부(210)로 전송하여 암호화된 영상 데이터 즉 암호 데이터를 수신한 후 통신 인터페이스부를 통해 외부로 전송할 수 있다. 제어부는 가령 16 바이트(byte) 단위로 압축 데이터를 암호화부(210)로 전송하기에 앞서 통신을 설정하고, 설정한 통신을 해제하며, 이의 과정에서 기기간 상호 인증을 수행하여 인증 후 압축 데이터의 암호화 동작을 수행할 수 있다. 제어부는 기기간 상호 인증 등을 위하여 난수(random number)를 생성해 이용할 수 있다. 개인키 값을 난수로 생성하는 것이다. 이에 근거해 볼 때 제어부는 난수 생성기(예: TRNG)를 포함할 수 있다. 자세한 내용은 이후에 좀더 다루기로 한다.The control unit is in charge of overall control operations of the imaging unit, the communication interface unit, the storage unit, and the encryption unit 210 constituting the encryption device 100 such as an IP camera. After receiving the encrypted image data, that is, the encrypted data, by temporarily storing the captured image captured by the imaging unit in a storage unit and then calling and compressing (encoding or encoding) the compressed image data, and transmitting the compressed image data to the encryption unit 210 It can be transmitted to the outside through the communication interface unit. The control unit establishes communication before transmitting the compressed data in units of 16 bytes to the encryption unit 210, releases the set communication, and performs mutual authentication between devices in this process to encrypt the compressed data after authentication. You can perform the operation. The control unit may generate and use a random number for mutual authentication between devices. It is to generate the private key value as a random number. Based on this, the control unit may include a random number generator (eg, TRNG). More details will be covered later.

제어부는 촬영 영상을 인코딩 즉 압축하기 위하여 별도로 구성되어 연결되는 인코더를 통해 수행할 수 있지만, 내부에 포함되는 인코더를 통해 압축을 수행할 수도 있다. 빠른 인코딩을 수행하기 위하여 다양한 방식이 사용될 수 있으므로 본 발명의 실시예에서는 어느 하나의 방식에 특별히 한정하지는 않을 것이다. 압축 방식은 인트라(INTRA)나 인터(INTER) 방식이 대표적이나 그의 조합된 형태로도 얼마든지 가능할 수 있을 것이다.The controller may perform encoding through an encoder that is separately configured and connected to encode the captured image, but may perform compression through an encoder included therein. Since various methods can be used to perform fast encoding, the embodiment of the present invention will not be particularly limited to any one method. As for the compression method, the INTRA or INTER method is representative, but any combination thereof may be possible.

제어부는 가령 본 발명의 다른 실시예로서 CPU와 메모리를 포함할 수 있으며, 메모리에는 본 발명의 실시예에 따라 암호화부(210)와 고속 암호화 통신을 수행하기 위한 프로그램을 포함할 수 있다. 예를 들어, 암호화 장치(100)가 도 3의 경우에서와 같이 IP 카메라(100')인 경우 IP 카메라 모듈(200')을 포함할 수 있다. 물론, 여기서 모듈은 H/W 모듈과 S/W 모듈 중 적어도 하나를 포함하는 의미이다. 도 3에서 볼 때, 카메라 응용(부)은 H/W 모듈을 의미할 수 있고, 나머지는 S/W 모듈을 의미할 수 있지만, 이에 특별히 한정하지는 않을 것이다. IP 카메라 모듈(200')은 호스트(Host)라 명명될 수도 있다. "호스트"는 인터넷에 연결되어 있고 개별적인 IP 주소를 가지는 시스템을 의미한다. TCP/IP는 네트워크 전송 프로토콜로서, 서로 다른 운영체제를 쓰는 컴퓨터 간에도 데이터를 전송할 수 있어 인터넷에서 정보 전송을 위한 표준 프로토콜로 쓰이고 있다.As another embodiment of the present invention, the control unit may include a CPU and a memory, and the memory may include a program for performing high-speed encrypted communication with the encryption unit 210 according to an embodiment of the present invention. For example, when the encryption device 100 is an IP camera 100' as in the case of FIG. 3, it may include an IP camera module 200'. Of course, the module here means including at least one of an H/W module and a S/W module. 3, the camera application (unit) may refer to an H/W module, and the rest may refer to a S/W module, but the present invention will not be particularly limited thereto. The IP camera module 200 ′ may also be referred to as a host. "Host" means a system that is connected to the Internet and has a separate IP address. TCP/IP is a network transmission protocol and is used as a standard protocol for information transmission on the Internet because data can be transmitted between computers using different operating systems.

도 3의 IP 카메라 모듈(200')에서 카메라 응용 부위는 네트워크 전송을 위해 영상 데이터를 압축하여 버퍼에 저장하는 과정을 포함한다. 물론 버퍼는 램과 같이 데이터 저장을 위한 일종의 메모리이다. 더 정확하게는 버퍼는 데이터 출력 시간의 지연을 위해 사용된다. 압축한 영상 데이터인 압축 데이터를 암호화하는 데 가령 KEV7 API(Application Programming Interface)를 호출하고, 암호화된 압축 데이터 즉 암호 데이터를 네트워크 전송을 위한 버퍼에 저장한다. KEV7은 암호화칩의 제품명(또는 모델명)에 해당된다. KEV7 API와 관련해 보면, KEV API는 PKCS11 API(혹은 제1 인터페이스부)와 SPI API(혹은 제2 인터페이스부)로 구성되며, 카메라 응용 부위에서 압축 데이터를 암호화하기 위해 호출된다. PKSC11 API는 PKCS#11 표준을 구현할 수 있으며, SPI API는 고속 암호화 통신을 구현한 API이다. KEV API에서 PKCS11은 카메라 응용 부위에서 직접 호출하여 가장 먼저 호출되는 API이다. 압축 데이터 앞에 16 바이트의 명령헤더를 가지고 암호화부(210) 가령 암호모듈의 암호화 기능을 사용하기 위해 SPI 통신을 수행한다. 이때 PKCS11 API는 SPI API를 호출하고, 암호모듈과의 고속 암호화 통신을 유지한다. 또한, KEV API에서 SPI API는 고속 암호화 통신을 수행하며, 암호모듈과의 SPI 통신을 위해 PKCS11 API에서 호출되는 API이다. 명령헤더를 포함한 압축 데이터를 16 바이트 단위로 가령 리눅스 커널(Linux Kernel)의 SPI 장치 드라이버(Driver)를 통해 SPI 통신을 수행한다. 커널은 운영체제(OS)의 심장이자 OS를 규정짓는 매우 중요한 부분이다. 하드웨어의 자원을 자원이 필요한 프로세스에 나눠주고, 덩달아 프로세스 제어(태스크 매니저), 메모리 제어, 프로그램이 운영체제에 요구하는 시스템 콜 등을 수행하는 부분으로 운영체제 맨 하부에서 돌아간다.In the IP camera module 200' of FIG. 3, the camera application part includes a process of compressing image data for network transmission and storing it in a buffer. Of course, a buffer is a kind of memory for storing data like RAM. More precisely, the buffer is used to delay the data output time. To encrypt compressed data, which is compressed image data, for example, the KEV7 API (Application Programming Interface) is called, and the encrypted compressed data, that is, encrypted data, is stored in a buffer for network transmission. KEV7 corresponds to the product name (or model name) of the encryption chip. Regarding the KEV7 API, the KEV API consists of the PKCS11 API (or the first interface unit) and the SPI API (or the second interface unit), and is called by the camera application site to encrypt compressed data. The PKSC11 API can implement the PKCS#11 standard, and the SPI API is an API that implements high-speed encrypted communication. In the KEV API, PKCS11 is the first API that is called directly from the camera application part. With a 16-byte command header in front of the compressed data, the encryption unit 210 performs SPI communication in order to use, for example, an encryption function of an encryption module. At this time, the PKCS11 API calls the SPI API and maintains high-speed encrypted communication with the cryptographic module. In addition, in the KEV API, the SPI API performs high-speed encryption communication, and is an API called from the PKCS11 API for SPI communication with the cryptographic module. SPI communication is performed through the SPI device driver of the Linux kernel, for example, in units of 16 bytes including the command header. The kernel is the heart of the operating system (OS) and a very important part that defines the OS. It distributes hardware resources to processes that need resources, and executes process control (task manager), memory control, and system calls required by programs to the operating system, and runs at the bottom of the operating system.

암호화부(210)는 가령 제어부에서 제공하는 압축 데이터를 암호화하며, 하드웨어 형태의 암호모듈과 이를 사용하기 위한 암호 API(KEV7 API)로 구성된다. 암호화부(210)는 가령 제어부와 연결되는 인터페이스부(혹은 포트, 단자 등)를 포함할 수 있다. 여기서, 암호 API는 가령 IP 카메라 모듈(200')로서 제어부에 구성되는 것이 바람직하다. 본 발명의 실시예에 따라 가령 제어부의 암호 API와 암호화부(210)의 암호모듈은 암호화장치라 명명될 수도 있다. 이때 암호 API는 API부 또는 인터페이스부라 명명될 수 있다. 암호화부(210)는 제어부와 가령 SPI 통신을 통해 압축 데이터를 수신하고, 또 수신한 압축 데이터를 암호화하여 암호 데이터를 제어부로 전송할 수 있다. SPI 통신은 마스터-슬래이브(Master-Slave) 방식으로 호스트에서 16 비트(혹은 바이트) 단위로 데이터를 디바이스 즉 암호모듈로 송신과 동시에 수신이 이루어지는 통신 방식이다.The encryption unit 210 encrypts compressed data provided by the control unit, for example, and includes an encryption module in the form of hardware and an encryption API (KEV7 API) for using the encryption module. The encryption unit 210 may include, for example, an interface unit (or port, terminal, etc.) connected to the control unit. Here, the cryptographic API is preferably configured in the control unit as, for example, an IP camera module 200'. According to an embodiment of the present invention, for example, the encryption API of the control unit and the encryption module of the encryption unit 210 may be referred to as encryption devices. In this case, the cryptographic API may be referred to as an API unit or an interface unit. The encryption unit 210 may receive compressed data through, for example, SPI communication with the control unit, encrypt the received compressed data, and transmit the encrypted data to the control unit. SPI communication is a master-slave method in which the host transmits data in units of 16 bits (or bytes) to a device, that is, an encryption module, and simultaneously receives data.

암호화부(210)의 암호모듈이 제공하는 암호화 기능에는 대칭키 암호 알고리즘인 국내 표준 알고리즘인 아리아(ARIA: Academy Research Institute Agency)가 사용될 수 있으며, 운영모드는 CFB-8 운영모드(Operation mode)가 적용될 수 있고, 키 길이는 256 비트(bit)가 사용될 수 있다. 대칭키 암호(Symmetric-key algorithm)는 암호화와 복호화에 동일한 암호키를 사용하는 알고리즘을 의미한다. 암호화하는 측과 복호화하는 측이 같은 비밀키(Secret key)를 공유해야 한다. 알려진 공개키 암호에 비해 처리속도가 빠르므로 많은 데이터를 신호히 처리해야 하는 통신에 바람직하다.For the encryption function provided by the encryption module of the encryption unit 210, Aria (Academy Research Institute Agency (ARIA)), which is a symmetric key encryption algorithm, can be used, and the operation mode is CFB-8 operation mode. It can be applied, and a key length of 256 bits can be used. Symmetric-key algorithm refers to an algorithm that uses the same encryption key for encryption and decryption. The encrypting side and the decrypting side must share the same secret key. Since the processing speed is faster than known public key cryptography, it is preferable for communication where a lot of data must be signally processed.

암호모듈 내 대칭키 암호 엔진으로 국내 표준 알고리즘인 아리아(ARIA)를 지원하고, DPA(Differential Poser Analysis) 방지 알고리즘을 지원한다. 여기서, 아리아(ARIA)는 학/연/관이 공동으로 개발한 128 비트 데이터 블록을 처리하는 암호 알고리즘으로 128/192/256 비트 암호키를 지원한다. 또한, 암호모듈은 모든 키 사이즈(Key size)에 대해 ECB(Electronic Code block), CBC(Cipher Block Chaining), CTR(Counter), CFB8/16/32/64/128(Cipher Feedback), OFB128(Output Feedback), GCTR(GCM: Galois/Counter Mode) 운영모드를 지원한다.As a symmetric key encryption engine in the cryptographic module, it supports Aria, a domestic standard algorithm, and a DPA (Differential Poser Analysis) prevention algorithm. Here, ARIA supports 128/192/256-bit encryption keys as an encryption algorithm that processes a 128-bit data block jointly developed by academia/research/government. In addition, the cryptographic module is the electronic code block (ECB), Cipher Block Chaining (CBC), CTR (Counter), CFB8/16/32/64/128 (Cipher Feedback), OFB128 (Output) for all key sizes. Feedback) and GCTR (GCM: Galois/Counter Mode) operation modes are supported.

암호화부(210) 즉 암호모듈은 제어부 또는 도 3의 IP 카메라 모듈(200'), 더 정확하게는 SPI API(부)와 SPI 통신에 의해 압축 데이터를 수신하고, 암호화된 압축 데이터 즉 암호 데이터를 전송한다. 데이터를 전송하는 쪽이 마스터(Master)가 되고, 데이터를 수신하는 쪽이 슬래이브(Slave)가 되어 압축 데이터를 수신하고 암호 데이터를 전송하는 것이다.The encryption unit 210, that is, the encryption module, receives the compressed data through SPI communication with the control unit or the IP camera module 200 ′ of FIG. 3, more precisely, the SPI API (unit), and transmits the encrypted compressed data, that is, the encrypted data. do. The side that transmits the data becomes the Master, and the side that receives the data becomes the Slave, receiving compressed data and transmitting the encrypted data.

도 4는 일반적인 암호화 통신 방식을 보여주고 있고, 도 5는 본 발명의 실시예에 따른 고속 암호화 통신 방식을 보여주고 있으며, 도 6은 80 바이트 데이터를 처리하기 위한 두개의 암호화 통신을 서로 비교하여 보여주고 있다. 4 shows a general encryption communication method, FIG. 5 shows a high-speed encryption communication method according to an embodiment of the present invention, and FIG. 6 shows a comparison of two encrypted communication for processing 80 byte data. Are giving.

도 4에서 볼 때, 일반 암호화 통신은 호스트의 SPI API에서 요청 명령을 모두 송신하고 암호모듈에서 요청 명령을 모두 수신한 후에 평문(Plain Text) 즉 암호화를 하지 않은 데이터를 모두 암호화하여 암호문(Cipher Text)을 생성한 후 응답 명령을 호스트로 송신한다. 호스트에서는 요청 블록을 모두 전송한 후에 암호모듈에서 처리가 끝날 때까지 더미(Dummy) 데이터를 전송하여 응답 블록의 헤더를 확인한다. 응답블록의 헤더를 수신하면 헤더에서 데이터의 길이를 확인하여 데이터의 길이만큼 데이터를 수신한다. 이의 과정은 도 4에 잘 보여지고 있다.As shown in Fig. 4, in general encrypted communication, after all request commands are transmitted from the host's SPI API and all request commands are received from the cryptographic module, plain text, that is, all unencrypted data is encrypted, and cipher text (Cipher Text) is performed. ) And send the response command to the host. After all the request blocks have been transmitted, the host checks the header of the response block by transmitting dummy data until the encryption module finishes processing. When the header of the response block is received, the length of the data is checked in the header and data is received as much as the length of the data. This process is well shown in FIG. 4.

반면, 도 5에서 볼 수 있는 바와 같이, 본 발명의 실시예에 따른 고속 암호화 통신은 호스트의 SPI API에서 요청 명령을 송신하면서 응답 명령을 수신하는 방식으로 이루어진다. 암호모듈에서는 요청 명령 헤더를 수신하고 첫번째 16바이트 데이터를 수신하면 첫번째 데이터를 암호화하고 두번째 데이터를 수신하면 두번째 데이터를 암호화하면서 응답 명령의 헤더를 호스트로 전송한다. 세번째 데이터를 수신하면 세번째 데이터를 암호화하면서 암호화된 첫번째 데이터를 호스트로 전송한다. 호스트 즉 SPI API(200')에서 마지막 두개의 암호화된 데이터를 수신하기 위해 더미 데이터를 암호 모듈(110')로 전송하여 암호 데이터를 수신한다. 구체적인 과정은 도 4에서 잘 보여주고 있다.On the other hand, as can be seen in FIG. 5, the high-speed encryption communication according to an embodiment of the present invention is performed in a manner of receiving a response command while transmitting a request command from the SPI API of the host. In the encryption module, the request command header is received. When the first 16 bytes of data are received, the first data is encrypted. When the second data is received, the second data is encrypted and the header of the response command is transmitted to the host. When the third data is received, the third data is encrypted and the first encrypted data is transmitted to the host. In order to receive the last two encrypted data from the host, that is, the SPI API 200', the dummy data is transmitted to the encryption module 110' to receive the encrypted data. The specific process is well shown in FIG. 4.

도 5의 경우를 다시 일반화해 보면, 본 발명의 실시예에 따른 암호모듈은 가령 압축 데이터를 N개의 블록으로 생성하여 (패킷) 암호화를 수행할 때, N번째 블록의 압축 데이터를 수신하면 기수신하여 암호화한 (N-2)번째 블록의 암호 데이터를 호스트로 전송한다는 것을 알 수 있다. 따라서, N번째 블록의 암호 데이터를 전송하기 위하여 암호모듈은 호스트로부터 더미 데이터를 수신하게 되며, 본 발명의 실시예에서는 이 더미 데이터의 경우에도 전체 생성된 N개의 블록 수를 암호화하기 위하여 항상 4개(즉, N-(N-4)개)의 더미 데이터를 사용한다는 것을 알 수 있다.Referring to the case of FIG. 5 again to generalize, the encryption module according to the embodiment of the present invention generates compressed data in N blocks and performs encryption (packet). Thus, it can be seen that the encrypted data of the (N-2)-th block is transmitted to the host. Therefore, in order to transmit the encryption data of the Nth block, the encryption module receives dummy data from the host. In the embodiment of the present invention, even in the case of this dummy data, in order to encrypt the total number of generated N blocks, always 4 It can be seen that (that is, N-(N-4)) of dummy data are used.

좀더 구체적으로 도 6을 참조하여 암호화 명령 처리에 대해 일반 암호화 통신과 고속 암호화 통신을 비교해 보면, 가령 80 바이트의 데이터를 암호화하기 위해서는 헤더와 5개의 데이터 블록으로 나누어서 암호모듈로 전송한다. 이때 본 발명의 실시예에 따른 고속 암호화 통신 방식은 8번의 통신으로 데이터의 암호화가 이루어지는 반면, 일반적인 암호화 통신 방식에서는 14번의 통신으로 암호화가 이루어지게 된다. 이에 근거해 볼 때 데이터의 크기가 크면 클수록 고속 암호화 통신의 성능은 일반 암호화 통신의 2배에 근접하는 성능을 보일 수가 있게 된다.In more detail, referring to FIG. 6, comparing general encryption communication and high-speed encryption communication for encryption command processing, for example, in order to encrypt 80 bytes of data, a header and five data blocks are divided and transmitted to an encryption module. At this time, in the high-speed encryption communication method according to an embodiment of the present invention, data is encrypted through eight communications, whereas in a general encryption communication scheme, encryption is performed through 14 communications. Based on this, as the size of data increases, the performance of high-speed encrypted communication can be close to twice that of general encrypted communication.

암호화부(210)는 암호칩(KEV7)의 형태로 구성될 수 있으며, 본 발명의 실시예에 따른 고속 SPI 암호통신 기반의 SPI API 정합을 수행하며, 이를 통해 호스트 즉 네트워크 카메라의 SPI API에서 요청 명령을 송신하면서 암호칩에서 암호화된 영상의 응답 명령을 동시에 수신할 수 있다. 다시 말해 암호칩에서는 요청 명령 헤더를 수신해서 가령 16 바이트씩 데이터를 계속해서 수신하고, 동시에 암호화가 수행된다. 암호화된 영상 데이터가 준비되면 SPI API 수신으로 전송한다.The encryption unit 210 may be configured in the form of an encryption chip (KEV7), and performs SPI API matching based on high-speed SPI encryption communication according to an embodiment of the present invention, through which the request from the SPI API of the host, that is, a network camera. While sending the command, it is possible to simultaneously receive the response command of the video encrypted by the encryption chip. In other words, the encryption chip receives the request command header, continuously receives data, for example, by 16 bytes, and encryption is performed at the same time. When the encrypted video data is prepared, it is transmitted by receiving the SPI API.

영상 처리부(200)를 구성하는 가령 저장부는 제어부의 제어하에 처리되는 정보나 데이터를 저장한다. 정보나 데이터를 임시 저장할 수 있다. 여기서, 정보는 단순한 요청이나 응답과 같은 제어명령을 의미한다면, 데이터는 영상을 구성하는 적(R), 녹(G), 청(B)의 화소 데이터를 의미할 수 있다. 다만, 위의 용어는 혼용되어 사용될 수 있으므로, 본 발명의 실시예에서는 용어의 개념에 특별히 한정하지는 않을 것이다. 저장부는 제어부의 제어하에 촬상부의 촬영영상을 임시 저장할 수 있으며, 압축과 암호화를 위하여 저장한 촬영영상을 출력할 수 있다.For example, a storage unit constituting the image processing unit 200 stores information or data processed under the control of the control unit. You can temporarily store information or data. Here, while the information refers to a control command such as a simple request or response, the data may refer to pixel data of red (R), green (G), and blue (B) constituting an image. However, since the above terms may be used interchangeably, the concept of terms will not be particularly limited in the embodiments of the present invention. The storage unit may temporarily store the photographed image of the imaging unit under the control of the controller, and may output the stored photographed image for compression and encryption.

지금까지 본 발명의 실시예에서는 IP 카메라와 같은 촬영장치를 예시함으로써 촬영영상을 암호화하는 것을 설명하였지만, 본 발명의 실시예는 카메라 등의 촬영장치뿐 아니라 영상 처리를 위하여 암호화가 필요하다면 그 이외에도 사물인터넷장치나 드론과 같은 다양한 장치에도 활용될 수 있을 것이다.Until now, in the embodiment of the present invention, encryption of a photographed image has been described by exemplifying a photographing device such as an IP camera, but in the embodiment of the present invention, if encryption is required for image processing as well as a photographing device such as a camera, It can be used for various devices such as internet devices and drones.

도 7 및 도 8은 도 3의 IP 카메라 모듈과 암호 모듈의 통신 과정을 설명하기 위한 도면이다.7 and 8 are diagrams for explaining a communication process between the IP camera module and the encryption module of FIG. 3.

도 3에서의 KEV7 API는 암호모듈의 암호화 기능을 사용하면서 고속 암호화 통신을 구현하는 방법을 제공하기 위해 통신 API(부)와 운용 API(부)를 포함한다. 이는 통신부(혹은 인터페이스부) 및 운용부라 각각 명명될 수도 있을 것이다.The KEV7 API in FIG. 3 includes a communication API (unit) and an operation API (unit) to provide a method of implementing high-speed encryption communication while using the encryption function of the encryption module. This may be referred to as a communication unit (or interface unit) and an operation unit, respectively.

도 3의 KEV7 API는 도 6에서 같이 통신 API를 통해 암호모듈에 대해 통신 설정을 수행하고(S700), 이후 운용 API를 통해 마스터 키(Master Key)(혹은 대칭키)에 대한 키 설정, 비밀키 생성 및 키 공유를 수행하여 고속 암호화 통신을 준비한다(S710). 운용 API를 통해 고속 암호화 통신을 수행할 수 있고, 암호화 종료시 통신 API를 통해 통신 해제를 수행한다(S720).The KEV7 API of FIG. 3 performs communication setting for the cryptographic module through the communication API as shown in FIG. 6 (S700), and then sets the key for the master key (or symmetric key) through the operation API, and the secret key. High-speed encrypted communication is prepared by generating and key sharing (S710). High-speed encryption communication can be performed through the operation API, and communication is canceled through the communication API when encryption is terminated (S720).

좀더 구체적으로, 통신 설정 단계(S700)는 초기화 단계(KEV7_Initialize)와 로그인 단계(KEV7_Login)를 포함할 수 있다. 초기화 단계에서는 API를 초기화하고, SPI 인터페이스로 KEV7과 연결하는 과정을 수행하고, 로그인 단계에서는 KEV7의 세션 및 권한 획득을 위해 로그인을 수행하며, 암호모듈의 기능을 수행하기에 앞서 로그인하는 함수로서, PIN을 입력하는 과정(CKR_OK, hSession)을 포함할 수 있다.More specifically, the communication setting step S700 may include an initialization step (KEV7_Initialize) and a login step (KEV7_Login). In the initialization stage, the API is initialized, and the process of connecting to KEV7 through the SPI interface is performed, and in the login stage, the login is performed to acquire the session and authority of the KEV7, and before performing the function of the cryptographic module, a function to log in. A process of entering a PIN (CKR_OK, hSession) may be included.

반면, 통신 해제 단계(S720)는 로그아웃 단계(KEV7_Logout)와 종료 단계(KEV7_Finalize)를 포함할 수 있다. 로그아웃 단계에서는 KEV7의 세션 및 권한 해제를 위해 로그아웃을 수행하고, 로그인된 세션을 로그아웃하고 세션을 종료하는 함수로 세션 종료시 암호모듈 내부에서 사용되었던 자원을 해제하는 동작을 수행할 수 있다. 또한, 종료 단계에서는 API를 종료하고 SPI로 연결된 통신을 종료한다.On the other hand, the communication release step S720 may include a logout step (KEV7_Logout) and a termination step (KEV7_Finalize). In the logout step, a logout is performed to release the session and authority of the KEV7, logout of the logged-in session, and termination of the session. When the session is terminated, an operation of releasing the resources used inside the cryptographic module can be performed. Also, in the termination step, the API is terminated and the communication connected via SPI is terminated.

도 3의 KEV7 API는 운용 API를 통해 도 8에서와 같이 IP 카메라 모듈(200')과 암호 모듈(210')간에 고속 암호화 통신시 운용상에 필요한 보안 기능을 제공한다. IP 카메라 모듈(200')과 암호 모듈(210')이 연결된 후 인증 과정을 거친 후 운용 API를 사용한다. 기기에 필요한 상호 인증을 위하여 키 생성 및 키 교환 방식과 키에 대한 전자서명으로 기기간 가령 IP 카메라 모듈(200')과 암호 모듈(210')간에 필요한 상호 인증을 수행한다. 이의 과정에서 가령 난수 생성기(TRNG)에서 난수를 생성하고 생성된 난수를 이용해서 ECDH(Elliptic Curve Diffie-Hellman) 방식으로 키를 유도하는 것이다.The KEV7 API of FIG. 3 provides a security function required for operation during high-speed encrypted communication between the IP camera module 200' and the encryption module 210' as shown in FIG. 8 through an operation API. After the IP camera module 200 ′ and the encryption module 210 ′ are connected, the operation API is used after an authentication process is performed. For mutual authentication required for devices, a key generation and key exchange method and a necessary mutual authentication between devices, for example, between the IP camera module 200 ′ and the encryption module 210 ′, are performed using an electronic signature for the key. In this process, for example, a random number generator (TRNG) generates a random number and uses the generated random number to derive a key using the ECDH (Elliptic Curve Diffie-Hellman) method.

구체적으로 운용 API의 동작은 도 8에서와 같이, ECDH 키 설정 동작(KEV7_DeriveKey)(S811), 난수 생성 동작(KEV7_GenerateRandom)(S813), 키(Key) 암호화 동작(KEV7_EncryptData)(S815), 키 복호화 동작(KEV7_DecryptData)(S817) 및 패킷 암호화 동작(S819)의 일부 또는 전부를 포함할 수 있다. Specifically, the operation of the operation API is an ECDH key setting operation (KEV7_DeriveKey) (S811), a random number generation operation (KEV7_GenerateRandom) (S813), a key encryption operation (KEV7_EncryptData) (S815), as in FIG. (KEV7_DecryptData) (S817) and a part or all of the packet encryption operation (S819) may be included.

키 설정 동작(S811)에서는 개인키 값을 난수(Random number)로 생성하여 공개키를 만들고(예: 공개키는 점 H=dG에 의해 생성되며, 여기서 d는 개인키, G는 하위 그룹의 기준점 혹은 동일한 유한한 점에서 동일한 타원 곡선상의 동일한 기준점), 상대방의 공개키와 개인키로 가령 연산하여 마스터 키를 만든다(예: 대칭키 S=dAHB, 여기서 dA는 자신의 개인키이고 HB는 상대의 공개키). ECDH를 이용하여 키를 교환하는 함수로 상대방의 공개키를 입력하면 암호모듈 내부에서 ECC(Elliptic Curve Cryptography) 공개키 쌍을 생성하고 공개키와 마스터 키 핸들(handle)을 출력한다. 자신의 공개키 값은 상대방에게 전달한다. 또한, 마스터 키로 패킷(Packet) 암호용 비밀키를 암호화하여 키 공유를 수행한다. 여기서, 키 공유를 위한 암호 패킷의 비밀키는 패킷 암호를 위해 난수로 생성하는 패킷 암호용 비밀키를 마스터 키로 암호화하여 생성한다.In the key setting operation (S811), a private key value is generated as a random number to create a public key (e.g., the public key is generated by the point H=dG, where d is the private key, and G is the reference point of the subgroup. Or the same reference point on the same elliptic curve at the same finite point), for example, by calculating with the other's public key and private key to create a master key (e.g., symmetric key S=dAHB, where dA is your own private key and HB is your partner's public key) key). It is a function that exchanges keys using ECDH. When the other party's public key is input, an ECC (Elliptic Curve Cryptography) public key pair is generated inside the cryptographic module, and the public key and master key handle are output. Passes the value of one's public key to the other party. In addition, key sharing is performed by encrypting a secret key for packet encryption with a master key. Here, the secret key of the encryption packet for key sharing is generated by encrypting the packet encryption secret key generated by a random number for packet encryption with the master key.

난수 생성 동작(S813)에서는 패킷 암호용 비밀키를 난수로 생성한다. 또한 해쉬(Hash) DRBG 알고리즘을 이용하여 난수를 생성하는 함수로 난수의 길이를 입력하면 길이만큼 난수를 생성한다.In the random number generation operation (S813), a secret key for packet encryption is generated as a random number. Also, as a function that generates random numbers using the Hash DRBG algorithm, if the length of the random number is input, it generates a random number as much as the length.

키 암호화 동작(S815)에서는 마스터 키로 패킷 암호용 비밀키를 암호화한다.In the key encryption operation (S815), the secret key for packet encryption is encrypted with the master key.

키 복호화 동작(S717)에서는 마스터 키로 패킷 암호용 비밀키를 복호화한다.In the key decryption operation (S717), the private key for packet encryption is decrypted using the master key.

패킷 암호화 동작(S819)에서는 패킷 암호화 (이)전단계(KEV7_PreEncryptPacket), 암호화 단계(KEV7_EncryptPacket) 및 암호화 (이)후단계(KEV7_PostEncryptPacket)를 포함할 수 있다. 전단계에서는 고속 암호화 통신에 사용되는 패킷을 암호화하기 전에 비밀키 및 초기벡터를 설정한다. 암호화 단계에서는 고속 암호화 통신에 사용되는 패킷을 암호화한다. 이때 설정된 비밀키 및 초기벡터는 고속 암호화 통신시 변경되지 않는다. 후단계에서는 고속 암호화 통신을 종료할 경우 호출되고, 설정된 비밀키 및 초기벡터를 제거한다.The packet encryption operation (S819) may include a packet encryption (2) pre-step (KEV7_PreEncryptPacket), an encryption step (KEV7_EncryptPacket), and an encryption (2) post-step (KEV7_PostEncryptPacket). In the previous step, a secret key and an initial vector are set before the packet used for high-speed encrypted communication is encrypted. In the encryption step, packets used for high-speed encrypted communication are encrypted. At this time, the set secret key and initial vector are not changed during high-speed encrypted communication. In a later step, it is called when the high-speed encrypted communication is terminated, and the set secret key and initial vector are removed.

도 9는 본 발명의 실시예에 따른 암호화 장치의 구동 과정의 흐름도이다.9 is a flowchart of a driving process of an encryption device according to an embodiment of the present invention.

설명의 편의상 도 9를 도 1과 함께 참조하면, 본 발명의 실시예에 따른 암호화 장치(100)는 마스터 및 슬래이브 동작이 가능한 SPI 통신에 의해 주변장치(예: 영상처리부 또는 영상처리부의 제어부나 인터페이스부 등)로부터 압축 데이터를 수신하고, 수신한 압축 데이터를 암호화한 암호 데이터를 주변장치로 전송한다(S900).For convenience of explanation, referring to FIG. 9 together with FIG. 1, the encryption device 100 according to an embodiment of the present invention uses a peripheral device (eg, an image processing unit or a control unit of an image processing unit) through SPI communication capable of master and slave operation. The compressed data is received from the interface unit, etc.), and encrypted data obtained by encrypting the received compressed data is transmitted to the peripheral device (S900).

또한, 암호화 장치(100)는 수신한 압축 데이터를 대칭키 암호 방식으로 암호화하여 암호 데이터를 생성하며, 난수로 생성되는 패킷 암호용 비밀키를 대칭키로 암호화하여 생성하는 비밀키에 대하여 복호화를 위한 비밀키 공유를 수행한다(S910).In addition, the encryption device 100 generates encrypted data by encrypting the received compressed data using a symmetric key encryption method, and the secret key for decryption is generated by encrypting the secret key for packet encryption generated as a random number with a symmetric key. Key sharing is performed (S910).

여기서, 대칭키는 마스터키로 명명될 수도 있으며, 앞서 언급한 대로 자신의 개인키(예: 암호화부(210)의 개인키)와 상대(예: 주변장치)의 공개키의 연산에 의해 형성된다. 여기서, 개인키는 난수 생성기에 의해 생성되는 난수가 사용될 수 있다. 물론 패킷 암호용 비밀키의 경우에도 난수 생성을 위해 난수 생성기가 사용될 수 있다.Here, the symmetric key may be referred to as a master key, and as mentioned above, it is formed by the operation of its own private key (eg, the private key of the encryption unit 210) and the other (eg, the peripheral device)'s public key. Here, as the private key, a random number generated by a random number generator may be used. Of course, even in the case of a private key for packet encryption, a random number generator can be used to generate random numbers.

상기한 내용 이외에도 본 발명의 실시예에 따른 암호화 장치(100)는 다양한 동작을 수행할 수 있으며, 기타 자세한 내용은 앞서 충분히 설명하였으므로 그 내용들로 대신하고자 한다.In addition to the above, the encryption device 100 according to an embodiment of the present invention can perform various operations, and other details have been sufficiently described above, and thus, the contents will be substituted.

도 10은 도 3의 SPI 처리 모듈의 구동 과정을 나타내는 흐름도로서, 도 3의 호스트도 도 10의 동작을 수행할 수 있다.10 is a flowchart illustrating a driving process of the SPI processing module of FIG. 3, and the host of FIG. 3 may also perform the operation of FIG. 10.

설명의 편의상 도 10을 도 3과 함께 참조하면, SPI 처리 모듈은 본 발명의 실시예에 따라 SPI 처리부라 명명될 수 있으며, 도 3의 IP 카메라 모듈(부)에 포함된다고 볼 수 있다. SPI API(예: KEV7 API)는 도 10에서와 같이 PKCS11 API에서 만들어진 평문 데이터(Tx Msg-Plan Text)를 16 바이트 단위로 암호모듈로 전송하면서 암호데이터(Rx Msg-Cipher Text)를 수신한다.For convenience of explanation, referring to FIG. 10 together with FIG. 3, the SPI processing module may be referred to as an SPI processing unit according to an embodiment of the present invention, and may be considered to be included in the IP camera module (unit) of FIG. 3. As shown in FIG.

SPI API에서는 16 바이트의 헤더(REQ_HDR)를 전송하고 더미를 수신한다(SPI_Write)(S1000). 수신한 데이터가 RES_HDR일 때까지 16바이트 단위로 PT를 전송한다(SPI_Write_Read)(S1010). RES_HDR을 수신하면 PT를 송신하면서 CT를 수신한다(SPI_Write_Read)(S1030). PT를 모두 송신하면 더미 데이터를 송신하면서 CT를 수신한다(SPI_Read)(S1040~S1060).In the SPI API, a 16-byte header (REQ_HDR) is transmitted and a dummy is received (SPI_Write) (S1000). PT is transmitted in units of 16 bytes until the received data is RES_HDR (SPI_Write_Read) (S1010). Upon receiving the RES_HDR, the CT is transmitted while transmitting the PT (SPI_Write_Read) (S1030). When all the PTs are transmitted, the CT is received while transmitting dummy data (SPI_Read) (S1040 to S1060).

도 11은 도 3의 암호화 모듈의 구동 과정을 나타내는 흐름도로서, 도 2의 암호화부(210)도 도 11과 같은 동작을 수행할 수 있다.11 is a flowchart illustrating a driving process of the encryption module of FIG. 3, and the encryption unit 210 of FIG. 2 may also perform the same operation as that of FIG. 11.

설명의 편의상 도 11을 도 3과 함께 참조하면, 도 3의 암호모듈은 SPI 매니저(SPI Procedure Manager)를 포함할 수 있으며, 암호모듈의 SPI 매니저는 호스트로부터 평문 데이터를 수신하고 수신된 평문 데이터를 암호화하여 호스트로 전송한다. 여기서, 매니저는 S/W 모듈 내에서 제어 또는 관리 등의 동작을 수행한다.For convenience of explanation, referring to FIG. 11 together with FIG. 3, the encryption module of FIG. 3 may include an SPI procedure manager, and the SPI manager of the encryption module receives plaintext data from the host and receives the received plaintext data. Encrypted and transmitted to the host. Here, the manager performs an operation such as control or management within the S/W module.

암호모듈은 ProcCmdHeadTrans 루틴(routine)에서 16 바이트의 헤더를 수신한다(S1100 ~ S1105). 헤더의 명령코드가 Encrypt/Decrypt 명령이면 ProcDataPhaseOutIn 루틴으로 상태를 변경하고 더미 데이터를 호스트로 송신한다(S1110 ~ S1119). 헤더의 데이터 크기만큼 데이터를 수신하면 ProcDataPhaseDone 루틴으로 상태를 변경하고 더미 데이터를 수신하면서 암호 데이터를 호스트로 전송한다(S1120 ~ S1126).The cryptographic module receives a 16-byte header in the ProcCmdHeadTrans routine (S1100 to S1105). If the command code of the header is an Encrypt/Decrypt command, the state is changed to the ProcDataPhaseOutIn routine and dummy data is transmitted to the host (S1110 to S1119). When data is received as much as the data size of the header, the state is changed to the ProcDataPhaseDone routine and encrypted data is transmitted to the host while receiving dummy data (S1120 to S1126).

여기서, 루틴이란 컴퓨터 프로그램에서 어떤 일을 담당하는 하나의 정리된 일을 의미하며, 또 프로그램의 일부를 표시하는 경우도 있고 전부를 표시하는 경우도 있다. 프로그램은 크고 작은 여러가지 루틴을 조합시킴으로써 성립된다. 루틴은 메인 루틴과 서브 루틴으로 구분할 수 있다. 메인 루틴이란 프로그램의 주요한 부분이며, 전체의 개략적인 동작 절차를 표시하도록 만들어진다. 이 대강의 정도는 서브 루틴의 작업 정도에 의해 정해진다. 결국, 메인 루틴에서는 몇 가지의 서브 루틴을 호출하고, 서브 루틴에 의해서 프로그램의 세세한 실행을 행한다. 서브 루틴이란 프로그램의 일부를 담당하는 부분 프로그램이며, 메인 프로그램으로부터 호출되어 실행된다. 프로그램 중에서 사용 빈도가 높은 부분은 공통화하여서 브루틴으로 함으로써 메모리의 사용 효율을 상승시키며 또 프로그래밍 효율도 상승시킨다. 그리고 흔히 사용하는 루틴을 루틴 라이브러리로서의 파일형으로 해두면 프로그래밍할 때 아주 편리하다. 또한 서브 루틴에는 그 역할과 목적에 맞는 이름을 붙인다. 이로써 프로그램을 읽을 때 이해가 쉽고 읽기 쉬운 프로그램이 된다. 서브 루틴과 메인 루틴은 서로 입력 데이터의 계산 결과를 파라미터로서 주고 받는다. 그 경우 파라미터는 변수형으로 주어지며 그 파라미터에 데이터값을 대입하여 서브 루틴을 호출함으로써 마치 내장 함수인 것처럼 실행할 수 있다.Here, a routine means a single, organized task that is in charge of a certain task in a computer program, and in some cases, a part of the program is displayed, and in some cases, all of the program is displayed. A program is established by combining various routines large and small. Routines can be divided into main routines and subroutines. The main routine is the main part of the program and is made to represent the overall schematic operating procedure. The degree of this approximation is determined by the degree of work of the subroutine. After all, in the main routine, several subroutines are called, and detailed execution of the program is performed by the subroutine. The subroutine is a partial program in charge of a part of the program, and is called and executed from the main program. The part of the program that is frequently used is common and used as brutine, thereby increasing the use efficiency of memory and also increasing the programming efficiency. And it is very convenient when programming, if you make commonly used routines in a file type as a routine library. Also, give the subroutine a name that suits its role and purpose. This makes the program easier to understand and easier to read when reading the program. The subroutine and the main routine exchange input data calculation results as parameters. In that case, the parameter is given as a variable type, and it can be executed as if it were a built-in function by calling a subroutine by assigning a data value to the parameter.

한편, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합하여 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시 예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 비일시적 저장매체(non-transitory computer readable media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시 예를 구현할 수 있다.On the other hand, even if all components constituting an embodiment of the present invention are described as being combined into one or operating in combination, the present invention is not necessarily limited to this embodiment. That is, within the scope of the object of the present invention, all the constituent elements may be selectively combined and operated in one or more. In addition, although all the components may be implemented as one independent hardware, a program module that performs some or all functions combined in one or a plurality of hardware by selectively combining some or all of the components. It may be implemented as a computer program having Codes and code segments constituting the computer program may be easily inferred by those skilled in the art of the present invention. Such a computer program is stored in a non-transitory computer readable media that can be read by a computer and is read and executed by a computer, thereby implementing an embodiment of the present invention.

여기서 비일시적 판독 가능 기록매체란, 레지스터, 캐시(cache), 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라, 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 구체적으로, 상술한 프로그램들은 CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리 카드, ROM 등과 같은 비일시적 판독가능 기록매체에 저장되어 제공될 수 있다.Here, the non-transitory readable recording medium is not a medium that stores data for a short moment, such as a register, cache, memory, etc., but a medium that stores data semi-permanently and can be read by a device. . Specifically, the above-described programs may be provided by being stored in a non-transitory readable recording medium such as a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, or the like.

이상에서는 본 발명의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어서는 안 될 것이다.In the above, preferred embodiments of the present invention have been illustrated and described, but the present invention is not limited to the specific embodiments described above, and is generally used in the technical field to which the present invention pertains without departing from the gist of the present invention claimed in the claims. Of course, various modifications may be made by those skilled in the art, and these modifications should not be understood individually from the technical idea or perspective of the present invention.

100: 암호화 장치 100': IP 카메라
101: 암호칩(KEV7) 110: 사용자 단말장치
120: 통신망 130: 영상서비스장치
200: 영상 처리부 200': IP 카메라 모듈
210: 암호화부 210': 암호모듈
100: encryption device 100': IP camera
101: encryption chip (KEV7) 110: user terminal device
120: communication network 130: video service device
200: image processing unit 200': IP camera module
210: encryption unit 210': encryption module

Claims (10)

마스터(master) 및 슬래이브(slave) 동작이 가능한 SPI(Serial Peripheral Interface) 통신에 의해 주변장치로부터 압축 데이터를 수신하고, 상기 수신한 압축 데이터를 암호화한 암호 데이터를 상기 주변장치로 전송하는 인터페이스부; 및
상기 수신한 압축 데이터를 대칭키 암호 방식으로 암호화하여 암호 데이터를 생성하며, 패킷 암호를 위해 난수로 생성되는 패킷 암호용 비밀키를 난수로 생성되는 개인키 값과 상기 주변장치의 공개키값을 연산하여 생성하는 대칭키로 암호화하여 생성하는 암호 패킷의 비밀키에 대하여 복호화를 위해 상기 암호 패킷의 비밀키의 공유를 수행하는 암호화부;를 포함하되,
상기 암호화부는, 상기 주변장치로부터 임의 블록의 압축 데이터가 수신되면, 상기 임의 블록의 압축 데이터를 암호화하면서 상기 임의 블록에 앞서 기암호화한 블록의 암호 데이터를 상기 주변장치로 제공하는 것을 특징으로 하는 고속 암호통신을 위한 암호화 장치.
An interface unit that receives compressed data from a peripheral device through SPI (Serial Peripheral Interface) communication capable of master and slave operation, and transmits encrypted data by encrypting the received compressed data to the peripheral device. ; And
The received compressed data is encrypted with a symmetric key encryption method to generate encrypted data, and a private key value generated as a random number and a public key value of the peripheral device are calculated using a packet encryption secret key generated as a random number for packet encryption. Including; an encryption unit for sharing the secret key of the encrypted packet for decryption with respect to the secret key of the encrypted packet generated by encrypting with the generated symmetric key;
The encryption unit, when the compressed data of the arbitrary block is received from the peripheral device, encrypts the compressed data of the arbitrary block and provides the encrypted data of the pre-encrypted block to the peripheral device. Encryption device for cryptographic communication.
삭제delete 제1항에 있어서,
상기 암호화부는, 대칭키 암호 엔진으로서 국내표준 알고리즘인 아리아(ARIA) 또는 국제표준 알고리즘인 AES(Advanced Encryption Standard)를 실행하며, 256 비트(bit)의 키 길이를 사용하는 것을 특징으로 하는 고속 암호통신을 위한 암호화 장치.
The method of claim 1,
The encryption unit is a high-speed encryption communication, characterized in that the symmetric key encryption engine, Aria (ARIA) or the international standard algorithm AES (Advanced Encryption Standard) is executed, and a key length of 256 bits is used. Device for encryption.
삭제delete 제1항에 있어서,
상기 암호화부는, 복수 개의 상기 압축 데이터를 암호화하기 위하여 더미(dummy) 데이터를 이용하며, 항상 고정된 수의 더미 데이터를 이용하는 것을 특징으로 하는 고속 암호통신을 위한 암호화 장치.
The method of claim 1,
Wherein the encryption unit uses dummy data to encrypt a plurality of the compressed data, and always uses a fixed number of dummy data.
인터페이부가, 마스터 및 슬래이브 동작이 가능한 SPI 통신에 의해 주변장치로부터 압축 데이터를 수신하고, 상기 수신한 압축 데이터를 암호화한 암호 데이터를 상기 주변장치로 전송하는 단계; 및
암호화부가, 상기 수신한 압축 데이터를 대칭키 암호 방식으로 암호화하여 암호 데이터를 생성하며, 패킷 암호를 위해 난수로 생성되는 패킷 암호용 비밀키를 난수로 생성되는 개인키 값과 상기 주변장치의 공개키 값을 연산하여 생성하는 대칭키로 암호화하여 생성하는 암호 패킷의 비밀키에 대하여 복호화를 위해 상기 암호 패킷의 비밀키의 공유를 수행하는 단계;를 포함하되,
상기 암호 데이터를 생성하는 단계는,
상기 주변장치로부터 임의 블록의 압축 데이터가 수신되면, 상기 임의 블록의 압축 데이터를 암호화하면서 상기 임의 블록에 앞서 기암호화한 블록의 암호 데이터를 상기 주변장치로 제공하는 것을 특징으로 하는 고속 암호통신을 위한 암호화 장치의 구동방법.
Receiving, by an interface unit, compressed data from a peripheral device through SPI communication capable of a master and a slave operation, and transmitting encrypted data obtained by encrypting the received compressed data to the peripheral device; And
The encryption unit generates encrypted data by encrypting the received compressed data using a symmetric key encryption method, and a private key value generated as a random number and a public key of the peripheral device using a secret key for packet encryption that is generated as a random number for packet encryption. Including, for decrypting the secret key of the encrypted packet generated by encrypting with a symmetric key generated by calculating a value, sharing the secret key of the encrypted packet;
The step of generating the encryption data,
When the compressed data of an arbitrary block is received from the peripheral device, the encrypted data of the block encrypted before the arbitrary block is provided to the peripheral device while encrypting the compressed data of the arbitrary block. How to drive an encryption device.
삭제delete 제6항에 있어서,
상기 암호 데이터를 생성하는 단계는,
대칭키 암호 엔진으로서 국내표준 알고리즘인 아리아(ARIA) 또는 국제표준 알고리즘인 AES를 실행하며, 256 비트(bit)의 키 길이를 사용하는 것을 특징으로 하는 고속 암호통신을 위한 암호화 장치의 구동방법.
The method of claim 6,
The step of generating the encryption data,
A method of driving an encryption device for high-speed cryptographic communication, characterized in that it executes AIA, which is a national standard algorithm or AES, which is an international standard algorithm as a symmetric key encryption engine, and uses a key length of 256 bits.
삭제delete 제6항에 있어서,
상기 암호 데이터를 생성하는 단계는,
복수 개의 상기 압축 데이터를 암호화하기 위하여 더미 데이터를 이용하며, 항상 고정된 수의 더미 데이터를 이용하는 것을 특징으로 하는 고속 암호통신을 위한 암호화 장치의 구동방법.
The method of claim 6,
The step of generating the encryption data,
A method of driving an encryption apparatus for high-speed encryption communication, characterized in that dummy data is used to encrypt a plurality of the compressed data, and a fixed number of dummy data is always used.
KR1020190116919A 2019-09-23 2019-09-23 Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof KR102241390B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190116919A KR102241390B1 (en) 2019-09-23 2019-09-23 Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190116919A KR102241390B1 (en) 2019-09-23 2019-09-23 Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof

Publications (2)

Publication Number Publication Date
KR20210034937A KR20210034937A (en) 2021-03-31
KR102241390B1 true KR102241390B1 (en) 2021-04-16

Family

ID=75238079

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190116919A KR102241390B1 (en) 2019-09-23 2019-09-23 Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof

Country Status (1)

Country Link
KR (1) KR102241390B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102372844B1 (en) 2021-04-19 2022-03-10 주식회사그린존시큐리티 Apparatus and method for one-way encryption
KR102372843B1 (en) 2021-04-19 2022-03-10 주식회사그린존시큐리티 Device and method for encrypting data
KR102655473B1 (en) * 2022-11-17 2024-05-09 (주)아이앤씨테크놀로지 System For Security Debugging Using Symmetric Key Encryption Algorithm And Method for Security Debugging Using The Same

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100835372B1 (en) 2006-02-06 2008-06-04 주식회사 우주아이티 Apparatus and method for providing an image photographed by network cameras
KR20060033768A (en) 2006-03-31 2006-04-19 비앤비쏠루션주식회사 Apparatus and control method for encryption and decryption in camera
KR20140127413A (en) * 2013-04-24 2014-11-04 (주)에이티솔루션즈 A method for information sharing operating system in medical information systems using smart card authentication and an apparatus using it
KR20180065183A (en) 2016-12-07 2018-06-18 (주)파웰이엔지 Embedded module for secure CCTV camera image encryption
KR20190049133A (en) * 2017-11-01 2019-05-09 경희대학교 산학협력단 Method and system for secure shared key exchange
KR101930950B1 (en) 2018-08-27 2018-12-20 주식회사 세오 IP camera real time encryption system based on network switch
KR102002523B1 (en) 2019-05-16 2019-07-22 주식회사 세오 Video surveillance system with real time CCTV video encryption method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Alfred J. Menezes 외 2명, Handbook of Applied Cryptography, CRC Press (1996.)*

Also Published As

Publication number Publication date
KR20210034937A (en) 2021-03-31

Similar Documents

Publication Publication Date Title
KR102241390B1 (en) Encryption Device for Cryptographic Communication of High Speed and Driving Method Thereof
US11917054B2 (en) Network key processing method and system and related device
CN107925577B (en) Method and computer readable medium for encryption key generation and management
US20170359717A1 (en) Session Protocol for Backward Security Between Paired Devices
US10817590B1 (en) Method and apparatus for creating and using quantum resistant keys
CA3178204A1 (en) Secure messaging between cryptographic hardware modules
CN112104454B (en) Data secure transmission method and system
CN112003881B (en) Safety cloud mobile phone system based on private cloud
EP3293933A1 (en) Communication content protection
EP3691257A1 (en) Internet protocol camera security system allowing secure encryption information to be transmitted
WO2019019853A1 (en) Data processing method, terminal device, and network device
US20230208615A1 (en) Online-Streamer Image Model File Transmission in Co-Hosting During Livestreaming
Rondon et al. HDMI-walk: Attacking HDMI distribution networks via consumer electronic control protocol
KR102241389B1 (en) Encryption Device for Cryptographic Authentication of High Speed and Driving Method Thereof
CN111277605B (en) Data sharing method and device, computer equipment and storage medium
CN104284237A (en) Video transmission method and system
US20230052917A1 (en) Pairing method applied to short-range communication system and wireless device
TW202123051A (en) Security authentication method, apparatus, and electronic device
KR101311310B1 (en) Encryption system and method thereof
CN114339282A (en) Method and device for transmitting anchor image picture in live broadcast interaction
EP3598689B1 (en) Managing central secret keys of a plurality of user devices associated with a single public key
CN110719309B (en) Virtual desktop connection method, proxy device, system, equipment and storage medium
CN111797417A (en) File uploading method and device, storage medium and electronic device
JP2006332903A (en) Key acquisition apparatus, key providing apparatus, key exchange system, and key exchange method
Liu et al. Security analysis of camera file transfer over Wi-Fi

Legal Events

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