KR20160038935A - Secure communication apparatus and method of distribute network protocol message - Google Patents

Secure communication apparatus and method of distribute network protocol message Download PDF

Info

Publication number
KR20160038935A
KR20160038935A KR1020140130871A KR20140130871A KR20160038935A KR 20160038935 A KR20160038935 A KR 20160038935A KR 1020140130871 A KR1020140130871 A KR 1020140130871A KR 20140130871 A KR20140130871 A KR 20140130871A KR 20160038935 A KR20160038935 A KR 20160038935A
Authority
KR
South Korea
Prior art keywords
block
dnp
message
data
type
Prior art date
Application number
KR1020140130871A
Other languages
Korean (ko)
Other versions
KR101691201B1 (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 KR1020140130871A priority Critical patent/KR101691201B1/en
Publication of KR20160038935A publication Critical patent/KR20160038935A/en
Application granted granted Critical
Publication of KR101691201B1 publication Critical patent/KR101691201B1/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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy

Abstract

The present invention relates to a secure communication device for distributed network protocol (DNP) messages. The secure communication device includes: a serial interface transmitting and receiving the DNP messages; a block analysis unit which separates the DNP messages transmitted and received through the serial interface into first blocks, intermediate blocks, and last blocks and manages and analyzes each of the blocks; and a security module unit which provides an encryption library to encrypt the DNP blocks generated by the block analysis unit and manages security keys and policies; and a security processing unit which uses the encryption library delivered from the security module unit to encrypt the DNP blocks and execute the authentication process.

Description

DNP 메시지의 보안통신장치 및 방법{SECURE COMMUNICATION APPARATUS AND METHOD OF DISTRIBUTE NETWORK PROTOCOL MESSAGE}Technical Field [0001] The present invention relates to a secure communication apparatus and method for a DNP message,

본 발명은 DNP 메시지의 보안통신장치 및 방법에 관한 것으로서, 보다 상세하게는 마스터(Master) 또는 아웃스테이션(Outstation)과 송수신하는 DNP(Distribute Network Protocol) 메시지를 다수의 데이터 블록으로 나누어 보안기능을 수행하는 DNP 메시지의 보안통신장치 및 방법에 관한 것이다.The present invention relates to a security communication apparatus and method for a DNP message, and more particularly, to a security communication apparatus and method for a DNP message by dividing a DNP (Distribute Network Protocol) message transmitted / received with a master or an outstation into a plurality of data blocks To a secure communication device and method of a DNP message.

폐쇄망인 제어시스템이 보안상 안전하다는 가정하에 개발된 제어시스템 통신 프로토콜인 DNP(Distribute Network Protocol)는 보안상 취약하여 제어명령을 보호하기 위한 보안프로토콜 및 보안통신장치의 개발이 활발히 진행되고 있다. 제어시스템 국제표준 통신 프로토콜인 IEEE 1815에서는 DNP 기반의 제어명령을 보호하기 위해 기존의 DNP 응용계층만 변경하여 메시지 인증 기능을 제공하는 Secure Authentication 메커니즘을 추가하였으나, 상기한 표준을 운영중인 제어시스템에 적용하기에는 어려움이 있다. 특히 기 구축된 제어시스템에 보안기능을 추가하기 위해서는 기존 시스템 전체를 보안기능이 탑재된 새로운 시스템으로 교체해야 하기 때문에 보안을 위해 많은 구축비용이 필요하고 시스템 교체에 따른 전력서비스 공급 중단 문제 등의 어려움이 있다.The DNP (Distribute Network Protocol), which is a control system communication protocol developed under the assumption that the control system is a security closed system, is vulnerable to security, and a security protocol and a security communication device for protecting control commands are being actively developed. Control System IEEE 1815, an international standard communication protocol, added a Secure Authentication mechanism to protect the DNP-based control command by changing only the existing DNP application layer, but it applies to the control system that operates the above standard There are difficulties in doing so. In particular, in order to add security functions to existing control systems, it is necessary to replace the entire existing system with a new system equipped with security functions. Therefore, a lot of construction costs are required for security, and difficulties such as interruption of power service supply due to system replacement .

일반적인 제어시스템은 원격지 장치를 중앙 집중식으로 감시 및 제어하기 위한 시스템으로, 원격지에 위치한 설비의 감시 및 운전을 담당하는 아웃스테이션(원격소 장치), 아날로그 또는 디지털 신호를 사용하여 원격장치 상태정보를 수집하여 원격소 장치를 원격에서 감시하고 제어하는 마스터(제어서버), 및 마스터로부터 DNP 메시지를 수신하여 각 아웃스테이션로 전송하는 시리얼데이터수집장치(SIO:Serial Input Output Module)와 시리얼 모뎀으로 구성되어 있다. A general control system is a system for centrally monitoring and controlling remote devices. It is an out-station (remote sub-device) responsible for monitoring and operating facilities located at remote sites, and collects remote device status information using analog or digital signals. A master (control server) for remotely monitoring and controlling the remote slaughter device, and a serial data output unit (SIO) for receiving the DNP message from the master and transmitting the DNP message to each out-station, and a serial modem .

보안기능이 적용된 제어시스템은 각 지역단위의 제어센터 역할을 수행하는 마스터, 마스터의 하위 노드인 아웃스테이션, 마스터와 아웃스테이션을 연결하는 제어 통신 네트워크를 통해 전송되는 DNP 메시지에 대하여 암복호화 연산을 수행함으로써 DNP 메시지의 인증, 무결성 검사, 기밀성 유지, 재전송 방지 등의 보안 기능을 제공하기 위한 마스터 보안통신장치(SSIO:Secure Serial Input Output Module), 슬레이브 보안통신장치(BITW:Bump In The Wire), 및 시리얼 모뎀을 포함하여 구성될 수 있다. The control system to which the security function is applied performs the encryption / decryption operation on the DNP message transmitted through the master, the outstation which is the lower node of the master, and the control communication network which connects the master and the out station, A Secure Serial Input Output Module (SSIO), a Bump In The Wire (BITW), and the like for providing security functions such as DNP message authentication, integrity check, confidentiality retention, And may include a serial modem.

IEEE 1815 Secure Authentication 규격은 응용계층만 변경하여 메시지 무결성 기능을 제공하고 체계적인 키 구조를 가지고 있다는 장점이 있지만 별도 보안통신장치로 구현하는 경우에는 DNP 메시지 생성주체와 보안기능 수행주체가 다르기 때문에 메시지 재조립 및 분할과정이 부가적으로 발생하여 전송시간이 증가한다.Although the IEEE 1815 Secure Authentication standard provides the message integrity function and the systematic key structure by changing only the application layer, in case of implementing as a separate security communication device, since the subject of DNP message generation and the subject of security function are different, And the division process is additionally generated, thereby increasing the transmission time.

또한, 기존 제어시스템에서는 제어서버와 시리얼데이터 수집장치 간의 연결구간, 시리얼데이터 수집장치와 원격소 장치 간의 연결구간만이 저속통신 구간에 해당하지만, 별도의 보안통신장치를 적용한 제어시스템에서는 마스터와 마스터 보안통신장치 간의 연결구간, 마스터 보안통신장치와 슬레이브 보안통신장치를 연결하는 제어 통신 네트워크, 슬레이브 보안통신장치와 원격소 장치 간의 연결구간이 저속 통신구간이 되기 때문에, 기존 전력시스템에 비해 저속 통신구간이 증가하여 각 연결접점에서 DNP 메시지 수신대기시간이 증가하게 된다. In the conventional control system, only the connection section between the control server and the serial data collection device, the connection section between the serial data collection device and the remote remote device corresponds to the low-speed communication section, but in the control system using the separate security communication device, Since the connection section between the security communication devices, the control communication network connecting the master security communication device and the slave security communication device, and the connection section between the slave security communication device and the remote remote device become low speed communication sections, Increases the waiting time for receiving DNP messages at each connection point.

따라서 별도의 보안통신장치에 보안기능을 구현한 제어시스템에서는 보안기능 수행시간과 메시지 수신 대기시간에 의해 기존 제어시스템의 메시지 전송시간보다 전송시간이 증가하게 되고, 이로 인해 제어시스템에서 요구하는 시간 요구조건을 충족시키지 못해 제어 서비스의 가용성 확보에 영향을 줄 수 있다. Therefore, in a control system that implements a security function in a separate security communication device, the transmission time is longer than the message transmission time of the existing control system due to the security function execution time and the message reception waiting time. As a result, Conditions can not be met and can affect the availability of control services.

본 발명의 배경기술은 대한민국 공개특허공보 제10-2013-0034770호(2013.04.08)에 개시되어 있다.The background art of the present invention is disclosed in Korean Patent Laid-Open Publication No. 10-2013-0034770 (Apr.

본 발명은 전술한 문제점을 해결하기 위해 창안된 것으로서, 본 발명의 목적은 DNP(IEEE 1815)기반 전력자동화 서비스의 안전하고 안정적인 운영에 있어 데이터의 무결성과 기밀성을 보장하면서 보안기능 수행으로 인한 전송시간 증가를 최소화하는 DNP 메시지의 보안통신장치 및 방법을 제공하는 것이다. SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and it is an object of the present invention to provide a method and system for securing data integrity and confidentiality in the secure and stable operation of DNP (IEEE 1815) And to provide a secure communication apparatus and method of a DNP message that minimizes an increase in the number of DNP messages.

본 발명의 다른 목적은 데이터 보호를 위해 적용되는 보안모드에 따라 제어 데이터를 실시간으로 전송하여 메시지 처리시간을 최소화하고, 통신자원 소모 및 하드웨어 리소스 소모를 방지하는 DNP 메시지의 보안통신장치 및 방법을 제공하는 것이다. Another object of the present invention is to provide a secure communication apparatus and method of a DNP message for minimizing a message processing time by transmitting control data in real time according to a security mode applied for data protection and preventing communication resource consumption and hardware resource consumption .

본 발명의 또 다른 목적은 데이터 무결성 검증이 완료되지 않은 데이터들도 실시간 처리가 가능하도록 메시지를 검증하고 훼손된 제어데이터를 처리함으로써 DNP 보안 메시지의 전송성능을 크게 향상시킬 수 있도록 한 DNP 메시지의 보안통신장치 및 방법을 제공하는 것이다. It is another object of the present invention to provide a method and system for verifying a DNP message, which can greatly improve the transmission performance of a DNP security message by verifying a message to process data that has not been verified for data integrity, Apparatus and method.

본 발명의 또 다른 목적은 기존의 보안 프로토콜과 별도로 운영되는 것이 아니라 보안 메시지의 특성에 따라 실시간 처리하는 방식을 통해 기존 보안 프로토콜의 변경이나 시스템 구성의 변경없이 보안통신장치 추가로 인해 발생하는 데이터 전송시간의 증가를 최소화한 DNP 메시지의 보안통신장치 및 방법을 제공하는 것이다. It is a further object of the present invention to provide a method and system for real-time processing according to the characteristics of a security message, rather than being operated separately from existing security protocols, And to provide a secure communication apparatus and method of a DNP message that minimizes an increase in time.

본 발명의 일 측면에 따른 DNP 메시지의 보안통신장치는 DNP(Distribute Network Protocol) 메시지를 송수신하는 시리얼 인터페이스; 상기 시리얼 인터페이스를 통해 송수신되는 상기 DNP 메시지를 첫번째 블록, 중간 블록 및 마지막 블록으로 구분하여 블록별로 분석하고 관리하는 블록분석부; 상기 블록분석부에 의해 블록화된 상기 DNP 블록의 암호화를 위해 암호 라이브러리를 제공하고, 보안키와 보안정책의 관리를 담당하는 보안모듈부; 및 상기 보안처리부로부터 전달받은 암호 라이브러리를 이용하여 상기 DNP 블록을 암호화하고 인증 처리하는 보안처리부를 포함하는 것을 특징으로 한다. A secure communication device of a DNP message according to an aspect of the present invention includes: a serial interface for transmitting and receiving a DNP (Distribute Network Protocol) message; A block analyzer for analyzing and managing the DNP message transmitted / received through the serial interface by a block, an intermediate block, and a last block; A security module for providing an encryption library for encrypting the DNP block blocked by the block analyzer and managing a security key and a security policy; And a security processing unit for encrypting and authenticating the DNP block using the encryption library transmitted from the security processing unit.

본 발명에서, 상기 블록분석부는 상기 DNP 블록의 위치와 보안운영모드를 관리하는 블록식별모듈; 상기 블록식별모듈의 보안운영모드에 따라 상기 DMP 메시지의 Secure 헤더를 추가 및 검증하는 Secure 헤더 처리모듈; 상기 DNP 블록을 저장하는 블록저장모듈; 및 상기 DNP 블록의 메시지인증코드 생성을 위해 인증대상 데이터를 저장하는 인증데이터 저장모듈을 포함하는 것을 특징으로 한다. In the present invention, the block analyzer may include a block identification module managing a location of the DNP block and a secure operation mode; A secure header processing module for adding and verifying a secure header of the DMP message according to a security operation mode of the block identification module; A block storage module for storing the DNP block; And an authentication data storage module for storing authentication target data for generating a message authentication code of the DNP block.

본 발명에서, 상기 블록식별모듈은 상기 DNP 블록을 분석하여 상기 DNP 블록의 DNP 프레임 내 위치와 처리상태를 타입으로 관리하는 것을 특징으로 한다. In the present invention, the block identification module analyzes the DNP block and manages the position and processing state of the DNP block in the DNP frame as a type.

본 발명에서, 상기 타입은 타입 1, 타입 2, 타입 3 및 타입 4로 구분되고, 상기 타입 1은 초기 값으로 데이터 링크 헤더를 포함하는 첫 번째 블록을 나타내고, 상기 타입 2는 응용계층 데이터를 포함하는 중간 블록을 의미하며, 상기 타입 3은 상기 DNP 메시지 수신시에만 사용되는 타입으로, 데이터 크기가 DNP 보안통신모드와 암호 알고리즘에 의해 추가되는 Secure 헤더, 암호 패딩, 해쉬 데이터 크기 이상이 되는 경우에는 타입 설정값이 4로 변경되며, 상기 타입 4는 DNP 메시지가 수신 완료되었음을 나타내는 것을 특징으로 한다. In the present invention, the type is classified into Type 1, Type 2, Type 3, and Type 4, and Type 1 represents a first block including a data link header as an initial value, and Type 2 includes application layer data In the case where the data size is equal to or greater than the Secure header, the password padding, and the hash data size added by the DNP secure communication mode and the encryption algorithm, the type 3 is used only when receiving the DNP message. The type setting value is changed to 4, and the type 4 indicates that the DNP message has been received.

본 발명에서, 상기 블록식별모듈은 상기 타입이 상기 타입 1로 설정되어 있으면 상기 DNP 블록이 DNP 식별코드를 포함하고 있는지 여부를 검사하고, DNP 프레임 전체 길이를 계산한 후 상기 블록저장모듈의 데이터 크기가 기 설정된 크기 이상이 되면 상기 타입 1에서 상기 타입 2로 변경하는 것을 특징으로 한다. In the present invention, the block identification module checks whether the DNP block includes the DNP identification code if the type is set to the type 1, calculates the total length of the DNP frame, Is changed from the type 1 to the type 2 when a predetermined size or more is reached.

본 발명에서, 상기 DNP 메시지 전송시, 상기 타입이 상기 타입 2로 설정된 경우에는, 상기 블록식별모듈은 상기 첫 번째 블록에서 계산된 DNP 길이 정보를 참조하여 상기 블록저장모듈의 데이터 크기가 DNP 길이 이상이 되면 상기 타입 2에서 상기 타입 4로 변경하는 것을 특징으로 한다. In the present invention, when the DNP message is transmitted, if the type is set to the type 2, the block identification module refers to the DNP length information calculated in the first block, and if the data size of the block storage module is greater than the DNP length The type 2 to the type 4 is changed.

본 발명에서, 상기 DNP 메시지 수신시, 상기 타입이 상기 타입 2로 설정된 경우에는, 상기 블록식별모듈은 상기 첫 번째 블록에서 계산된 DNP 길이 정보를 참조하여 상기 블록저장모듈의 데이터 크기가 DNP 길이 이상이 되면 상기 타입 2를 상기 타입 3으로 변경하는 것을 특징으로 한다. In the present invention, when receiving the DNP message, if the type is set to the type 2, the block identification module refers to the DNP length information calculated in the first block, and if the data size of the block storage module is greater than the DNP length The type 2 is changed to the type 3.

본 발명에서, 상기 블록식별모듈은 상기 타입이 상기 타입 3인 경우 상기 DNP 메시지 검증을 위한 추가 데이터의 수신이 완료되면 상기 타입 3을 타입 4로 변경하는 것을 특징으로 한다. In the present invention, when the type is the type 3, the block identification module changes the type 3 to type 4 upon completion of receiving the additional data for DNP message verification.

본 발명에서, 상기 블록식별모듈은 상기 타입이 상기 타입 4인 경우 상기 DNP 블록을 처리한 후 상기 타입 4를 상기 타입 1로 초기화하는 것을 특징으로 한다. In the present invention, when the type is the type 4, the block identification module initializes the type 4 to the type 1 after processing the DNP block.

본 발명에서, 상기 Secure헤더 처리모듈은 상기 보안모듈부의 보안정책을 참조하여 보안모드를 결정한 후 결정된 보안모드에 따라 Secure 헤더 필드를 생성하는 것을 특징으로 한다. In the present invention, the secure header processing module determines a security mode by referring to the security policy of the security module, and generates a secure header field according to the determined security mode.

본 발명에서, 상기 보안처리부는 상기 보안모듈부에서 제공하는 암호 알고리즘과 보안키를 이용하여 상기 DNP 블록에 대한 데이터 암호기능을 제공하는 암호 모듈; 및 데이터 인증 기능을 제공하는 인증 모듈을 포함하는 것을 특징으로 한다. In the present invention, the security processing unit may include a cryptographic module that provides a data encryption function for the DNP block using an encryption algorithm and a security key provided by the security module unit; And an authentication module that provides a data authentication function.

본 발명에서, 상기 보안처리부는 인증 기능을 제공하는 인증모드에서는 상기 첫번째 블록과 상기 중간 블록을 마스터 또는 아웃스테이션으로 전송하고, 상기 블록분석부모듈에 저장되어 있는 전체 DNP 프레임에 대한 메시지 인증 코드를 생성한 후, 상기 메시지 인증코드를 상기 마지막 블록에 추가하여 상기 마스터 또는 상기 아웃스테이션으로 전송하는 것을 특징으로 한다. In the present invention, the security processing unit may transmit the first block and the intermediate block to the master or the out-station in an authentication mode for providing an authentication function, and transmit a message authentication code for the entire DNP frame stored in the block- The message authentication code is added to the last block and is transmitted to the master or the out-station.

본 발명에서, 상기 보안처리부는 메시지 암호와 인증 기능을 제공하는 암호 인증모드에서는 상기 첫번째 블록과 상기 중간 블록을 상기 블록분석부에 복사한 후, 상기 첫번째 블록 및 상기 중간 블록을 암호화하여 마스터나 아웃스테이션으로 전송하고, 상기 마지막 블록을 암호화하여 상기 블록분석부에 저장되어 있는 인증영역 데이터에 대한 메시지 인증 코드를 생성한 후 암호화된 상기 마지막 블록에 첨부하여 상기 마스터 또는 상기 아웃스테이션으로 전송하는 것을 특징으로 한다. In the present invention, the security processing unit may copy the first block and the intermediate block to the block analyzing unit, encrypt the first block and the intermediate block in a password authentication mode that provides a message encryption and an authentication function, And transmits the message to the station, encrypts the last block, generates a message authentication code for the authentication area data stored in the block analyzing unit, and transmits the message authentication code to the master or the out station after attaching the message authentication code to the last encrypted block. .

본 발명의 일 측면에 따른 DNP 메시지의 보안통신방법은 메시지 암호와 인증 기능을 제공하는 암호 인증모드에서 DNP 블록을 수신하는 제1단계; 수신된 상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 제2단계; 및 상기 식별 결과에 따라, 상기 첫번째 블록과 상기 중간 블록을 암호화하여 전송하고, 상기 마지막 블록을 암호화하고 메시지 인증 코드를 생성한 후 상기 메시지 인증 코드를 암호화된 상기 마지막 블록에 첨부하여 전송하는 제3단계를 포함하는 것을 특징으로 한다. A secure communication method of a DNP message according to an aspect of the present invention includes a first step of receiving a DNP block in a password authentication mode for providing a message encryption and an authentication function; A second step of identifying the received DNP block as one of a first block, an intermediate block, and a last block; And encrypting the first block and the intermediate block according to the identification result, encrypting the first block and the intermediate block, encrypting the last block, generating a message authentication code, attaching the message authentication code to the last encrypted block, The method comprising the steps of:

본 발명에서, 상기 제3단계는 상기 DNP 블록이 상기 첫번째 블록이면, 보안정책을 참조하여 보안모드를 결정하고, 결정된 보안모드에 따라 Secure 헤더 필드를 생성하여 데이터링크 헤더 CRC 앞에 추가한 후 변경된 데이터를 저장하는 단계; 변경된 상기 데이터 중 Secure 헤더 이후의 데이터 크기와 암호 알고리즘의 입출력 크기를 비교하여 수신 데이터 크기가 상기 암호 알고리즘의 입출력 크기보다 크면, 블록사이즈 만큼의 데이터 암호라이브러리와 보안키를 이용하여 상기 첫번째 블록을 암호화한 후 DNP 데이터링크의 헤더와 함께 상기 마스터 또는 상기 아웃스테이션으로 전송하는 단계를 포함하는 것을 특징으로 한다. In the present invention, if the DNP block is the first block, the third step determines the security mode by referring to the security policy, generates a secure header field according to the determined security mode, adds the secure header field to the data link header CRC, ; When the received data size is larger than the input / output size of the encryption algorithm, the data encryption library and the security key are used to encrypt the first block, And transmitting the header of the DNP data link to the master or the out station together with the header of the DNP data link.

본 발명에서, 상기 제3단계는 상기 DNP 블록이 상기 중간 블록이면, 상기 첫번째 블록 처리 과정에서 암호화된 데이터 이후부터의 추가 데이터 크기가 암호 알고리즘의 입출력 크기보다 크면, 상기 암호 알고리즘의 입출력 크기만큼의 데이터를 암호라이브러리와 보안키를 이용하여 암호화하는 것을 특징으로 한다. If the additional data size after the encrypted data in the first block process is larger than the input / output size of the encryption algorithm, the third step is to select the DNP block as the input / output size of the encryption algorithm, And encrypts the data using the encryption library and the security key.

본 발명에서, 상기 제3단계는 상기 DNP 블록이 상기 마지막 블록이면, 상기 마지막 블록이 상기 암호 알고리즘의 입출력 크기보다 작으면 상기 추가 수신데이터에 패딩 데이터를 추가하여 암호화하고, 상기 추가 수신데이터가 상기 암호 알고리즘의 입출력 크기와 같으면 상기 패딩 데이터를 추가하지 않고 암호화한 후, 상기 마지막 블록을 대상으로 메시지인증코드를 생성하며, 생성된 메시지인증코드를 암호화된 상기 마지막 블록에 추가하여 전송하는 것을 특징으로 한다. In the present invention, if the DNP block is the last block, if the last block is smaller than the input / output size of the encryption algorithm, padding data is added to the additional received data to encrypt the additional received data, And encrypts the padding data without adding the padding data, generates a message authentication code for the last block, adds the generated message authentication code to the last encrypted block, and transmits the encrypted message authentication code. do.

본 발명의 다른 측면에 따른 DNP 메시지의 보안통신방법은 인증 기능을 제공하는 인증모드에서 DNP 블록을 수신하는 제1단계; 수신된 상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 제2단계; 및 상기 식별 결과에 따라, 상기 첫번째 블록과 상기 중간 블록을 마스터 또는 아웃스테이션으로 전송하고, 상기 블록분석부모듈에 저장되어 있는 전체 DNP 프레임에 대한 메시지 인증 코드를 생성한 후, 생성된 상기 메시지 인증 코드를 이용하여 무결성 검증과정을 수행한 후 상기 마스터 또는 아웃스테이션으로 전송하는 제3단계를 포함하는 것을 특징으로 한다. A secure communication method of a DNP message according to another aspect of the present invention includes a first step of receiving a DNP block in an authentication mode providing an authentication function; A second step of identifying the received DNP block as one of a first block, an intermediate block, and a last block; And generating a message authentication code for the entire DNP frame stored in the block analyzing module according to the identification result, transmitting the first block and the intermediate block to a master or an out station, And a third step of performing an integrity verification process using the code and transmitting the integrity verification process to the master or the out-station.

본 발명의 또 다른 측면에 따른 DNP 메시지의 보안통신방법은 상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 단계; 상기 첫번째 블록과 상기 중간 블록을 마스터나 아웃스테이션으로 실시간으로 전송하는 단계; 및 상기 마지막 블록을 메시지 무결성 검증결과에 따라 처리한 후 상기 마스터 또는 아웃스테이션으로 전송하는 단계를 포함하는 것을 특징으로 한다. According to another aspect of the present invention, there is provided a secure communication method of a DNP message, comprising: identifying the DNP block as one of a first block, an intermediate block, and a last block; Transmitting the first block and the intermediate block to the master or out station in real time; And transmitting the final block to the master or out station after processing the final block according to the message integrity verification result.

본 발명에서, 상기 마지막 블록을 메시지 무결성 검증결과에 따라 처리한 후 상기 마스터 또는 아웃스테이션으로 전송하는 단계는, 상기 무결성 검증 결과, 유효한 메시지는 전달하고, 상기 무결성 검증이 실패한 메시지는 상기 마스터 또는 상기 아웃스테이션이 상기 무결성 검증을 실패한 상기 메시지를 드롭(drop)시키도록 상기 마지막 블록을 임의의 데이터로 변경한 후 전송하는 것을 특징으로 한다.In the present invention, the step of processing the last block according to the message integrity verification result and transmitting the message to the master or the out-station may include transmitting the valid message as a result of the integrity verification, And the out-station changes the last block to arbitrary data so as to drop the message in which the integrity verification has failed.

본 발명의 또 다른 측면에 따른 DNP 메시지의 보안통신방법은 메시지 암호와 인증 기능을 제공하는 암호 인증모드에서 DNP 블록을 수신하는 제1단계; 수신된 상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 제2단계; 및 상기 식별 결과에 따라, 상기 첫번째 블록 또는 상기 중간 블록에 대해 복호화를 수행하고, 상기 첫번째 블록 또는 상기 중간 블록을 마스터 또는 아웃스테이션으로 전송하고, 상기 마지막 블록에 대해 복호화 및 무결성 검증을 수행하고, 상기 무결성 검증 결과에 따라 상기 마스터 또는 상기 아웃스테이션으로 전송하는 제3단계를 포함하되, 상기 제3단계는 상기 첫번째 블록 또는 상기 마지막 블록의 무결성 검증 결과에 따라, 유효한 메시지는 상기 마스터 또는 상기 아웃스테이션으로 전달하고, 상기 무결성 검증이 실패한 메시지는 상기 마스터 또는 상기 아웃스테이션이 상기 무결성 검증을 실패한 상기 메시지를 드롭(drop)시키도록 상기 마지막 블록을 임의의 데이터로 변경한 후 전송하는 것을 특징으로 한다. According to another aspect of the present invention, there is provided a secure communication method of a DNP message, the method comprising: a first step of receiving a DNP block in a password authentication mode for providing a message encryption and authentication function; A second step of identifying the received DNP block as one of a first block, an intermediate block, and a last block; And performing decoding on the first block or the intermediate block according to the identification result, transmitting the first block or the intermediate block to a master or an out station, performing decryption and integrity verification on the last block, And a third step of transmitting the validation result to the master or the out-station according to the integrity verification result, wherein the third step is a step of, according to the integrity verification result of the first block or the last block, And transmits the message in which the integrity verification has failed, after changing the last block into arbitrary data so that the master or the out-station may drop the message that failed the integrity verification.

본 발명은 DNP(IEEE 1815)기반 전력자동화 서비스의 안전하고 안정적인 운영에 있어 데이터의 무결성과 기밀성을 보장하면서 보안기능 수행으로 인한 전송시간 증가를 최소화한다. The present invention minimizes the transmission time increase due to the security function while ensuring the integrity and confidentiality of the data in the safe and stable operation of the DNP (IEEE 1815) based power automation service.

본 발명은 데이터 보호를 위해 적용되는 보안모드에 따라 제어 데이터를 실시간으로 전송하여 메시지 처리시간을 최소화하고, 통신자원 소모 및 하드웨어 리소스 소모를 방지한다. The present invention minimizes message processing time by transmitting control data in real time according to a security mode applied for data protection, and prevents communication resource consumption and hardware resource consumption.

본 발명은 데이터 무결성 검증이 완료되지 않은 데이터들도 실시간 처리가 가능하도록 메시지를 검증하고 훼손된 제어데이터를 처리함으로써 DNP 보안 메시지의 전송성능을 크게 향상시킬 수 있도록 한다.The present invention greatly improves the transmission performance of the DNP security message by verifying the message and processing the corrupted control data so that the data whose data integrity verification has not been completed can be processed in real time.

본 발명은 기존의 보안 프로토콜과 별도로 운영되는 것이 아니라 보안 메시지의 특성에 따라 실시간 처리하는 방식을 통해 기존 보안 프로토콜의 변경이나 시스템 구성의 변경없이 보안통신장치 추가로 인해 발생하는 데이터 전송시간의 증가를 최소화한다. The present invention is not operated separately from the existing security protocol, but can increase the data transmission time due to the addition of the secure communication device without changing the existing security protocol or changing the system configuration through the real- Minimize it.

도 1 은 본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치의 동작 과정을 개념적으로 나타낸 도면이다.
도 2 는 본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치의 블럭 구성도이다.
도 3 은 본 발명의 일 실시예에 따른 암호/인증 모드에서의 DNP 메시지 전송 처리 방법을 도시한 순서도이다.
도 4 는 본 발명의 일 실시예에 따른 인증모드에서의 DNP 메시지 전송 처리 방법을 도시한 순서도이다.
도 5 는 본 발명의 일 실시예에 따른 DNP 메시지 수신 처리 방법을 도시한 순서도이다.
1 is a conceptual diagram illustrating an operation of a DNP message security communication apparatus according to an exemplary embodiment of the present invention.
2 is a block diagram of a DNP message security communication apparatus according to an exemplary embodiment of the present invention.
3 is a flowchart illustrating a DNP message transmission processing method in an encryption / authentication mode according to an embodiment of the present invention.
4 is a flowchart illustrating a DNP message transmission processing method in an authentication mode according to an embodiment of the present invention.
5 is a flowchart illustrating a DNP message reception processing method according to an embodiment of the present invention.

이하에서는 본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치 및 방법을 첨부된 도면들을 참조하여 상세하게 설명한다. 이러한 과정에서 도면에 도시된 선들의 두께나 구성요소의 크기 등은 설명의 명료성과 편의상 과장되게 도시되어 있을 수 있다. 또한 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서, 이는 이용자, 운용자의 의도 또는 관례에 따라 달라질 수 있다. 그러므로 이러한 용어들에 대한 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야할 것이다. Hereinafter, a DNP message security communication apparatus and method according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings. In this process, the thicknesses of the lines and the sizes of the components shown in the drawings may be exaggerated for clarity and convenience of explanation. Further, the terms described below are defined in consideration of the functions of the present invention, which may vary depending on the user, the intention or custom of the operator. Therefore, definitions of these terms should be made based on the contents throughout this specification.

도 1 은 본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치의 동작 과정을 개념적으로 나타낸 도면이다. 1 is a conceptual diagram illustrating an operation of a DNP message security communication apparatus according to an exemplary embodiment of the present invention.

일반적으로 제어메시지 전송시간 증가는 DNP 메시지 수신대기시간에 의해 결정되기 때문에 수신대기시간을 얼마나 줄이느냐에 따라 보안통신장치의 성능이 좌우된다. DNP 프레임은 임의의 길이로 분할되어 전송되므로 임의로 분할된 데이터의 수신과 동시에 보안기능을 수행해야 메시지 수신대기시간을 최소화할 수 있다. 이에 본 실시예에서는 DNP 프레임을 보다 작은 데이터 단위(블록)로 분할하여 처리한다. Generally, since the increase of control message transmission time is determined by the waiting time of DNP message reception, the performance of the secure communication device depends on how much the waiting time is reduced. Since the DNP frame is transmitted by being divided into arbitrary lengths, it is necessary to perform the security function at the same time as receiving the arbitrary divided data, so that the waiting time for receiving a message can be minimized. In this embodiment, the DNP frame is divided into smaller data units (blocks) and processed.

본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치는 암호모드의 경우에는 암호에 사용되는 암호알고리즘의 입력데이터 크기 이상의 DNP 블록을 수신한 후 보안기능을 수행하여 전송하고, 인증모드의 경우에는 암호화가 필요치 않으므로 Master나 Outstation에서 수신한 메시지 블록 크기에 맞춰 실시간 처리하여 수신대기시간을 최소화한다. 또한 보안통신모드에 따라 보안통신장치가 DNP 메시지를 생성할 때와 DNP 메시지를 검증할 때 수행해야 하는 기능이 다르고 DNP 프레임 내 데이터의 위치에 따라 데이터처리방식이 다르기 때문에, 보안통신모드에 따라 DNP 메시지 송신시(DNP 메시지 생성)와 DNP 메시지 수신시(DNP 메시지 검증)의 실시간 보안처리방법을 별도로 고안해야 각 보안모드별 전송성능을 최적화할 수 있다. The DNP message security communication apparatus according to an exemplary embodiment of the present invention receives a DNP block equal to or larger than an input data size of a cryptographic algorithm used in a cipher in a cipher mode and performs security function and transmits the DNP block. It is processed in real time according to the message block size received from Master or Outstation to minimize the waiting time. In addition, according to the secure communication mode, since the security communication device generates the DNP message and the function to be performed when verifying the DNP message is different and the data processing method is different according to the location of the data in the DNP frame, A real-time security processing method for message transmission (DNP message generation) and DNP message reception (DNP message verification) should be separately designed to optimize transmission performance for each security mode.

본 실시예에서는 보안모드, DNP 프레임 내 데이터 위치별로 보안통신장치가 수행하는 보안기능에 따라 DNP 프레임을 첫번째 블록, 중간 블록, 마지막 블록으로 나누어서 처리하는 방법을 제안한다. In this embodiment, a method of dividing a DNP frame into a first block, an intermediate block, and a last block according to a security function performed by the secure communication device for each security mode and data location in the DNP frame is proposed.

도 1 을 참조하면, 본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치(40)에서, 마스터(10)(or 슬레이브) 보안통신장치는 마스터(or 아웃스테이션)가 전송한 DNP 프레임 수신이 완료될 때까지 대기하지 않고 특정 길이 이상의 DNP 데이터(블록)를 수신하면 보안모드와 DNP 프레임에서 수신데이터의 위치를 분석한 후 수신 데이터에 대하여 Secure 헤더 추가 및 암호화 등의 보안기능을 수행한다. 이어 보안기능이 수행된 블록 데이터를 슬레이브(or 마스터) 보안통신장치로 즉시 전송하고 다음 데이터 블록에 대한 보안기능을 수행한다. 슬레이브(or 마스터) 보안통신장치는 마스터(or 슬레이브) 보안통신장치가 전송한 DNP 블록데이터를 수신하면 보안모드에 따라 Secure 헤더 제거 및 메시지 복호화 기능을 수행한 후 그 결과를 아웃스테이션(20)(or 마스터(10))으로 전송한다. 이때 메시지 무결성 검증을 위한 데이터는 DNP 프레임 수신이 완료될 때까지 누적하여 보관하고 있으며 마지막 블록을 수신한 후 DNP 메시지 무결성 검증 기능을 수행한다. 메시지 무결성 검증결과가 정상인 경우에는 마지막 블록도 원래의 제어 메시지로 복원하여 아웃스테이션(or 마스터)으로 전달하고, 무결성 검증에 실패한 경우에는 마지막 블록을 임의의 데이터로 변경하여 아웃스테이션(or 마스터)으로 전달함으로써 아웃스테이션(or 마스터)이 DNP 프레임 분석에 실패하여 해당 DNP 메시지를 드롭(drop)하도록 유도한다.Referring to FIG. 1, in the DNP message security communication apparatus 40 according to the embodiment of the present invention, the master 10 (or slave) secure communication apparatus receives the DNP frame transmitted from the master (or out station) When receiving DNP data (block) of a certain length or longer without waiting until it is received, it analyzes the location of the received data in the secure mode and the DNP frame, and performs security functions such as adding and encrypting the secure header to the received data. Then, the security function block data is immediately transmitted to the slave (or master) security communication device and the security function for the next data block is performed. When the slave (or master) secure communication device receives the DNP block data transmitted from the master (or slave) secure communication device, it performs the secure header removal and message decryption function according to the security mode, or the master 10). At this time, the data for verifying the message integrity is accumulated and stored until the reception of the DNP frame is completed, and the DNP message integrity verification function is performed after receiving the last block. If the message integrity check result is normal, the last block is restored to the original control message and transferred to the outstation (or master). If the integrity check fails, the last block is changed to arbitrary data and the outstation (Or the master) fails to analyze the DNP frame and causes the corresponding DNP message to be dropped.

이하, 본 발명의 일 실시예에따른 DNP 메시지 보안통신장치(40)를 도 2 참조하여 상세하게 설명한다. Hereinafter, a DNP message security communication apparatus 40 according to an embodiment of the present invention will be described in detail with reference to FIG.

도 2 는 본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치의 블럭 구성도이다.2 is a block diagram of a DNP message security communication apparatus according to an exemplary embodiment of the present invention.

도 2 를 참조하면, 본 발명의 일 실시예에 따른 DNP 메시지 보안통신장치(40)는 마스터(10)나 아웃스테이션(20)이 전송하는 DNP 제어 메시지를 송수신하는 시리얼 인터페이스(41), DNP 메시지를 블록별로 분석하고 관리하는 블록분석부(42), 암호화 연산을 위한 암호 라이브러리(431)를 제공하고 보안키와 보안정책의 관리를 담당하는 보안모듈부(43), DNP 메시지를 블록별로 암호화하고 인증처리하는 보안처리부(44), 및 보안서버(KMS)(30)와의 통신을 담당하는 이더넷 인터페이스(45)부를 포함한다.2, the DNP message security communication apparatus 40 includes a serial interface 41 for transmitting and receiving a DNP control message transmitted from the master 10 or the out station 20, a DNP message A security analysis module 43 for managing the security key and the security policy, a security module module 43 for encrypting the DNP message on a block-by-block basis, A security processing unit 44 for performing authentication processing, and an Ethernet interface 45 for communicating with the security server (KMS) 30.

블록분석부(42)는, 시리얼 인터페이스(41)를 통해 수신된 DNP 블록의 위치와 보안운영모드를 관리하는 블록식별모듈(424), 보안운영모드에 따라 DNP 메시지의 Secure 헤더의 생성 및 검증을 담당하는 Secure 헤더 처리모듈(423), DNP 메세지에 대한 메시지인증코드생성을 위해 인증대상 데이터를 저장하는 인증데이터 저장모듈(421)를 포함한다. The block analyzing unit 42 includes a block identification module 424 for managing the location of the DNP block received via the serial interface 41 and the secure operation mode, and a secure header generation unit 424 for generating and verifying the secure header of the DNP message according to the secure operation mode A secure header processing module 423 in charge, and an authentication data storage module 421 for storing authentication target data for generating a message authentication code for a DNP message.

블록식별모듈(424)은 시리얼 인터페이스(41)를 통해 수신한 DNP 블록을 분석하여 수신 DNP 블록의 DNP 프레임 내 위치와 처리상태를 타입으로 관리한다. The block identification module 424 analyzes the DNP block received through the serial interface 41 and manages the position and the processing state of the received DNP block in the DNP frame as a type.

타입 1은 초기 값으로 데이터 링크 헤더를 포함하는 첫번째 블록을 나타내고, 타입 2는 응용계층 데이터를 포함하는 중간 블록을 의미한다. 타입 3은 DNP 메시지 수신시에만 사용되는 타입으로 수신 데이터 크기가 DNP 보안통신모드와 암호 알고리즘에 의해 추가되는 Secure 헤더, 암호 패딩, 해쉬 데이터 크기 이상이 되는 경우에는 타입 설정값을 4로 변경된다. 타입 4는 DNP 프레임 수신이 완료되었음을 나타낸다. Type 1 represents the first block including the data link header as an initial value, and Type 2 represents an intermediate block including application layer data. Type 3 is a type used only for receiving DNP messages. When the received data size exceeds the Secure header, password padding, or hash data size added by the DNP secure communication mode and encryption algorithm, the type setting value is changed to 4. Type 4 indicates that the reception of the DNP frame is completed.

여기서, 타입의 설정 값이 1로 설정되어 있으면 블록식별모듈(424)은 수신한 블록이 DNP 식별코드를 포함하고 있는지 여부를 검사하고 DNP 프레임 전체 길이를 계산한 후, 블록저장모듈(422)의 데이터 크기가 지정한 크기(예, 데이터링크 헤더 길이) 이상이 되면 타입 설정 값을 2로 변경한다. If the type setting value is set to 1, the block identification module 424 checks whether the received block includes the DNP identification code, calculates the total length of the DNP frame, If the data size is larger than the specified size (eg, data link header length), change the type setting value to 2.

보안통신장치(40)가 DNP 메시지를 전송하고 타입 설정 값이 2로 설정된 경우에는, 블록식별모듈(424)은 첫번째 블록에서 계산된 DNP 길이 정보를 참조하여 블록저장모듈(422)의 데이터 크기가 DNP 길이 이상이 되면 타입 설정 값을 4로 변경한다. When the secure communication device 40 transmits the DNP message and the type setting value is set to 2, the block identification module 424 refers to the DNP length information calculated in the first block and determines that the data size of the block storage module 422 is If the DNP length is exceeded, change the type setting value to 4.

보안통신장치(40)가 DNP 메시지를 수신하고 타입 설정 값이 2로 설정된 경우에는, 블록식별모듈(424)은 첫번째 블록에서 계산된 DNP 길이 정보를 참조하여 블록저장모듈(422)의 데이터 크기가 DNP 길이 이상이 되면 타입 설정 값을 3으로 변경한다. 타입 설정값이 3인 경우는 DNP 메시지 검증을 위해 Secure 헤더 및 인증데이터 등 추가 데이터가 필요함을 의미하므로 추가 데이터 수신을 완료한 후 타입 설정 값을 4로 변경한다. When the secure communication device 40 receives the DNP message and the type setting value is set to 2, the block identification module 424 refers to the DNP length information calculated in the first block and determines that the data size of the block storage module 422 is If the DNP length is exceeded, change the type setting value to 3. When the type setting value is 3, it means that additional data such as the secure header and authentication data are needed for DNP message verification, so change the type setting value to 4 after completion of receiving additional data.

타입 4인 경우는 DNP 프레임 수신 완료되었음을 의미하므로 다음 DNP 프레임의 처리를 위해 해당 DNP 블록 처리된 후 타입 설정 값을 1로 초기화한다. In case of Type 4, it indicates that the DNP frame has been received. Therefore, after the corresponding DNP block is processed to process the next DNP frame, the type setting value is initialized to 1.

블록분석부(42)는 시리얼인터페이스를 통해 수신한 DNP 블록을 블록저장모듈(422)에 저장하고, 인증데이터 생성 및 검증을 위해 필요한 데이터인 Secure 헤더정보, Secure 헤더 이후의 DNP 블록, 인증처리를 위한 패딩 데이터를 인증데이터 저장모듈(421)에 저장한다. The block analysis unit 42 stores the DNP block received via the serial interface in the block storage module 422, and obtains the secure header information, the DNP block after the Secure header, and the authentication processing, which are data necessary for authentication data generation and verification And stores the padding data in the authentication data storage module 421.

블록저장모듈(422)과 인증데이터 저장모듈(421)은 DNP 메시지 생성 및 전송이 완료되어 타입 설정값이 4에서 1로 변경되면 저장된 데이터를 초기화한다. The block storage module 422 and the authentication data storage module 421 initialize the stored data when the type setting value is changed from 4 to 1 after the generation and transmission of the DNP message is completed.

Secure헤더 처리모듈(423)은 보안모듈부(43)의 보안정책관리모듈이 관리하는 보안정책을 참조하여 보안통신장치(40)가 수행해야 할 보안모드를 결정한 후 결정된 보안모드에 따라 Secure 헤더 필드를 생성한다. Secure header processing module 423 determines a security mode to be performed by the secure communication device 40 by referring to the security policy managed by the security policy management module of the security module 43, .

보안모듈부(43)는 대칭키 암호 알고리즘, 공개키 알고리즘, 해쉬 알고리즘 등의 암호 기능을 제공하는 암호라이브러리, 및 보안서버(30)와 통신하여 보안키 길이, 키 갱신주기, 암호알고리즘 등 보안정책의 관리 및 키 생성, 분배, 갱신 등 보안키의 관리를 담당하는 보안정책관리 모듈(432)을 포함한다. The security module unit 43 communicates with the security server 30 and provides a security policy such as a security key length, a key renewal cycle, a cryptographic algorithm, etc., by communicating with a cryptographic library that provides a cryptographic function such as a symmetric key encryption algorithm, And a security policy management module 432 for managing security keys such as key generation, distribution, and renewal.

보안처리부(44)는 보안모듈에서 제공하는 암호 알고리즘과 보안키를 이용하여 DNP 블록에 대한 데이터 암호기능을 제공하는 암호 모듈(441), 및 데이터 인증 기능을 제공하는 인증 모듈(442)를 포함한다. The security processing unit 44 includes a cryptographic module 441 that provides a data encryption function for a DNP block using an encryption algorithm and a security key provided by the security module, and an authentication module 442 that provides a data authentication function .

보안통신장치(40)가 인증모드로 동작중인 경우, 보안처리부(44)는 마지막 블록을 제외한 모든 DNP 블록을 수신과 동시에 마스터(10)나 아웃스테이션(20)으로 전송하고 마지막 블록 수신시에는 인증데이터 저장모듈(421)에 저장되어 있는 전체 DNP 프레임에 대한 메시지 인증 코드를 생성하여 마지막 블록의 끝부분에 첨부하여 전송한다. 보안처리부(44)는 메시지 암호와 인증 기능을 동시에 제공하는 암호 인증모드인 경우 DNP 메시지 블록을 수신함과 동시에 인증데이터 저장모듈(421)에 복사한 후, 수신 DNP 블록을 암호화하여 마스터(10)나 아웃스테이션(20)으로 전송하고, 마지막 블록을 암호화한 후 인증데이터 저장모듈(421)에 저장되어 있는 인증영역 데이터에 대한 메시지 인증 코드를 생성하여 암호화된 마지막 블록의 끝부분에 첨부하여 전송한다.When the secure communication apparatus 40 is operating in the authentication mode, the security processing unit 44 transmits all the DNP blocks except the last block to the master 10 or the out-station 20 at the same time as receiving the data, Generates a message authentication code for the entire DNP frame stored in the data storage module 421, and transmits the message authentication code at the end of the last block. In the case of the password authentication mode for simultaneously providing the message encryption and the authentication function, the security processing unit 44 receives the DNP message block and simultaneously copies the DNP message block to the authentication data storage module 421, encrypts the received DNP block, Out station 20, encrypts the last block, generates a message authentication code for the authentication area data stored in the authentication data storage module 421, and transmits the message authentication code at the end of the last encrypted block.

이하 본 발명의 일 실시예에 따른 DNP 메시지의 보안통신방법을 도 3 내지 도 5 를 참조하여 상세하게 설명한다. Hereinafter, a secure communication method of a DNP message according to an embodiment of the present invention will be described in detail with reference to FIG. 3 to FIG.

참고로, 본 실시예에서는 각 DNP 메시지의 보안통신방법을 보안통신모드별로 구분하여 각각 설명한다. For reference, in the present embodiment, the secure communication method of each DNP message is classified according to the secure communication mode and is described separately.

도 3 은 본 발명의 일 실시예에 따른 암호/인증 모드에서의 DNP 메시지 전송 처리 방법을 도시한 순서도이다.3 is a flowchart illustrating a DNP message transmission processing method in an encryption / authentication mode according to an embodiment of the present invention.

도 3 를 참조하면, 본 발명의 일 실시예에 따른 보안통신장치(40)는 DNP 프레임을 첫번째 블록, 중간 블록, 마지막 블록으로 나누어서 처리한다. Referring to FIG. 3, the secure communication apparatus 40 according to an exemplary embodiment of the present invention divides a DNP frame into a first block, an intermediate block, and a last block.

먼저, DNP 메시지의 첫번째 블록 처리과정은 다음과 같다. First, the first block processing of the DNP message is as follows.

블록분석부(42)는 마스터(10)나 아웃스테이션(20)이 전송한 DNP 블록을 시리얼 인터페이스(41)를 통해 수신한다(S102). The block analyzer 42 receives the DNP block transmitted from the master 10 or the out station 20 through the serial interface 41 (S102).

블록분석부(42)는 수신된 DNP 블록을 블록저장모듈(422)에 저장하고 블록식별모듈(424)을 통해 수신한 데이터가 DNP 데이터의 식별코드를 포함하는 DNP 프레임의 첫 번째 데이터 블록인지 확인한다(S104). The block analysis unit 42 stores the received DNP block in the block storage module 422 and determines whether the data received through the block identification module 424 is the first data block of the DNP frame including the identification code of the DNP data (S104).

이 경우, 식별코드를 포함하는 첫 번째 데이터 블록인 경우, 블록식별모듈(424)은 DNP 데이터링크의 헤더 정보를 분석하여 프레임의 전체 길이를 계산(S106)하고, CRC(Cyclic Redundancy Check)를 제외한 DNP 데이터링크의 헤더 정보를 인증데이터 저장모듈(421)에 복사한다(S108). In this case, in the case of the first data block including the identification code, the block identification module 424 analyzes the header information of the DNP data link to calculate the total length of the frame (S106), and calculates the total length of the frame excluding the CRC (Cyclic Redundancy Check) And copies the header information of the DNP data link to the authentication data storage module 421 (S108).

상기한 바와 같이 블록 식별이 완료되면, Secure헤더 처리모듈(423)은 보안모듈부(43)의 보안정책관리모듈이 관리하는 보안정책을 참조하여 보안통신장치(40)가 수행해야 할 보안통신모드를 결정(S110)한다. When the block identification is completed as described above, the secure header processing module 423 refers to the security policy managed by the security policy management module of the security module unit 43 to determine the security communication mode to be performed by the secure communication device 40 (S110).

이어, Secure헤더 처리모듈(423)은 결정된 보안모드에 따라 Secure 헤더 필드를 생성하여 데이터링크 헤더 CRC 앞에 추가(S112)한 후 변경된 데이터를 인증데이터 저장모듈(421)에 추가한다(S114). Then, the Secure header processing module 423 generates a Secure header field according to the determined security mode, adds the Secure header field before the data link header CRC (S112), and adds the changed data to the authentication data storage module 421 (S114).

암호화 영역은 Secure 헤더 이후부터 DNP 프레임의 마지막까지이고, 암호 처리를 위해서는 암호 알고리즘의 입출력 크기(이하 '블록사이즈'라 함)만큼의 데이터가 필요하다. The encryption field is from the Secure header to the end of the DNP frame, and data for the cryptographic processing is required as much as the input / output size of the encryption algorithm (hereinafter referred to as 'block size').

이에, 블록분석부(42)는 인증데이터 저장모듈(421)에 누적된 데이터 중 Secure 헤더 이후의 데이터 크기와 블록사이즈를 비교(S116)한다. 비교 결과 수신 데이터 크기가 블록사이즈보다 작으면 단계(S102)로 리턴하여 시리얼 인터페이스(41)로부터 데이터를 추가로 수신한다. The block analyzer 42 compares the data size after the Secure header and the block size among the data accumulated in the authentication data storage module 421 (S116). If the received data size is smaller than the block size as a result of the comparison, the process returns to step S102 to further receive data from the serial interface 41. [

반면에, Secure 헤더 이후의 데이터가 블록사이즈보다 커지면, 블록분석부(42)는 블록사이즈 만큼의 데이터와 DNP 데이터링크의 헤더를 보안처리부(44)로 전달하고, 보안처리부(44)로 전달되고 남은 데이터를 인증데이터 저장모듈(421)에 기록하여 다음 데이터 블록 수신시 함께 보안처리할 수 있도록 관리한다. On the other hand, if the data after the Secure header is larger than the block size, the block analyzing unit 42 transfers the data of the block size and the header of the DNP data link to the security processing unit 44 and is transmitted to the security processing unit 44 And records the remaining data in the authentication data storage module 421 to manage security processing together with reception of the next data block.

보안처리부(44)의 암호모듈(441)은 블록분석부(42)를 통해 전달받은 블록사이즈의 데이터를 보안모듈부(43)가 관리하는 암호라이브러리와 보안키를 이용하여 암호화한 후 DNP 데이터링크의 헤더와 함께 시리얼인터페이스를 통해 전송한다. The cryptographic module 441 of the security processing unit 44 encrypts the data of the block size received through the block analyzing unit 42 by using the cryptographic library managed by the security module unit 43 and the security key, And transmits the data through the serial interface.

다음으로, DNP 메시지의 중간 블록 처리과정은 다음과 같다. Next, the intermediate block processing process of the DNP message is as follows.

블록식별모듈(424)은 중간블록을 식별코드를 포함하지 않는 데이터로 분류하여 프레임 길이 계산 및 Secure헤더 데이터 추가과정을 생략하고, 이전 데이터 블록이 저장된 블록저장모듈(422)과 인증데이터 저장모듈(421)에 추가한다. 블록식별모듈(424)은 인증데이터 저장모듈(421)의 추가 수신데이터 크기(첫번째 블록처리과정에서 암호화된 데이터 이후부터의 크기)가 블록 사이즈보다 작은 경우 시리얼 데이터를 다시 수신하여 인증데이터 저장모듈(421)에 추가한다. The block identification module 424 classifies the intermediate block into data that does not include the identification code and skips the process of calculating the frame length and adding the secure header data. The block identification module 424 stores the previous data block in the block storage module 422 and the authentication data storage module 421). The block identification module 424 receives the serial data again when the additional received data size of the authentication data storage module 421 (the size after the encrypted data in the first block process) is smaller than the block size, 421).

인증데이터 저장모듈(421)의 수신데이터 크기가 블록 사이즈보다 커지게 되면 블록사이즈 만큼의 데이터를 잘라낸 후(S118), 보안처리부(44)에 전달하고 암호화처리된 데이터 이후 부분을 인증데이터 저장모듈(421)에 기록하여 다음 데이터 블록 수신시 함께 처리하도록 관리한다. If the received data size of the authentication data storage module 421 becomes larger than the block size, the data corresponding to the block size is cut out (S118), and the data is transmitted to the security processing unit 44, 421) and manages them to be processed together when the next data block is received.

보안처리부(44)의 암호모듈(441)은 수신 데이터를 보안모듈부(43)가 관리하는 암호라이브러리와 보안키를 이용하여 수신 데이터를 암호화하고 상대 보안통신장치(40)로 전송한다(S130). 이후 수신 데이터는 DNP 프레임의 마지막 블록 전까지 상기한 과정을 반복한다.The cryptographic module 441 of the security processing unit 44 encrypts the received data using the cryptographic library managed by the security module unit 43 and the security key and transmits the received data to the counterpart secure communication apparatus 40 (S130) . The received data is then repeated until the last block of the DNP frame.

마지막으로, DNP 메시지의 마지막 블록 처리과정은 다음과 같다. 블록분석부(42)는 블록저장모듈(422)의 데이터 크기와 첫번째 블록 처리시 계산된 DNP 메시지 크기를 비교해서 시리얼 인터페이스(41)를 통해 수신한 데이터가 마지막 블록인지 확인하고, 마지막 블록을 보안 처리후 블록저장모듈(422)과 인증데이터 저장모듈(421)의 데이터를 초기화시킨다. Finally, the last block processing of the DNP message is as follows. The block analyzer 42 compares the data size of the block storage module 422 with the DNP message size calculated at the first block processing to determine whether the data received through the serial interface 41 is the last block, And initializes data of the post-processing block storage module 422 and the authentication data storage module 421.

보안처리부(44)의 암호모듈(441)은 마지막 블록이 블록 사이즈보다 작은 경우(S122)에는 추가 수신데이터에 패딩 데이터를 추가하여 암호화(S124,S126)한다. 이 경우 추가 수신데이터가 블록 사이즈와 같은 경우에는 패딩 데이터를 추가하지 않고 암호화한다. When the last block is smaller than the block size (S122), the cryptographic module 441 of the security processing unit 44 encrypts the additional received data by adding padding data (S124, S126). In this case, when the additional received data is the same as the block size, encryption is performed without adding padding data.

보안처리부(44)의 인증모듈(442)은 인증데이터 저장모듈(421)의 데이터를 대상으로 메시지인증코드를 생성하고, 생성된 메시지인증코드를 암호화된 데이터에 추가(S128)하여 상대 보안통신장치(40)로 전송한다(S130).The authentication module 442 of the security processing unit 44 generates a message authentication code for the data of the authentication data storage module 421 and adds the generated message authentication code to the encrypted data at step S128, (Step S130).

도 4 는 본 발명의 일 실시예에 따른 인증모드에서의 DNP 메시지 전송 처리 방법을 도시한 순서도이다.4 is a flowchart illustrating a DNP message transmission processing method in an authentication mode according to an embodiment of the present invention.

본 발명의 일 실시예에서, 인증모드로 동작하는 보안통신장치(40)의 DNP 메시지 실시간 전송(DNP 메시지 실시간 생성)처리 과정은 도 4 에 도시된 바와 같다. In one embodiment of the present invention, the process of real-time DNP message transmission (DNP message real-time generation) processing of the secure communication device 40 operating in the authentication mode is as shown in FIG.

도 4 를 참조하면, 인증모드에서의 DNP 메시지 전송 처리 방법은, 암호화를 위한 수신데이터 크기 분석 과정과 암호화 과정을 제외하면 암호 인증모드와 동일하며, 마지막 블록을 제외한 모든 블록은 수신과 동시에 블록저장모듈(422)에 저장하고 인증영역 데이터를 인증데이터 저장모듈(421)에 저장한 후 이를 마스터(10)나 아웃스테이션(20)으로 전송한다.Referring to FIG. 4, the DNP message transmission processing method in the authentication mode is the same as the password authentication mode except for the process of analyzing the received data size for encryption and the encryption process, and all the blocks except the last block are stored Module 422, stores the authentication area data in the authentication data storage module 421, and transmits the authentication area data to the master 10 or the out-station 20.

먼저, 블록분석부(42)는 마스터(10)나 아웃스테이션(20)이 전송한 DNP 블록을 시리얼 인터페이스(41)를 통해 수신한다(S202). First, the block analyzer 42 receives the DNP block transmitted from the master 10 or the out station 20 through the serial interface 41 (S202).

블록분석부(42)는 수신된 DNP 블록을 블록저장모듈(422)에 저장하고 블록식별모듈(424)을 통해 수신한 데이터가 DNP 데이터의 식별코드를 포함하는 DNP 프레임의 첫 번째 데이터 블록인지 확인한다(S204). The block analysis unit 42 stores the received DNP block in the block storage module 422 and determines whether the data received through the block identification module 424 is the first data block of the DNP frame including the identification code of the DNP data (S204).

이 경우, 식별코드를 포함하는 첫 번째 데이터 블록인 경우, 블록식별모듈(424)은 DNP 데이터링크의 헤더 정보를 분석하여 프레임의 전체 길이를 계산(S206)하고, CRC(Cyclic Redundancy Check)를 제외한 DNP 데이터링크의 헤더 정보를 인증데이터 저장모듈(421)에 복사한다(S208). In this case, in the case of the first data block including the identification code, the block identification module 424 analyzes the header information of the DNP data link to calculate the total length of the frame (S206), and calculates the total length of the frame excluding the CRC (Cyclic Redundancy Check) And copies the header information of the DNP data link to the authentication data storage module 421 (S208).

상기한 바와 같이 블록 식별이 완료되면, Secure헤더 처리모듈(423)은 보안모듈부(43)의 보안정책관리모듈이 관리하는 보안정책을 참조하여 보안통신장치(40)가 수행해야 할 보안모드를 결정(S210)한다. When the block identification is completed as described above, the secure header processing module 423 refers to the security policy managed by the security policy management module of the security module 43 to determine a security mode to be performed by the secure communication device 40 (S210).

이어, Secure헤더 처리모듈(423)은 결정된 보안모드에 따라 Secure 헤더 필드를 생성하여 데이터링크 헤더 CRC 앞에 추가(S212)한 후 변경된 데이터를 인증데이터 저장모듈(421)에 추가한다(S214). Then, the Secure header processing module 423 generates a secure header field according to the determined security mode, adds the header to the data link header CRC (S212), and adds the changed data to the authentication data storage module 421 (S214).

이어, 블록분석부(42)는 블록저장모듈(422)의 데이터 크기와 첫번째 블록 처리시 계산된 DNP 메시지 크기를 비교(S216)해서 시리얼 인터페이스(41)를 통해 수신한 데이터가 마지막 블록인지 확인하며, 이때 수신한 데이터가 마지막 블록이 아닌 경우 상대 보안통신장치(40)로 전송하고, 마지막 블록인 경우 메시지 인증코드를 생성하여 생성된 메시지 인증코드를 마지막 블록에 첨부하여 상대 보안통신장치로 전송한 후, 블록저장모듈(422)과 인증데이터 저장모듈(421)의 데이터를 초기화시킨다. Then, the block analyzing unit 42 compares the data size of the block storage module 422 with the DNP message size calculated in the first block process (S216), and checks whether the data received through the serial interface 41 is the last block If the received data is not the last block, it is transmitted to the relative security communication device 40. In the case of the last block, the message authentication code is generated, and the generated message authentication code is attached to the last block, The data of the block storage module 422 and the authentication data storage module 421 are initialized.

보안처리부(44)의 암호모듈(441)은 수신한 데이터가 마지막 블록인 경우 인증데이터 저장모듈(421)의 데이터를 대상으로 메시지인증코드를 생성하고, 생성된 메시지인증코드를 암호화된 데이터에 추가(S218)하여 상대 보안통신장치(40)로 전송한다(S220).The cryptographic module 441 of the security processing unit 44 generates a message authentication code for the data of the authentication data storage module 421 when the received data is the last block and adds the generated message authentication code to the encrypted data (S218) and transmits it to the counterpart secure communication device 40 (S220).

한편, 본 발명의 일 실시예에 따른 비보안모드로 동작하는 보안통신장치(40)의 DNP 메시지 실시간 처리 과정은 다음과 같다. Meanwhile, the DNP message real-time processing process of the secure communication device 40 operating in the non-secured mode according to an embodiment of the present invention is as follows.

먼저, 블록분석모듈이 보안모듈부(43)의 보안정책을 참조하여 보안통신장치(40)가 비보안모드로 동작해야 할 경우, 수신한 데이터를 수신과 동시에 마스터(10)나 아웃스테이션(20)으로 전송한다. The block analysis module refers to the security policy of the security module unit 43 and transmits the received data to the master 10 or the outstation 20 when the secure communication device 40 operates in the non- Lt; / RTI >

DNP 메시지 전송시와는 다르게 보안통신장치(40)가 DNP 메시지를 수신하는 경우에는, 수신한 DNP 메시지가 어떤 보안모드로 동작하는지 정확히 분석해야 각각의 보안모드에 따라 DNP 메시지 검증과정을 수행할 수 있기 때문에, 정교한 DNP 메시지 보안모드 분석방법이 필요하며 위변조된 DNP 메시지가 마스터(10)나 아웃스테이션(20)으로 전달되지 않도록 위변조 DNP 메시지를 효율적으로 제거할 수 있는 방법이 필요하다. When the secure communication device 40 receives the DNP message differently from the DNP message transmission, it is necessary to analyze exactly which security mode the received DNP message operates to perform the DNP message verification process according to each security mode There is a need for a method for efficiently deleting a forgery DNP message so that a sophisticated DNP message security mode analysis method is required and a forged DNP message is not delivered to the master 10 or the outgoing station 20. [

블록분석부(42)의 보안모드 구분방법과 보안처리부(44)의 위변조 메시지 제거방법은 다음과 같다. The security mode classification method of the block analysis unit 42 and the forgery message removal method of the security processing unit 44 are as follows.

블록분석부(42)는 수신한 DNP 헤더의 유효성(CRC)을 검증하고 Secure헤더 정보를 분석하여 데이터의 통신모드를 파악한 후 보안통신모드에 따라 보안처리부(44)로 데이터를 전송한다. The block analyzer 42 verifies the validity (CRC) of the received DNP header, analyzes the secure header information, determines the communication mode of the data, and transmits the data to the security processor 44 according to the secure communication mode.

보안모드의 경우 DNP 데이터링크 헤더의 CRC 앞에 Secure 헤더가 삽입되어 CRC 필드의 위치가 변경되기 때문에 CRC 검증을 통해서 보안모드와 비보안모드를 구분할 수 있다. In the security mode, since the secure header is inserted in front of the CRC of the DNP data link header to change the position of the CRC field, it is possible to distinguish the security mode from the non-security mode through CRC verification.

CRC 검증을 위해서는 10바이트 이상의 데이터가 필요하기 때문에 수신데이터의 길이가 10바이트 이하인 경우에는 시리얼 인터페이스(41)부로부터 데이터를 추가로 수신한다. Since data of 10 bytes or more is required for CRC verification, when the length of the received data is 10 bytes or less, the data is additionally received from the serial interface 41.

수신데이터 크기가 10바이트 이상인 경우 타입 설정 값을 2로 변경하고 DNP 프레임 전체 길이를 계산한 후, CRC 검증을 통해 수신 DNP 블록이 보안모드인지 비보안모드인지 구분한다. 이때 CRC 검증에 성공한 메시지는 비보안모드로 판단하고 실패한 메시지는 보안모드로 판단한다. If the received data size is 10 bytes or more, change the type setting value to 2 and calculate the total length of the DNP frame. Then, it is discriminated whether the received DNP block is a security mode or an unsecured mode through CRC verification. At this time, the message that has succeeded in CRC verification is determined to be in non-security mode, and the failed message is determined to be in security mode.

여기서, 보안모드는 메시지 인증기능만을 제공하는 인증모드, 및 메시지 암호화와 메시지 인증 기능을 동시에 제공하는 암호 인증모드로 세분화된다. 수신한 메시지의 보안모드에 따라 적절한 보안기능을 수행하기 위하여 Secure 헤더 분석을 통한 인증모드와 암호/인증 모드 구분 과정이 필요하다. Here, the security mode is subdivided into an authentication mode providing only a message authentication function and a password authentication mode providing a message encryption and a message authentication function at the same time. In order to perform appropriate security functions according to the security mode of the received message, it is necessary to perform an authentication mode and a password / authentication mode classification process using Secure header analysis.

암호모드의 경우 Secure 헤더 필드가 암호화되어 있기 때문에 Secure헤더 분석에 실패한다. In the case of cipher mode, Secure header analysis fails because the Secure header field is encrypted.

블록분석부(42)는 CRC 검증에 실패하고 Secure헤더 분석에 성공한 블록에 대해서는 인증모드로 판단하고, CRC 검증과 Secure 헤더 분석 모두 실패한 블록에 대해서는 암호 인증모드로 판단한다.The block analyzing unit 42 determines that the block failed in the CRC verification and succeeded in the secure header analysis in the authentication mode, and determines in the password authentication mode in the block in which both the CRC verification and the secure header analysis fail.

DNP 메시지 수신시 보안처리부(44)는 블록별로 수행해야 하는 보안 기능에 따라 메시지 복호 및 메시지 무결성 검증 기능을 수행하고 위변조 메시지를 효율적으로 제거해야 한다. Upon receipt of the DNP message, the security processing unit 44 performs message decryption and message integrity verification according to security functions to be performed on a block-by-block basis, and efficiently removes the forgery message.

기존의 보안통신장치(40)는 위변조 메시지 제거를 위해서 무결성 검증이 완료되기 전까지 DNP 메시지를 전송하지 않고 수신한 DNP 메시지를 보관하기 때문에, 한 프레임당 최대 0.245초의 전송시간이 증가하는 문제가 발생한다. 메시지 수신 대기시간 단축을 위해 DNP 메시지 검증기능에서 메시지를 실시간으로 전송하도록 구현하면, 외부 공격자에 의해 변조된 DNP 메시지가 메시지 무결성 검증이 완료되지 않은 상태에서 전송될 수 있으므로, 마스터(10)나 아웃스테이션(20)이 오작동할 수 있는 위험이 있다.The existing secure communication device 40 stores the received DNP message without transmitting the DNP message until the integrity verification is completed for the purpose of removing the forgery-fugged message, so that the transmission time of 0.245 sec at the maximum increases per frame . If the DNP message verification function is implemented to send messages in real time in order to shorten the waiting time for message reception, the DNP message modulated by the external attacker can be transmitted without completing message integrity verification, There is a risk that the station 20 may malfunction.

따라서 보안성과 전송성능을 모두 확보하기 위해서는 실시간으로 메시지를 전송하면서도 위변조 메시지가 마스터(10)나 아웃스테이션(20)에서 처리되지 않도록 하는 방법이 필요하다. Therefore, in order to secure both the security and the transmission performance, a method of transmitting a message in real time and preventing a forgery message from being processed by the master 10 or the out-station 20 is needed.

마스터(10)나 아웃스테이션(20)은 전송오류를 검출하기 위해 CRC 검증을 수행하고 CRC 검증에 실패할 경우 해당 메시지는 처리하지 않고 드롭하도록 개발되어 있다.The master 10 or the out-station 20 performs CRC verification to detect a transmission error, and if the CRC verification fails, the corresponding message is not processed and dropped.

이에, 본 실시예에서는 마스터(10)나 아웃스테이션(20)의 오류검출기능을 이용하여 DNP 메시지를 실시간으로 전송하면서도 위변조 메시지에 의해 마스터(10)나 아웃스테이션(20)이 오작동하지 않도록 한다. In this embodiment, the error detection function of the master 10 or the out station 20 is used to transmit the DNP message in real time, but the master 10 or the out station 20 does not malfunction due to a forgery message.

이를 상세히 설명하면, DNP 메시지의 첫번째 블록과 중간 블록은 실시간으로 전송함으로써 메시지 수신대기시간을 단축하고, 응용데이터의 마지막 CRC를 포함하고 있는 DNP 메시지의 마지막 블록은 다른 블록과 달리 메시지 무결성 검증결과에 따라 처리한 후 전송함으로써 위변조 메시지를 제거할 수 있다. In detail, the first block and the intermediate block of the DNP message are transmitted in real time to shorten the waiting time for receiving a message, and the last block of the DNP message including the last CRC of the application data is transmitted to the message integrity verification result It is possible to remove the forgery-and-fake message by processing after being processed.

수신 메시지가 암호와 인증 기능을 동시에 제공하는 암호 인증모드인 경우 마지막 블록을 제외한 DNP 메시지 블록은 수신과 동시에 복호화하여 마스터(10)나 아웃스테이션(20)으로 실시간으로 전송하지만, 마지막 블록은 복호화 후 무결성 검증이 완료될 때까지 전송하지 않는다. 복호된 마지막 블록은 무결성 검증과정을 마친 후 유효한 메시지만 전달하고 무결성 검증이 실패한 메시지는 마지막 블록을 임의의 데이터로 변경한 후 전송함으로써 마스터(10)나 아웃스테이션(20)의 오류검출 기능에 의해 해당 메시지가 드롭(drop)될 수 있도록 유도한다. If the received message is a password authentication mode that simultaneously provides a password and an authentication function, the DNP message block excluding the last block is decrypted at the same time as it is received and transmitted to the master 10 or the outstation 20 in real time, Do not transmit until integrity verification is completed. The final decoded block is transmitted by only valid messages after completion of the integrity verification process, and the message whose integrity verification has failed is changed to the arbitrary data by the last block and transmitted by the error detection function of the master 10 or the out- And induce the corresponding message to be dropped.

상기와 같이 본 실시예는 기존의 제어시스템의 오류검출 기능을 이용함으로써 기존 제어시스템의 변경없이 전송오류가 발생된 제어메시지 또는 외부 공격에 의해 위변조된 제어 메시지를 효율적으로 제거하여 제어시스템의 신뢰성을 확보할 수 있다. As described above, according to the present embodiment, by using the error detection function of the existing control system, it is possible to effectively remove the control message in which the transmission error occurred or the control message falsified by the external attack without changing the existing control system, .

수신 메시지가 인증 기능만 제공하는 인증모드인 경우 복호화 과정만 생략하고 암호 인증모드와 동일하게 수행한다. If the received message is an authentication mode that only provides the authentication function, the decryption process is omitted and the same operation is performed as in the password authentication mode.

수신 메시지가 비보안모드인 경우 복호화 및 무결성 검증과정을 수행하지 않고 수신과 동시에 마스터(10)나 아웃스테이션(20)으로 전달한다.If the received message is in the non-secure mode, the message is delivered to the master 10 or the out-station 20 at the same time as the reception without performing the decryption and integrity verification process.

도 5 는 본 발명의 일 실시예에 따른 DNP 메시지 수신 처리 방법을 도시한 순서도이다. 5 is a flowchart illustrating a DNP message reception processing method according to an embodiment of the present invention.

도 5 를 참조하면, DNP 메시지의 첫번째 블록 처리과정은 먼저 블록분석부(42)가 마스터(10)나 아웃스테이션(20)이 전송한 DNP 블록을 시리얼 인터페이스(41)를 통해 수신한다(S302).5, the first block process of the DNP message is firstly performed by the block analyzer 42 through the serial interface 41, which receives the DNP block transmitted from the master 10 or the out station 20 (S302) .

블록식별모듈(424)은 타입 1이고 수신한 데이터가 DNP 데이터의 식별코드를 포함하는 DNP 프레임의 첫 번째 데이터 블록인지 확인한다(S304). 블록식별모듈(424)은 이때 수신한 데이터가 DNP 데이터의 식별코드를 포함하는 DNP 프레임의 첫 번째 데이터 블록이면 해당 데이터를 블록저장모듈(422)에 추가한다(S306). The block identification module 424 determines whether the received data is the first data block of the DNP frame including the identification code of the DNP data (S304). If the received data is the first data block of the DNP frame including the identification code of the DNP data, the block identification module 424 adds the corresponding data to the block storage module 422 (S306).

한편, 상기한 단계(S304)에서, 타입 1이 아니고 수신한 데이터가 DNP 데이터의 식별코드를 포함하는 DNP 프레임의 첫 번째 데이터 블록이 아니면, 블록저장모듈(422)에 이전에 수신한 데이터가 존재하는지 여부를 판단하고(S308), 이때 이전에 수신한 데이터가 없는 경우에는 수신데이터를 에러 데이터로 판단하여 수신한 데이터를 드롭하고, 이전 데이터가 있는 경우에는 중간 블록으로 판단하여 수신데이터 저장부에 추가한다(S310). 이에 대해서는 중간 블록 처리과정에서 설명한다. If it is determined in step S304 that the received data is not the first data block of the DNP frame including the identification code of the DNP data, the previously received data exists in the block storage module 422 (S308). If there is no previously received data, it is determined that the received data is error data and the received data is dropped. If there is previous data, it is determined that the received data is an intermediate block. (S310). This will be explained in the intermediate block process.

한편, DNP 식별코드를 포함하는 첫 번째 데이터 블록인 경우, 수신된 데이터가 설정된 길이로 수신이 끝났는지를 판단하고(S312), 판단 결과 설정된 길이로 수신되었으면, 블록식별모듈(424)은 DNP 데이터링크의 헤더 정보를 분석하여 프레임의 전체 길이를 계산(S316)하고 Secure 헤더이후의 데이터를 인증데이터 저장모듈(421)에 저장하고, 운용모드를 결정한다(S318). 여기서, 수신된 데이터가 설정된 길이 이상 수신한 경우 타입 설정값을 2로 변경한다(S314).If it is the first data block including the DNP identification code, it is determined whether the received data is received in the predetermined length (S312). If the received data is received in the predetermined length, the block identification module 424 transmits the DNP data link The entire length of the frame is calculated (S316), the data after the secure header is stored in the authentication data storage module 421, and the operation mode is determined (S318). Here, if the received data is received for a predetermined length or longer, the type setting value is changed to 2 (S314).

이때 블록식별모듈(424)은 블록저장모듈(422)에 저장된 수신 데이터의 길이가 기 설정된 길이, 예를 들어 15바이트 이상인지 판단(S320)하고, 수신 데이터의 길이가 설정 길이보다 작은 경우에는 시리얼 인터페이스(41)에서 데이터를 추가로 수신(S302)한다. At this time, the block identification module 424 determines whether the length of the received data stored in the block storage module 422 is a predetermined length, for example, 15 bytes or more (S320). If the length of the received data is smaller than the set length, And further receives data from the interface 41 (S302).

한편, 단계(S312)에서, 수신된 데이터가 설정된 길이로 수신이 끝났으면 단계(S318)을 수행한다. On the other hand, if the received data is received in the set length in step S312, step S318 is performed.

Secure헤더 처리모듈(423)은 CRC 검증과 Secure헤더 분석을 통해 수신한 데이터의 보안통신모드를 분석하여 운용모드가 무엇인지를 확인한다(S322). The secure header processing module 423 analyzes the secure communication mode of the received data through the CRC verification and the secure header analysis to check what the operation mode is (S322).

보안통신모드 분석이 끝나면 보안처리부(44)는 복호를 하기 위해 수신한 데이터 블록의 크기를 분석한다. 첫번째 블록의 복호 처리를 위해서는 블록사이즈만큼의 데이터가 필요하다. When the security communication mode analysis is completed, the security processing unit 44 analyzes the size of the received data block for decoding. In order to decode the first block, data corresponding to the block size is required.

따라서, 블록분석부(42)는 블록저장모듈(422)에 누적된 데이터 중 Secure 헤더 이후의 데이터 크기와 블록사이즈를 비교하여 Secure 헤더 이후의 데이터 크기가 블록사이즈 이상인지 판단한다(S324).Accordingly, the block analyzer 42 compares the data size after the Secure header with the block size among the data accumulated in the block storage module 422 and determines whether the data size after the Secure header is greater than or equal to the block size (S324).

수신 데이터 크기가 블록사이즈보다 작은 경우 시리얼 인터페이스(41)로부터 데이터를 추가로 수신(S302)하고, Secure 헤더 이후의 데이터가 블록사이즈 이상이면 수신한 데이터를 잘라내어(S326) 블록사이즈의 배수 만큼을 보안처리부(44)로 전달하고, 보안처리부(44)로 전달되고 남은 데이터를 블록저장모듈(422)에 기록하여 다음 데이터 블록 수신시 함께 보안처리할 수 있도록 관리한다. If the received data size is smaller than the block size, the data is further received from the serial interface 41 (S302). If the data after the secure header is larger than the block size, the received data is cut off (S326) And transfers the remaining data to the security processing unit 44 and writes the remaining data in the block storage module 422 to manage security processing together with the next data block.

보안처리부(44)의 암호모듈(441)은 블록분석부(42)를 통해 전달받은 블록사이즈의 데이터를 보안모듈부(43)가 관리하는 암호라이브러리와 보안키를 이용하여 복호화(S328)한 후 복호된 데이터를 인증데이터 저장모듈(421)에 복사한다(S330).The cryptographic module 441 of the security processing unit 44 decrypts the data of the block size received via the block analyzing unit 42 using the cryptographic library managed by the security module unit 43 and the secret key (S328) And copies the decrypted data to the authentication data storage module 421 (S330).

이어 블록분석부(42)는 블록저장모듈(422)의 데이터크기가 계산된 DNP 메시지 길이와 같은지 여부를 판단한다(S332). 판단 결과, 블록저장모듈(422)의 데이터 크기와 계산된 DNP 메시지 길이가 같으면, 수신한 데이터 블록이 DNP 프레임의 첫번째 블록이자 마지막 블록인 경우이므로, 보안처리부(44)는 인증데이터의 해쉬 데이터를 계산하고(S334), 수신된 해쉬 데이터와 계산된 해쉬 데이터가 같은지 여부를 판단(S336)하여 메시지 무결성 검증기능을 수행한다. 즉, 수신한 값과 계산된 해쉬값이 같은 경우 정상적인 메시지이므로 해당 메시지를 전달 데이터 저장부에 저장(S338)하고, 데이터링크 헤더와 Secure 헤더를 제외한 복호 데이터를 마스터 또는 아웃스테이션으로 전송(S344)한 후, 블록저장모듈(422), 인증데이터 저장모듈(421) 및 기타 설정값을 초기화한다. 단계(S336)에서의 판단 결과, 수신한 값과 계산된 해쉬값이 다른 경우 전송오류에 의해 변경되거나 외부 공격에 위해 위변조된 메시지이므로 마지막 블록을 임의의 데이터로 변경하여 전송(S340,S344)함으로써 Master나 Oustation이 해당 DNP 프레임을 드롭하도록 유도하고 블록저장모듈(422), 인증데이터 저장모듈(421) 및 기타 설정 값을 초기화한다. The block analyzer 42 then determines whether the data size of the block storage module 422 is equal to the calculated DNP message length (S332). As a result of the determination, if the data size of the block storage module 422 is equal to the calculated DNP message length, the received data block is the first block and the last block of the DNP frame. Therefore, the security processing unit 44 stores the hash data of the authentication data (S334), and determines whether the received hash data is the same as the calculated hash data (S336), and performs a message integrity verification function. That is, if the received value is the same as the calculated hash value, it is a normal message. Therefore, the corresponding message is stored in the transmission data storage unit (S338), and decoded data excluding the data link header and the secure header are transmitted to the master or out station (S344) And initializes the block storage module 422, the authentication data storage module 421, and other setting values. As a result of the determination in step S336, if the received value is different from the calculated hash value, the message is changed due to a transmission error or is falsified in response to an external attack, so that the last block is changed to arbitrary data and transmitted (S340, S344) Master or Oustation causes the corresponding DNP frame to be dropped, and initializes the block storage module 422, the authentication data storage module 421, and other setting values.

한편, 상기한 단계(S332)에서, 수신데이터 저장부의 크기가 계산된 DNP 메시지 길이가 다른 경우에는 다음 데이터 블록이 존재한다는 의미이므로, 보안처리부(44)는 복호화된 데이터를 전달 데이터 저장부에 저장(S342)하고 데이터링크 헤더와 함께 시리얼 인터페이스(41)를 통해 마스터(10)나 아웃스테이션(20)으로 전송한다(S344). If the size of the received data storage unit is different from the calculated DNP message length in step S332, the security processing unit 44 stores the decrypted data in the transfer data storage unit (S342) and transmits it to the master 10 or the out-station 20 via the serial interface 41 together with the data link header (S344).

다음으로 DNP 메시지의 중간 블록 처리 과정과, 마지막 블록 처리 과정에 있어서, 상기한 첫번째 데이터 블록 처리 과정과 동일한 부분에 대해서는 그 상세한 설명을 생략한다. In the intermediate block processing and the last block processing of the DNP message, the same parts as those of the first data block processing will be described in detail.

DNP 메시지의 중간 블록 처리과정은 먼저 블록식별모듈(424)이 상기의 첫블록 처리과정과 동일하게 블록 위치 확인과정을 거친 후 수신데이터를 블록저장모듈(422)에 추가한다(S302, S304, S306). 첫 번째 데이터 블록이 아닌 경우에는 블록저장모듈(422)에 이전에 수신한 데이터 존재 하는지 여부를 판단(S308)해서 이전에 수신한 데이터가 없는 경우 수신데이터를 에러 데이터로 판단해 수신된 데이터를 드롭하고 이전 데이터가 있는 경우에는 중간블록으로 판단하여 블록저장모듈(422)에 추가한다(S310). In the intermediate block process of the DNP message, the block identification module 424 first adds the received data to the block storage module 422 after performing the block position check process in the same manner as the first block process (S302, S304, S306 ). If the block is not the first data block, the block storage module 422 determines whether previously received data exists (S308). If there is no previously received data, the received data is determined to be error data, If there is previous data, it is determined as an intermediate block and added to the block storage module 422 (S310).

참고로, 중간 블록 처리과정에서 상기한 첫번째 블록 처리 과정과 동일한 부분은 그 상세한 설명을 생략한다. For the sake of brevity, the detailed description of the same parts of the intermediate block processing as those of the first block processing will be omitted.

한편, 수신 데이터의 타입은 상기의 첫번째 블록 처리과정에 의해 2로 설정이 되어 있으며, 블록저장모듈(422)에 누적된 데이터의 크기가 첫번째 블록 처리과정에서 계산된 DNP 프레임 길이보다 작은 경우 첫번째 블록 처리과정에서 결정된 보안모드에 따라 보안처리부(44)가 중간 블록에 대한 복호화를 수행한다(S328). If the size of the data accumulated in the block storage module 422 is smaller than the DNP frame length calculated in the first block process, the type of the received data is set to 2 by the first block process, The security processing unit 44 decrypts the intermediate block according to the security mode determined in the process (S328).

이 경우, 블록식별모듈(424)은 DNP 프레임의 길이 이상 수신되었는지를 확인(S312)한 이후에 타입 설정 값을 3으로 변경한다(S314). In this case, the block identification module 424 changes the type setting value to 3 (S314) after confirming whether or not the length of the DNP frame has been received (S312).

블록분석부(42)는 블록저장모듈(422)의 추가 수신데이터 크기(마스터 또는 아웃스테이션으로 전송된 데이터 이후 수신데이터 크기)와 블록 크기를 비교한다. 추가 수신데이터가 블록 사이즈보다 작은 경우 시리얼 데이터를 다시 수신하여 블록저장모듈(422)에 추가한다. 블록저장모듈(422)의 추가 수신데이터 크기가 블록 사이즈보다 큰 경우에는 추가 수신데이터 중 블록사이즈의 배수에 해당하는 데이터를 보안처리부(44)로 전송한다. 보안처리부(44)는 보안모듈부(43)가 관리하는 암호 알고리즘과 보안키를 이용하여 복호화(S28)하고 데이터를 인증데이터 저장모듈(421)에 저장한다(S330). The block analyzer 42 compares the block size with an additional received data size of the block storage module 422 (received data size after the data transmitted to the master or out station). If the additional received data is smaller than the block size, the serial data is received again and added to the block storage module 422. If the additional received data size of the block storage module 422 is larger than the block size, the data corresponding to a multiple of the block size of the additional received data is transmitted to the security processing unit 44. The security processing unit 44 decrypts the data using the encryption algorithm managed by the security module unit 43 and the security key (S28), and stores the data in the authentication data storage module 421 (S330).

블록분석부(42)는 블록저장모듈(422)의 데이터크기와 계산된 DNP 보안 프레임의 크기를 비교한다(S332). 블록저장모듈(422)의 데이터 크기가 계산된 DNP 보안 프레임 크기보다 작은 경우 복호화된 데이터를 마스터(10)나 아웃스테이션(20)으로 전송(S344)한다. 이후 수신된 데이터는 DNP 프레임의 마지막 블록 전까지 상기한 과정을 반복한다. The block analyzer 42 compares the data size of the block storage module 422 with the size of the calculated DNP security frame (S332). When the data size of the block storage module 422 is smaller than the calculated DNP security frame size, the decrypted data is transmitted to the master 10 or the outstation 20 (S344). The received data is then repeated until the last block of the DNP frame.

다음으로, DNP 메시지의 마지막 블록 처리과정은 블록식별모듈(424)이 상기한 처리 과정과 동일하게 블록 위치 확인과정을 거친 후 수신데이터를 블록저장모듈(422)에 추가한다(S302,S304,S306). 이때 수신 데이터의 타입 설정 값은 상기의 중간 블록 처리과정에 의해 3으로 설정되어 있으며, 블록저장모듈(422)의 데이터크기와 계산된 DNP 보안 프레임의 크기를 비교(S320)하여 같은 경우 타입 설정 값을 4로 변경한다. Next, the last block process of the DNP message is performed by the block identification module 424, and the received data is added to the block storage module 422 after the block location process is performed in the same manner as described above (S302, S304, S306 ). At this time, the type setting value of the received data is set to 3 by the intermediate block processing, and the data size of the block storage module 422 is compared with the size of the calculated DNP security frame (S320) To 4.

보안처리부(44)는 암호모듈(441)을 이용하여 마지막 블록을 복호화(S328)한 후 복호 데이터를 인증데이터 저장모듈(421)에 보관한다(S330). The security processing unit 44 decrypts the last block using the cryptographic module 441 (S328) and stores the decrypted data in the authentication data storage module 421 (S330).

복호화과정 종료 후 보안처리부(44)는 암호모듈(441)을 이용하여 무결성 검증과정을 수행하여 유효한 메시지만 마스터(10)나 아웃스테이션(20)으로 전달(S344)하고 무결성 검증이 실패한 메시지는 임의의 데이터로 변경(S340)한 후 전송(S344)함으로써 마스터(10)나 아웃스테이션(20)의 전송오류검출기능을 이용하여 해당 메시지를 드롭시키도록 유도한다. After completion of the decryption process, the security processing unit 44 performs an integrity verification process using the cryptographic module 441 to forward only valid messages to the master 10 or the out-station 20 (S344). If the integrity verification fails, (S340), and then the message is transmitted (S344), thereby causing the master 10 or the out-station 20 to drop the corresponding message using the transmission error detection function.

여기서, 메시지 무결성 검증은 인증데이터 저장모듈(421)의 데이터를 대상으로 해쉬값을 계산한 후 블록저장모듈(422)의 인증데이터와 비교(S336)하는 과정을 통해 이루어진다. 수신한 값과 계산된 해쉬값이 같은 경우 정상적인 메시지이므로 데이터링크 헤더와 Secure 헤더를 제외한 복호 데이터를 마스터(10)나 아웃스테이션(20)으로 전송(S344)하고 블록저장모듈(422), 인증데이터 저장모듈(421) 및 기타 설정값을 초기화한다. 수신한 값과 계산된 해쉬값이 다른 경우 전송 오류에 의해 변경되거나 외부 공격에 위해 위변조된 메시지이므로 마지막 블록을 임의의 데이터로 변경하여 전송(S340,S344)함으로써 마스터(10)나 아웃스테이션(20)이 해당 DNP 프레임을 드롭하도록 유도하고 블록저장모듈(422), 인증데이터 저장모듈(421) 및 기타 설정 값을 초기화한다. Here, the message integrity verification is performed through a process of calculating the hash value of the data of the authentication data storage module 421 and comparing the hash value with the authentication data of the block storage module 422 (S336). If the received value and the calculated hash value are the same, it is a normal message. Therefore, decoded data excluding the data link header and the secure header are transmitted to the master 10 or the out station 20 (S344), and the block storage module 422, And initializes the storage module 421 and other setting values. If the received value is different from the calculated hash value, the message is changed due to transmission error or falsified for external attack. Therefore, the last block is changed to arbitrary data and transmitted (S340, S344) To drop the corresponding DNP frame, and initializes the block storage module 422, the authentication data storage module 421, and other set values.

본 실시예에서, 암호 인증모드로 동작하는 보안통신장치(40)의 DNP 메시지 실시간 수신(DNP 메시지 실시간 검증)처리 과정은 암호화를 위한 수신데이터 크기 분석 과정과 암호화 과정을 제외하면 암호 인증모드와 동일하다. In the present embodiment, the process of real-time DNP message reception (DNP message real-time verification) processing of the secure communication device 40 operating in the password authentication mode is the same as the password authentication mode except for the process of analyzing the received data size for encryption and the encryption process Do.

또한, 본 실시예에서, 비보안모드로 동작하는 보안통신장치(40)의 DNP 메시지 실시간 수신과정에서, 보안처리부(44)는 데이터가 비보안모드인 경우 수신과 동시에 수신한 데이터를 마스터(10)나 아웃스테이션(20)으로 전송한다. Also, in this embodiment, in the real-time reception process of the DNP message of the secure communication device 40 operating in the unsecured mode, the security processing unit 44 transmits the data received at the same time as the reception to the master 10 To the out-station (20).

한편, 상기에서 설명한 발명은 다양한 실시예로 구현될 수 있다. 예를 들어, 수신된 데이터 블록이 DNP 프레임에서의 위치를 분석하는 방법, 수신된 데이터 모드의 보안통신모드의 구분, 데이터 실시간 처리과정에서 메시지 무결성 보장을 위한 데이터 변경 등은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 방식으로 변형 및 갱신이 가능하므로 전술한 실시예 및 첨부된 도면에 한정되는 것이 아니다. 또한, 본 실시예는 전력제어시스템의 데이터링크 계층에서의 프레임 실시간 전송방법 및 보안기능 구현방법에 국한하여 설명되어 있지만 간단한 분석 과정과 데이터 실시간 처리를 통해 데이터 전송시간 단축이 가능한 프로토콜에 모두 적용 가능하다. Meanwhile, the above-described invention can be implemented in various embodiments. For example, the method of analyzing the position of the received data block in the DNP frame, the classification of the secure communication mode of the received data mode, and the data modification for ensuring the message integrity in the data real- It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Also, although the present embodiment is described only in the frame real-time transmission method and the security functional implementation method in the data link layer of the power control system, it can be applied to a protocol that can shorten the data transmission time through a simple analysis process and data real- Do.

이와 같은 본 실시예는 DNP(IEEE 1815)기반 전력자동화 서비스의 안전하고 안정적인 운영에 있어 데이터의 무결성과 기밀성을 보장하면서 보안기능 수행으로 인한 전송시간 증가를 최소화할 수 있다.This embodiment can minimize the increase of transmission time due to the security function while ensuring the integrity and confidentiality of data in the safe and stable operation of DNP (IEEE 1815) based power automation service.

본 실시예는 데이터 보호를 위해 적용되는 보안모드에 따라 제어 데이터를 실시간으로 전송하여 메시지 처리시간을 최소화하고, 통신자원 소모 및 하드웨어 리소스 소모를 방지할 수 있다.In this embodiment, the control data is transmitted in real time according to the security mode applied for data protection, thereby minimizing message processing time, and preventing communication resource consumption and hardware resource consumption.

본 실시예는 데이터 무결성 검증이 완료되지 않은 데이터들도 실시간 처리가 가능하도록 메시지를 검증하고 훼손된 제어데이터 처리함으로써 DNP 보안 메시지의 전송성능을 크게 향상시킬 수 있다. The present embodiment can significantly enhance the transmission performance of the DNP security message by verifying the message and processing the corrupted control data so that the data whose data integrity verification has not been completed can be processed in real time.

본 실시예는 기존의 보안 프로토콜과 별도로 운영되는 것이 아니라 보안 메시지의 특성에 따라 실시간 처리하는 방식을 통해 데이터 전송시간의 증가를 최소화할 수 있다. The present embodiment can minimize an increase in data transmission time through a method of real-time processing according to the characteristics of security messages, rather than operating separately from existing security protocols.

10: 마스터
20: 아웃스테이션
30: 보안서버
40: 보안통신장치
41: 시리얼 인터페이스
42: 블록분석부
421: 인증데이터 저장모듈
422: 블록저장모듈
423: Secure 헤더 처리모듈
424: 블록식별모듈
43: 보안모듈부
431: 암호 라이브러리
432: 보안정책관리 모듈
44: 보안처리부
441: 암호모듈
442: 인증모듈
45: 이더넷 인터페이스
10: Master
20: Out station
30: Security server
40: Secure communication device
41: Serial interface
42: block analysis unit
421: Authentication data storage module
422: Block storage module
423: Secure header processing module
424: Block identification module
43: Security module section
431: Password Library
432: Security Policy Management Module
44:
441: Cryptographic module
442: Authentication module
45: Ethernet interface

Claims (21)

DNP(Distribute Network Protocol) 메시지를 송수신하는 시리얼 인터페이스;
상기 시리얼 인터페이스를 통해 송수신되는 상기 DNP 메시지를 첫번째 블록, 중간 블록 및 마지막 블록으로 구분하여 블록별로 분석하고 관리하는 블록분석부;
상기 블록분석부에 의해 블록화된 상기 DNP 블록의 암호화를 위해 암호 라이브러리를 제공하고, 보안키와 보안정책의 관리를 담당하는 보안모듈부; 및
상기 보안처리부로부터 전달받은 암호 라이브러리를 이용하여 상기 DNP 블록을 암호화하고 인증 처리하는 보안처리부를 포함하는 DNP 메시지의 보안통신장치.
A serial interface for transmitting and receiving a DNP (Distribute Network Protocol) message;
A block analyzer for analyzing and managing the DNP message transmitted / received through the serial interface by a block, an intermediate block, and a last block;
A security module for providing an encryption library for encrypting the DNP block blocked by the block analyzer and managing a security key and a security policy; And
And a security processing unit for encrypting and authenticating the DNP block using the encryption library transmitted from the security processing unit.
제 1 항에 있어서, 상기 블록분석부는
상기 DNP 블록의 위치와 보안운영모드를 관리하는 블록식별모듈;
상기 블록식별모듈의 보안운영모드에 따라 상기 DMP 메시지의 Secure 헤더를 추가 및 검증하는 Secure 헤더 처리모듈;
상기 DNP 블록을 저장하는 블록저장모듈; 및
상기 DNP 블록의 메시지인증코드 생성을 위해 인증대상 데이터를 저장하는 인증데이터 저장모듈을 포함하는 것을 특징으로 하는 DNP 메시지의 보안통신장치.
The apparatus of claim 1, wherein the block analyzer
A block identification module for managing the location of the DNP block and the secure operating mode;
A secure header processing module for adding and verifying a secure header of the DMP message according to a security operation mode of the block identification module;
A block storage module for storing the DNP block; And
And an authentication data storage module for storing authentication target data for generating a message authentication code of the DNP block.
제 2 항에 있어서, 상기 블록식별모듈은
상기 DNP 블록을 분석하여 상기 DNP 블록의 DNP 프레임 내 위치와 처리상태를 타입으로 관리하는 것을 특징으로 하는 DNP 메시지의 보안통신장치.
3. The apparatus of claim 2, wherein the block identification module
And analyzes the DNP block to manage the position and processing state of the DNP block in the DNP frame as a type.
제 3 항에 있어서, 상기 타입은 타입 1, 타입 2, 타입 3 및 타입 4로 구분되고, 상기 타입 1은 초기 값으로 데이터 링크 헤더를 포함하는 첫 번째 블록을 나타내고, 상기 타입 2는 응용계층 데이터를 포함하는 중간 블록을 의미하며, 상기 타입 3은 상기 DNP 메시지 수신시에만 사용되는 타입으로, 데이터 크기가 DNP 보안통신모드와 암호 알고리즘에 의해 추가되는 Secure 헤더, 암호 패딩, 해쉬 데이터 크기 이상이 되는 경우에는 타입 설정값이 4로 변경되며, 상기 타입 4는 DNP 메시지가 수신 완료되었음을 나타내는 것을 특징으로 하는 DNP 메시지의 보안통신장치. 4. The method of claim 3, wherein the type is classified into Type 1, Type 2, Type 3, and Type 4, the Type 1 indicates a first block including a data link header as an initial value, Type 3 is a type used only when receiving the DNP message, and the data size is greater than or equal to a Secure header, a password padding, and a hash data size added by the DNP secure communication mode and the encryption algorithm. The type setting value is changed to 4, and the type 4 indicates that the DNP message has been received. 제 4 항에 있어서, 상기 블록식별모듈은 상기 타입이 상기 타입 1로 설정되어 있으면 상기 DNP 블록이 DNP 식별코드를 포함하고 있는지 여부를 검사하고, DNP 프레임 전체 길이를 계산한 후 상기 블록저장모듈의 데이터 크기가 기 설정된 크기 이상이 되면 상기 타입 1에서 상기 타입 2로 변경하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. The method of claim 4, wherein the block identification module checks whether the DNP block includes a DNP identification code if the type is set to the type 1, calculates a total DNP frame length, And changing from the type 1 to the type 2 when the data size is greater than a predetermined size. 제 4 항에 있어서, 상기 DNP 메시지 전송시, 상기 타입이 상기 타입 2로 설정된 경우에는, 상기 블록식별모듈은 상기 첫 번째 블록에서 계산된 DNP 길이 정보를 참조하여 상기 블록저장모듈의 데이터 크기가 DNP 길이 이상이 되면 상기 타입 2에서 상기 타입 4로 변경하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. The method of claim 4, wherein when the type is set to the type 2, the block identification module refers to the DNP length information calculated in the first block, and if the data size of the block storage module is DNP And changing the type from the type 2 to the type 4 if the length exceeds the predetermined length. 제 4 항에 있어서, 상기 DNP 메시지 수신시, 상기 타입이 상기 타입 2로 설정된 경우에는, 상기 블록식별모듈은 상기 첫 번째 블록에서 계산된 DNP 길이 정보를 참조하여 상기 블록저장모듈의 데이터 크기가 DNP 길이 이상이 되면 상기 타입 2를 상기 타입 3으로 변경하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. 5. The method of claim 4, wherein upon receiving the DNP message, if the type is set to the type 2, the block identification module refers to the DNP length information calculated in the first block, And changing the type 2 to the type 3 if the length of the type 2 is greater than the length of the DNP message. 제 4 항에 있어서, 상기 블록식별모듈은 상기 타입이 상기 타입 3인 경우 상기 DNP 메시지 검증을 위한 추가 데이터의 수신이 완료되면 상기 타입 3을 타입 4로 변경하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. 5. The method according to claim 4, wherein, when the type is the type 3, the block identification module changes the type 3 to type 4 when the receiving of the additional data for verifying the DNP message is completed. Device. 제 4 항에 있어서, 상기 블록식별모듈은 상기 타입이 상기 타입 4인 경우 상기 DNP 블록을 처리한 후 상기 타입 4를 상기 타입 1로 초기화하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. 5. The apparatus of claim 4, wherein the block identification module processes the DNP block and initializes the type 4 to the type 1 when the type is the type 4. 제 2 항에 있어서, 상기 Secure헤더 처리모듈은 상기 보안모듈부의 보안정책을 참조하여 보안모드를 결정한 후 결정된 보안모드에 따라 Secure 헤더 필드를 생성하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. 3. The apparatus of claim 2, wherein the secure header processing module determines a security mode by referring to the security policy of the security module, and generates a secure header field according to the determined security mode. 제 1 항에 있어서, 상기 보안처리부는
상기 보안모듈부에서 제공하는 암호 알고리즘과 보안키를 이용하여 상기 DNP 블록에 대한 데이터 암호기능을 제공하는 암호 모듈; 및
데이터 인증 기능을 제공하는 인증 모듈을 포함하는 것을 특징으로 하는 DNP 메시지의 보안통신장치.
The apparatus of claim 1, wherein the security processing unit
A cryptographic module for providing a data encryption function for the DNP block using an encryption algorithm and a security key provided by the security module; And
And an authentication module for providing a data authentication function.
제 1 항에 있어서, 상기 보안처리부는 인증 기능을 제공하는 인증모드에서는 상기 첫번째 블록과 상기 중간 블록을 마스터 또는 아웃스테이션으로 전송하고, 상기 블록분석부모듈에 저장되어 있는 전체 DNP 프레임에 대한 메시지 인증 코드를 생성한 후, 상기 메시지 인증코드를 상기 마지막 블록에 추가하여 상기 마스터 또는 상기 아웃스테이션으로 전송하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. 2. The method according to claim 1, wherein the security processing unit transmits the first block and the intermediate block to a master or an out station in an authentication mode for providing an authentication function, And the message authentication code is added to the last block and transmitted to the master or the out-station. 제 1 항에 있어서, 상기 보안처리부는 메시지 암호와 인증 기능을 제공하는 암호 인증모드에서는 상기 첫번째 블록과 상기 중간 블록을 상기 블록분석부에 복사한 후, 상기 첫번째 블록 및 상기 중간 블록을 암호화하여 마스터나 아웃스테이션으로 전송하고, 상기 마지막 블록을 암호화하여 상기 블록분석부에 저장되어 있는 인증영역 데이터에 대한 메시지 인증 코드를 생성한 후 암호화된 상기 마지막 블록에 첨부하여 상기 마스터 또는 상기 아웃스테이션으로 전송하는 것을 특징으로 하는 DNP 메시지의 보안통신장치. The method according to claim 1, wherein the security processing unit copies the first block and the intermediate block to the block analysis unit in a password authentication mode in which the message encryption and authentication functions are provided, and then encrypts the first block and the intermediate block, To the out-station, encrypts the last block, generates a message authentication code for the authentication area data stored in the block analyzer, and transmits the message authentication code to the master or the out-station by attaching the message to the master Wherein the DNP message is a secure communication device. 메시지 암호와 인증 기능을 제공하는 암호 인증모드에서 DNP 블록을 수신하는 제1단계;
수신된 상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 제2단계; 및
상기 식별 결과에 따라, 상기 첫번째 블록과 상기 중간 블록을 암호화하여 전송하고, 상기 마지막 블록을 암호화하고 메시지 인증 코드를 생성한 후 상기 메시지 인증 코드를 암호화된 상기 마지막 블록에 첨부하여 전송하는 제3단계를 포함하는 DNP 메시지의 보안통신방법.
A first step of receiving a DNP block in a password authentication mode that provides a message password and an authentication function;
A second step of identifying the received DNP block as one of a first block, an intermediate block, and a last block; And
Encrypting and transmitting the first block and the intermediate block according to the identification result, encrypting the last block, generating a message authentication code, attaching the message authentication code to the last encrypted block, and transmitting the message A method for secure communication of a DNP message comprising:
제 14 항에 있어서, 상기 제3단계는 상기 DNP 블록이 상기 첫번째 블록이면,
보안정책을 참조하여 보안모드를 결정하고, 결정된 보안모드에 따라 Secure 헤더 필드를 생성하여 데이터링크 헤더 CRC 앞에 추가한 후 변경된 데이터를 저장하는 단계;
변경된 상기 데이터 중 Secure 헤더 이후의 데이터 크기와 암호 알고리즘의 입출력 크기를 비교하여 수신 데이터 크기가 상기 암호 알고리즘의 입출력 크기보다 크면, 블록사이즈 만큼의 데이터 암호라이브러리와 보안키를 이용하여 상기 첫번째 블록을 암호화한 후 DNP 데이터링크의 헤더와 함께 상기 마스터 또는 상기 아웃스테이션으로 전송하는 단계를 포함하는 것을 특징으로 하는 DNP 메시지의 보안통신방법.
15. The method of claim 14, wherein the third step comprises: if the DNP block is the first block,
Determining a security mode by referring to the security policy, generating a Secure header field according to the determined security mode, adding the Secure header field before the data link header CRC, and storing the changed data;
When the received data size is larger than the input / output size of the encryption algorithm, the data encryption library and the security key are used to encrypt the first block, And transmitting the DNP message to the master or the out-station together with the header of the DNP data link.
제 15 항에 있어서, 상기 제3단계는 상기 DNP 블록이 상기 중간 블록이면,
상기 첫번째 블록 처리 과정에서 암호화된 데이터 이후부터의 추가 데이터 크기가 암호 알고리즘의 입출력 크기보다 크면, 상기 암호 알고리즘의 입출력 크기만큼의 데이터를 암호라이브러리와 보안키를 이용하여 암호화하는 것을 특징으로 하는 DNP 메시지의 보안통신방법.
16. The method of claim 15, wherein if the DNP block is the intermediate block,
And encrypting data corresponding to an input / output size of the encryption algorithm using an encryption library and a secret key if the additional data size after the encrypted data in the first block process is larger than the input / output size of the encryption algorithm. .
제 16 항에 있어서, 상기 제3단계는 상기 DNP 블록이 상기 마지막 블록이면,
상기 마지막 블록이 상기 암호 알고리즘의 입출력 크기보다 작으면 상기 추가 수신데이터에 패딩 데이터를 추가하여 암호화하고, 상기 추가 수신데이터가 상기 암호 알고리즘의 입출력 크기와 같으면 상기 패딩 데이터를 추가하지 않고 암호화한 후, 상기 인증데이터저장모듈에 저장된 데이터를 대상으로 메시지인증코드를 생성하며, 생성된 메시지인증코드를 상기 마지막 블록에 추가하여 전송하는 것을 특징으로 하는 DNP 메시지의 보안통신방법.
17. The method as claimed in claim 16, wherein the third step comprises: if the DNP block is the last block,
If the last block is smaller than the input / output size of the encryption algorithm, adding the padding data to the additional reception data and encrypting the additional reception data, and if the additional reception data is equal to the input / output size of the encryption algorithm, Generating a message authentication code for data stored in the authentication data storage module, and adding the generated message authentication code to the last block and transmitting the message.
인증 기능을 제공하는 인증모드에서 DNP 블록을 수신하는 제1단계;
수신된 상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 제2단계; 및
상기 식별 결과에 따라, 상기 첫번째 블록과 상기 중간 블록을 마스터 또는 아웃스테이션으로 전송하고, 상기 블록분석부모듈에 저장되어 있는 전체 DNP 프레임에 대한 메시지 인증 코드를 생성한 후, 생성된 상기 메시지 인증 코드를 이용하여 무결성 검증과정을 수행한 후 상기 마스터 또는 아웃스테이션으로 전송하는 제3단계를 포함하는 DNP 메시지의 보안통신방법.
A first step of receiving a DNP block in an authentication mode providing an authentication function;
A second step of identifying the received DNP block as one of a first block, an intermediate block, and a last block; And
The first block and the intermediate block are transmitted to the master or out station according to the identification result, a message authentication code for the entire DNP frame stored in the block analysis module is generated, And a third step of transmitting the DNP message to the master or the out-station.
상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 단계;
상기 첫번째 블록과 상기 중간 블록을 마스터나 아웃스테이션으로 실시간으로 전송하는 단계; 및
상기 마지막 블록을 메시지 무결성 검증결과에 따라 처리한 후 상기 마스터 또는 아웃스테이션으로 전송하는 단계를 포함하는 DNP 메시지의 보안통신방법.
Identifying the DNP block as either a first block, an intermediate block, or a last block;
Transmitting the first block and the intermediate block to the master or out station in real time; And
Processing the last block according to the message integrity verification result, and transmitting the final block to the master or out station.
제 19 항에 있어서, 상기 마지막 블록을 메시지 무결성 검증결과에 따라 처리한 후 상기 마스터 또는 아웃스테이션으로 전송하는 단계는,
상기 무결성 검증 결과, 유효한 메시지는 전달하고, 상기 무결성 검증이 실패한 메시지는 상기 마스터 또는 상기 아웃스테이션이 상기 무결성 검증을 실패한 상기 메시지를 드롭(drop)시키도록 상기 마지막 블록을 임의의 데이터로 변경한 후 전송하는 것을 특징으로 하는 DNP 메시지의 보안통신방법.
20. The method of claim 19, wherein processing the last block according to a message integrity verification result and transmitting the final block to the master or out station comprises:
The validation message is transmitted as a result of the integrity verification, and the message in which the integrity verification has failed is changed to the arbitrary data so that the master or the out-station may drop the message that failed the integrity verification And transmitting the DNP message to the base station.
메시지 암호와 인증 기능을 제공하는 암호 인증모드에서 DNP 블록을 수신하는 제1단계;
수신된 상기 DNP 블록을 첫번째 블록, 중간 블록 및 마지막 블록 중 어느 하나로 식별하는 제2단계; 및
상기 식별 결과에 따라, 상기 첫번째 블록 또는 상기 중간 블록에 대해 복호화를 수행하고, 상기 첫번째 블록 또는 상기 중간 블록을 마스터 또는 아웃스테이션으로 전송하고, 상기 마지막 블록에 대해 복호화 및 무결성 검증을 수행하고, 상기 무결성 검증 결과에 따라 상기 마스터 또는 상기 아웃스테이션으로 전송하는 제3단계를 포함하되,
상기 제3단계는 상기 첫번째 블록 또는 상기 마지막 블록의 무결성 검증 결과에 따라, 유효한 메시지는 상기 마스터 또는 상기 아웃스테이션으로 전달하고, 상기 무결성 검증이 실패한 메시지는 상기 마스터 또는 상기 아웃스테이션이 상기 무결성 검증을 실패한 상기 메시지를 드롭(drop)시키도록 상기 마지막 블록을 임의의 데이터로 변경한 후 전송하는 것을 특징으로 하는 DNP 메시지의 보안통신방법.
A first step of receiving a DNP block in a password authentication mode that provides a message password and an authentication function;
A second step of identifying the received DNP block as one of a first block, an intermediate block, and a last block; And
Performing decoding on the first block or the intermediate block according to the identification result, transmitting the first block or the intermediate block to a master or an out station, performing decoding and integrity verification on the last block, To the master or the out-station according to a result of integrity verification,
The third step is to pass a valid message to the master or the out-station according to the integrity verification result of the first block or the last block, and the message in which the integrity verification has failed may be performed by the master or the out- And changing the last block to arbitrary data so as to drop the failed message.
KR1020140130871A 2014-09-30 2014-09-30 Secure communication apparatus and method of distribute network protocol message KR101691201B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140130871A KR101691201B1 (en) 2014-09-30 2014-09-30 Secure communication apparatus and method of distribute network protocol message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140130871A KR101691201B1 (en) 2014-09-30 2014-09-30 Secure communication apparatus and method of distribute network protocol message

Publications (2)

Publication Number Publication Date
KR20160038935A true KR20160038935A (en) 2016-04-08
KR101691201B1 KR101691201B1 (en) 2017-01-10

Family

ID=55907807

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140130871A KR101691201B1 (en) 2014-09-30 2014-09-30 Secure communication apparatus and method of distribute network protocol message

Country Status (1)

Country Link
KR (1) KR101691201B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102404066B1 (en) * 2020-09-15 2022-05-31 한전케이디엔주식회사 Security device and method for power control system
KR102390888B1 (en) * 2020-12-10 2022-04-26 주식회사 이노티움 A node device that performs mutual authentication in a blockchain network comprising a plurality of node devices, and operating method of the node device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090102469A (en) * 2008-03-26 2009-09-30 한국전기연구원 System and method for data protection and security of scada network based on dnp
KR20100012227A (en) * 2008-07-28 2010-02-08 서경대학교 산학협력단 Apparatus for analyzing distributed network protocol call
KR101339013B1 (en) * 2012-09-24 2013-12-09 한국전력공사 Method for processing multi security of dnp message in data link
KR20140043537A (en) * 2012-09-24 2014-04-10 한국전력공사 Secure communication apparatus and method for securing scada communication network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090102469A (en) * 2008-03-26 2009-09-30 한국전기연구원 System and method for data protection and security of scada network based on dnp
KR20100012227A (en) * 2008-07-28 2010-02-08 서경대학교 산학협력단 Apparatus for analyzing distributed network protocol call
KR101339013B1 (en) * 2012-09-24 2013-12-09 한국전력공사 Method for processing multi security of dnp message in data link
KR20140043537A (en) * 2012-09-24 2014-04-10 한국전력공사 Secure communication apparatus and method for securing scada communication network

Also Published As

Publication number Publication date
KR101691201B1 (en) 2017-01-10

Similar Documents

Publication Publication Date Title
CN104104510B (en) For identification to the method for the manipulation of the sensing data of sensor and/or sensor
JP6188785B2 (en) Network intrusion detection using decoy encryption key
EP2697931B1 (en) Qkd key management system
CN106572106B (en) Method for transmitting message between TBOX terminal and TSP platform
US8577036B2 (en) Method and device for transmitting messages in real time
KR101608815B1 (en) Method and system for providing service encryption in closed type network
NZ544888A (en) Methods, systems and devices for securing supervisory control and data acquisition (SCADA) communications
US11522696B2 (en) Intrusion defense system for a vehicle
WO2013026086A1 (en) Virtual zeroisation system and method
US11303453B2 (en) Method for securing communication without management of states
CN100580652C (en) Method and device for fiber-optical channel public transmission secret protection
Xiao et al. Session key distribution made practical for CAN and CAN-FD message authentication
KR102018064B1 (en) Secure communication apparatus and method for securing SCADA communication network
KR101691201B1 (en) Secure communication apparatus and method of distribute network protocol message
KR101359789B1 (en) System and method for security of scada communication network
CN100596350C (en) Method for encrypting and decrypting industrial control data
CZ301928B6 (en) Method of and device for guaranteeing the integrity and authenticity of a data file
CN116155483A (en) Block chain signing machine safety design method and signing machine
US20170310646A1 (en) Method to detect an ota (over the air) standard message affected by an error
CN104247326A (en) Field bus data transmission
CN109194490B (en) Power distribution network communication security authentication system and method
KR101339013B1 (en) Method for processing multi security of dnp message in data link
CN115398429A (en) Method for handling data anomalies, in particular in a motor vehicle
CN114047947B (en) Method for controlling program version of circuit board card with double FPGA (field programmable Gate array) architectures
CN114938304B (en) Method and system for safely transmitting industrial Internet of things data

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
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: 20191128

Year of fee payment: 4