KR102407341B1 - Method for transmitting and receiving messages of Precision Time Protocol (PTP) and apparatus therefor - Google Patents
Method for transmitting and receiving messages of Precision Time Protocol (PTP) and apparatus therefor Download PDFInfo
- Publication number
- KR102407341B1 KR102407341B1 KR1020210062565A KR20210062565A KR102407341B1 KR 102407341 B1 KR102407341 B1 KR 102407341B1 KR 1020210062565 A KR1020210062565 A KR 1020210062565A KR 20210062565 A KR20210062565 A KR 20210062565A KR 102407341 B1 KR102407341 B1 KR 102407341B1
- Authority
- KR
- South Korea
- Prior art keywords
- encryption
- ptp message
- ptp
- message
- unit
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/067—Details of the timestamp structure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3297—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
Abstract
본 발명의 정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치는 PTP 메시지를 생성하는 동기화부와, 상기 PTP 메시지를 암호화하는 제1 암호화부와, 상기 암호화된 PTP 메시지를 전송 프로토콜에 따라 인코딩하여 상기 암호화된 PTP 메시지를 포함하는 전송 프레임을 생성하는 통신스택부와, 상기 전송 프레임의 전송 직전, 상기 암호화된 PTP 메시지의 일부를 복호화한 후, 복호화된 PTP 메시지의 일부에 최신의 시간 정보를 기록한 후, 복호화된 PTP 메시지의 일부를 다시 암호화하는 제2 암호화부와, 상기 다시 암호화된 PTP 메시지를 포함하는 전송 프레임을 전송하는 송수신부를 포함한다. The apparatus for transmitting and receiving a message of the precise time protocol of the present invention includes a synchronization unit generating a PTP message, a first encryption unit encrypting the PTP message, and encoding the encrypted PTP message according to a transmission protocol to encode the encrypted PTP message. A communication stack unit for generating a transmission frame including a PTP message, immediately before transmission of the transmission frame, after decrypting a portion of the encrypted PTP message, recording the latest time information in a portion of the decrypted PTP message, and then decrypting A second encryption unit for re-encrypting a part of the encrypted PTP message, and a transceiver for transmitting a transmission frame including the re-encrypted PTP message.
Description
본 발명은 정밀 시각 프로토콜의 메시지를 송수신하기 위한 기술에 관한 것으로, 보다 상세하게는, IEEE-1588 규격에 따른 정밀 시각 프로토콜(Precision Time Protocol: PTP)의 메시지를 송수신하기 위한 방법 및 이를 위한 장치에 관한 것이다. The present invention relates to a technique for transmitting and receiving a message of a precision time protocol, and more particularly, to a method for transmitting and receiving a message of a precision time protocol (PTP) according to the IEEE-1588 standard, and an apparatus for the same it's about
정밀 시각 프로토콜(Precision Time Protocol, PTP)은 네트워크 간 정확한 동기화를 가능케하는 IEEE 1588 규격에 따른 시간 전송 프로토콜이다. 하드웨어에서 생성하는 타임스탬프를 사용할 때 나노초 단위의 정확도를 보장한다. The Precision Time Protocol (PTP) is a time transfer protocol according to the IEEE 1588 standard that enables accurate synchronization between networks. When using hardware-generated timestamps, we guarantee nanosecond accuracy.
본 발명의 목적은 전송 직전 최신의 시간 정보를 PTP 메시지에 삽입함으로써 보다 정밀한 시각 동기화가 가능하게 할 수 있는 정밀 시각 프로토콜의 메시지를 송수신하기 위한 방법 및 이를 위한 장치를 제공함에 있다. An object of the present invention is to provide a method and apparatus for transmitting and receiving a message of a precision time protocol capable of enabling more precise time synchronization by inserting the latest time information immediately before transmission into a PTP message.
상술한 바와 같은 목적을 달성하기 위한 본 발명의 바람직한 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치는 PTP 메시지를 생성하는 동기화부와, 상기 PTP 메시지를 암호화하는 제1 암호화부와, 상기 암호화된 PTP 메시지를 전송 프로토콜에 따라 인코딩하여 상기 암호화된 PTP 메시지를 포함하는 전송 프레임을 생성하는 통신스택부와, 상기 전송 프레임을 송신하기 전, 상기 암호화된 PTP 메시지의 적어도 일부를 복호화하고, 복호화된 PTP 메시지의 적어도 일부에 최신의 시간 정보를 기록한 후, 복호화된 PTP 메시지의 적어도 일부를 다시 암호화하는 제2 암호화부와, 상기 다시 암호화된 PTP 메시지를 포함하는 전송 프레임을 송신하는 송수신부를 포함한다. In order to achieve the above object, an apparatus for transmitting and receiving a message of a precision time protocol according to a preferred embodiment of the present invention includes a synchronization unit generating a PTP message, a first encryption unit encrypting the PTP message, and the A communication stack unit that encodes an encrypted PTP message according to a transport protocol to generate a transmission frame including the encrypted PTP message, and decrypts and decrypts at least a portion of the encrypted PTP message before transmitting the transmission frame A second encryption unit for re-encrypting at least a portion of the decrypted PTP message after recording the latest time information in at least a part of the encrypted PTP message, and a transceiver for transmitting a transmission frame including the re-encrypted PTP message. .
상기 제1 암호화부는 PTP 헤더 및 타임스탬프 필드를 포함하는 PTP 메시지에서 상기 타임스탬프 필드를 PTP 메시지의 나머지 부분과 구분하여 암호화하는 것을 특징으로 한다. The first encryption unit separates the timestamp field from the rest of the PTP message and encrypts the PTP message including the PTP header and the timestamp field.
상기 제1 암호화부는 PTP 헤더 및 타임스탬프 필드를 포함하는 PTP 메시지를 복수의 암호화 블록으로 구분하되, 상기 타임스탬프 필드가 메시지의 다른 부분과 구분되어 다른 암호화 블록에 속하도록 상기 PTP 헤더의 앞 및 뒤 중 적어도 하나에 패드를 부가하고, 구분된 복수의 암호화 블록 별로 암호화를 수행하는 것을 특징으로 한다. The first encryption unit divides a PTP message including a PTP header and a timestamp field into a plurality of encryption blocks, but before and after the PTP header so that the timestamp field is separated from other parts of the message and belongs to another encryption block. It is characterized in that by adding a pad to at least one of the encryption blocks and performing encryption for each of a plurality of separated encryption blocks.
상기 제1 암호화부는 구분된 복수의 암호화 블록 중 인접한 암호화 블락 간의 의존성(Dependency)이 없는 암호화 방식으로 상기 PTP 메시지를 구분된 복수의 암호화 블록 별로 암호화를 수행하는 것을 특징으로 한다. The first encryption unit encrypts the PTP message for each of the plurality of divided encryption blocks in an encryption method without dependency between adjacent encryption blocks among a plurality of divided encryption blocks.
상기 제2 암호화부는 상기 타임스탬프 필드가 속한 암호화 블록만 복호화하는 것을 특징으로 한다. The second encryption unit decrypts only the encryption block to which the timestamp field belongs.
상술한 바와 같은 목적을 달성하기 위한 본 발명의 바람직한 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 방법은 동기화부가 PTP 메시지를 생성하는 단계와, 제1 암호화부가 상기 PTP 메시지를 암호화하는 단계와, 통신스택부가 상기 암호화된 PTP 메시지를 전송 프로토콜에 따라 인코딩하여 상기 암호화된 PTP 메시지를 포함하는 전송 프레임을 생성하는 단계와, 제2 암호화부가 상기 전송 프레임의 전송 직전, 상기 암호화된 PTP 메시지의 일부를 복호화하는 단계와, 상기 제2 암호화부가 복호화된 PTP 메시지의 일부에 현재의 시간 정보를 기록하는 단계와, 상기 제2 암호화부가 복호화된 PTP 메시지의 일부를 다시 암호화하는 단계와, 송수신부가 상기 다시 암호화된 PTP 메시지를 포함하는 전송 프레임을 전송하는 단계를 포함한다. A method for transmitting and receiving a message of a precision time protocol according to a preferred embodiment of the present invention for achieving the above object includes the steps of: generating a PTP message by a synchronization unit; encrypting the PTP message by a first encryption unit; , generating a transmission frame including the encrypted PTP message by encoding the encrypted PTP message by a communication stack unit according to a transmission protocol, and a second encryption unit immediately before transmission of the transmission frame, a portion of the encrypted PTP message Decrypting , recording current time information in a portion of the decrypted PTP message by the second encryption unit, and re-encrypting a portion of the decrypted PTP message by the second encryption unit, and the transceiver unit performs the re-encryption and transmitting a transport frame including the encrypted PTP message.
본 발명은 PTP 메시지를 송신할 때 PTP 메시지에 전송 시점을 기준으로 최신의 시간 정보를 기록하여 송신함으로써, 보다 정밀한 시각 동기화를 수행할 수 있다. In the present invention, when transmitting a PTP message, by recording and transmitting the latest time information based on the transmission time in the PTP message, more precise time synchronization can be performed.
도 1은 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치의 구성을 설명하기 위한 블록도이다.
도 2는 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지 및 전송 프레임의 구성을 설명하기 위한 도면이다.
도 3은 본 발명의 일 실시예에 따른 정밀 시각 프로토콜의 메시지를 암호화 및 복호화하는 방법을 설명하기 위한 도면이다.
도 4 및 도 5는 본 발명의 추가적인 실시예에 따른 정밀 시각 프로토콜의 메시지를 암호화 및 복호화하는 방법을 설명하기 위한 도면이다.
도 6은 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 방법을 설명하기 위한 흐름도이다. 1 is a block diagram for explaining the configuration of an apparatus for transmitting and receiving a message of a precision time protocol according to an embodiment of the present invention.
2 is a diagram for explaining the configuration of a message and a transmission frame of a precise time protocol according to an embodiment of the present invention.
3 is a diagram for explaining a method of encrypting and decrypting a message of a precision time protocol according to an embodiment of the present invention.
4 and 5 are diagrams for explaining a method of encrypting and decrypting a message of a precision time protocol according to an additional embodiment of the present invention.
6 is a flowchart illustrating a method for transmitting and receiving a message of a precision time protocol according to an embodiment of the present invention.
본 발명의 상세한 설명에 앞서, 이하에서 설명되는 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니 되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념으로 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 실시예에 불과할 뿐, 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형 예들이 있을 수 있음을 이해하여야 한다. Prior to the detailed description of the present invention, the terms or words used in the present specification and claims described below should not be construed as being limited to their ordinary or dictionary meanings, and the inventors should develop their own inventions in the best way. It should be interpreted as meaning and concept consistent with the technical idea of the present invention based on the principle that it can be appropriately defined as a concept of a term for explanation. Therefore, the embodiments described in the present specification and the configurations shown in the drawings are only the most preferred embodiments of the present invention, and do not represent all the technical spirit of the present invention, so various equivalents that can be substituted for them at the time of the present application It should be understood that there may be water and variations.
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예들을 상세히 설명한다. 이때, 첨부된 도면에서 동일한 구성 요소는 가능한 동일한 부호로 나타내고 있음을 유의해야 한다. 또한, 본 발명의 요지를 흐리게 할 수 있는 공지 기능 및 구성에 대한 상세한 설명은 생략할 것이다. 마찬가지의 이유로 첨부 도면에 있어서 일부 구성요소는 과장되거나 생략되거나 또는 개략적으로 도시되었으며, 각 구성요소의 크기는 실제 크기를 전적으로 반영하는 것이 아니다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In this case, it should be noted that in the accompanying drawings, the same components are denoted by the same reference numerals as much as possible. In addition, detailed descriptions of well-known functions and configurations that may obscure the gist of the present invention will be omitted. For the same reason, some components are exaggerated, omitted, or schematically illustrated in the accompanying drawings, and the size of each component does not fully reflect the actual size.
먼저, 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치에 대해서 설명하기로 한다. 도 1은 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치의 구성을 설명하기 위한 블록도이다. 도 2는 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지 및 전송 프레임의 구성을 설명하기 위한 도면이다. 도 3은 본 발명의 일 실시예에 따른 정밀 시각 프로토콜의 메시지를 암호화 및 복호화하는 방법을 설명하기 위한 도면이다. 도 4 및 도 5는 본 발명의 추가적인 실시예에 따른 정밀 시각 프로토콜의 메시지를 암호화 및 복호화하는 방법을 설명하기 위한 도면이다. First, an apparatus for transmitting and receiving a message of a precision time protocol according to an embodiment of the present invention will be described. 1 is a block diagram for explaining the configuration of an apparatus for transmitting and receiving a message of a precision time protocol according to an embodiment of the present invention. 2 is a diagram for explaining the configuration of a message and a transmission frame of a precise time protocol according to an embodiment of the present invention. 3 is a diagram for explaining a method of encrypting and decrypting a message of a precision time protocol according to an embodiment of the present invention. 4 and 5 are diagrams for explaining a method of encrypting and decrypting a message of a precision time protocol according to an additional embodiment of the present invention.
도 1을 참조하면, 본 발명의 실시예에 따른 정밀 시각 프로토콜 메시지를 송수신하기 위한 장치(10, 이하, ‘시각동기장치’로 축약함)는 동기화부(110), 통신스택부(120), 송수신부(130) 및 암호화부(200)를 포함한다. 특히, 암호화부(200)는 제1 암호화부(210) 및 제2 암호화부(220)를 포함한다. 1, an apparatus for transmitting and receiving a precise time protocol message according to an embodiment of the present invention (hereinafter, abbreviated as 'time synchronization device') includes a
동기화부(110)는 시각동기장치(10)가 전송하는 정밀 시각 프로토콜(Precision Time Protocol: PTP) 메시지를 생성하거나, 시각동기장치(10)가 수신한 PTP 메시지를 해석한다. The
도 2에 도시된 바와 같이, PTP 메시지는 PTP 헤더 및 PTP 페이로드를 포함한다. 특히, PTP 페이로드는 타임스탬프 필드를 포함한다. 동기화부(110)는 PTP 메시지를 생성하면서 타임스탬프 필드에 시간 정보를 기록한다. 동기화부(110)는 수신된 PTP 메시지의 타임스탬프 필드에서 시간 정보를 추출할 수 있다. As shown in Fig. 2, the PTP message includes a PTP header and a PTP payload. In particular, the PTP payload includes a timestamp field. The
제1 암호화부(210)는 동기화부(110)가 생성한 PTP 메시지를 암호화하거나, 동기화부(110)가 통신스택부(120)로부터 PTP 메시지를 수신하면, 수신된 PTP 메시지를 복호화하기 위한 것이다. The
기본적으로, 제1 암호화부(210)는 도 3에 도시된 바와 같이, PTP 메시지를 복수의 암호화 블록(Block)으로 구분하고, 구분된 암호화 블록(Block) 별로 암호화 혹은 복호화할 수 있다. Basically, as shown in FIG. 3 , the
추가적인 실시예에 따르면, 제1 암호화부(210)는 타임스탬프 필드가 메시지의 다른 부분과 구분되어 다른 암호화 블록에 속하도록 PTP 헤더의 앞 및 뒤 중 적어도 하나에 패드를 부가한다. 도 4 및 도 5에 도시된 바와 같이, 패드를 부가함에 따라, 타임스탬프 필드는 다른 부분과 구분된 암호화 블록(Block4, Block5)에 포함된다. 이에 따라, 도 3의 실시예와 같이 PTP 헤더와 암호화 블록(Block3)을 공유하지 않는다. According to an additional embodiment, the
특히, 제1 암호화부(210)는 인접한 암호화 블록(Block) 간의 의존성(Dependency)이 없는 암호화 방식으로 구분된 복수의 암호화 블록(Block) 단위로 PTP의 메시지를 암호화 혹은 복호화 할 수 있다. 이에 따라, 구분된 암호화 블록(Block) 별로 암호화 혹은 복호화할 수 있다. In particular, the
통신스택부(120)는 암호화된 PTP 메시지를 전송 프로토콜에 따라 인코딩하여 암호화된 PTP 메시지를 포함하는 전송 프레임을 생성할 수 있다. 그리고 통신스택부(120)는 생성된 전송 프레임을 송수신부(130)로 전달한다. 또한, 통신스택부(120)는 송수신부(130)로부터 수신된 전송 프레임을 디코딩하여 암호화된 PTP 메시지를 추출할 수 있다. 그런 다음, 추출된 PTP 메시지를 동기화부(110)에 전달한다. The
예를 들면, 통신스택부(120)는 도 2에 도시된 바와 같이, PTP 메시지를 인코딩하여 UDP 프레임을 생성하고, UDP 프레임을 인코딩하여 IP 프레임을 생성하고, IP 프레임을 인코딩하여 이더넷 프레임을 생성할 수 있다. 또한, 통신스택부(120)는 도 2에 도시된 바와 같이, 송수신부(130)로부터 이더넷 프레임인 전송 프레임이 수신되면, 이더넷 프레임을 디코딩하여 IP 프레임을 추출하고, IP 프레임을 디코딩하여 UDP 프레임을 추출하고, UDP 프레임을 디코딩하여 PTP 메시지를 추출할 수 있다. 다만, 이러한 전송 프레임을 인코딩하거나 디코딩하는 것은 통신에 사용되는 프로토콜에 따라 변경될 수 있다. For example, as shown in FIG. 2 , the
제2 암호화부(220)는 송수신부(130)가 통신스택부(120)로부터 전송 프레임을 전달받으면, 전송 프레임의 PTP 메시지의 일부를 복호화하고, 복호화된 PTP 메시지의 일부에 현재의 시간 정보를 기록한 후, 복호화된 PTP 메시지의 일부를 다시 암호화한다. 이때, PTP 메시지에 기록되는 시간 정보는 동기화부(110)가 PTP 메시지를 생성할 때 기록되는 시간 정보에 비해 PTP 메시지의 전송 시간에 가까운 시간이기 때문에 보다 더 정밀한 시간 동기화를 수행할 수 있다. When the
여기서, 도 3, 도 4 및 도 5를 참조하면, PTP 메시지의 일부는 타임스탬프 필드를 포함하는 암호화 블록(Block)이다. 일례로, 도 3의 실시예의 경우, PTP 메시지의 일부는 3개의 암호화 블록(Blcok3, Blcok4, Blcok5)이 될 수 있다. 다른 예로, 도 4 및 도 5의 실시예에의 경우, 2개의 암호화 블록(Blcok4, Blcok5)이 될 수 있다. Here, referring to FIGS. 3, 4 and 5 , a part of the PTP message is an encryption block including a timestamp field. For example, in the case of the embodiment of FIG. 3 , a portion of the PTP message may be three encryption blocks (Blcok3, Blcok4, and Blcok5). As another example, in the embodiment of FIGS. 4 and 5 , there may be two encryption blocks Blcok4 and Blcok5.
전술한 바와 같이, 제1 암호화부(210)는 도 3에 도시된 바와 같이, PTP 메시지를 복수의 암호화 블록(Block)으로 구분하고, 구분된 암호화 블록(Block) 별로 암호화하고, 인접한 암호화 블록(Block) 간의 의존성(Dependency)이 없는 암호화 방식으로 구분된 암호화 블록(Block) 별로 PTP의 메시지를 암호화한다. 따라서 제2 암호화부(220)는 구분된 암호화 블록(Block)에서 복호화 대상인 타임스탬프 필드를 포함하는 암호화 블록(Block)의 앞 혹은 뒤의 암호화 블록(Block)에 대한 복호화 여부와 상관없이 복호화 대상인 암호화 블록(Block)만 개별적으로 복호화하고 다시 암호화를 수행할 수 있다. 특히, 도 4 및 도 5에 도시된 추가적인 실시예와 같이, 패드를 부가함에 따라, 타임스탬프 필드를 포함하면서 다른 부분과 구분된 암호화 블록(Block4, Block5)의 수가 도 3의 실시예에 대비 감소된다. 이에 따라, 복호화 및 재 암호화를 수행하는 프로세스의 시간 및 부하를 줄일 수 있다. As described above, as shown in FIG. 3 , the
송수신부(130)는 PTP 메시지를 포함하는 전송 프레임을 송수신하기 위한 것이다. 즉, 송수신부(130)는 제2 암호화부가(220)가 타임스탬프 필드를 복호화하고, 시각 정보를 기록한 후, 타임스탬프 필드를 다시 암호화하면, PTP 메시지가 포함된 전송 프레임을 다른 시각동기장치(10)로 송신할 수 있다. 또한, 또한, 송수신부(130)는 다른 시각동기장치(10)로부터 PTP 메시지가 포함된 전송 프레임을 수신할 수 있다. 그러면, 송수신부(130)는 PTP 메시지가 포함된 전송 프레임을 통신스택부(120)에 전달한다. The
다음으로, 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 방법에 대해서 설명하기로 한다. 도 6은 본 발명의 실시예에 따른 정밀 시각 프로토콜의 메시지를 송수신하기 위한 방법을 설명하기 위한 흐름도이다. Next, a method for transmitting and receiving a message of a precise time protocol according to an embodiment of the present invention will be described. 6 is a flowchart illustrating a method for transmitting and receiving a message of a precision time protocol according to an embodiment of the present invention.
도 6을 참조하면, 동기화부(110)는 S110 단계에서 정밀 시각 프로토콜(Precision Time Protocol: PTP) 메시지를 생성한다. 도 2에 도시된 바와 같이, PTP 메시지는 PTP 헤더 및 PTP 페이로드를 포함한다. 특히, PTP 페이로드는 타임스탬프 필드를 포함한다. S110 단계에서 동기화부(110)는 PTP 메시지의 타임스탬프 필드에 PTP 메시지를 생성할 때의 시간 정보(Old)를 기록하거나, 혹은 시간 정보를 기록하지 않을 수 있다(Empty). Referring to FIG. 6 , the
다음으로, 제1 암호화부(210)는 S120 단계에서 앞서 동기화부(110)가 생성한 PTP 메시지를 암호화한다. Next, the
S120 단계의 일 실시예에 따르면, 제1 암호화부(210)는 도 3에 도시된 바와 같이, PTP 메시지를 복수의 암호화 블록(Block)으로 구분하고, 구분된 암호화 블록(Block) 별로 암호화 할 수 있다. 특히, 제1 암호화부(210)는 인접한 암호화 블록(Block) 간의 의존성(Dependency)이 없는 암호화 방식으로 구분된 복수의 암호화 블록(Block) 단위로 PTP의 메시지를 암호화 할 수 있다. 인접한 암호화 블록(Block) 간의 의존성(Dependency)이 없는 암호화 방식은 AES_CTR을 예시할 수 있다. 구분된 복수의 암호화 블록(Block) 단위로 PTP의 메시지를 암호화함에 따라, 타임스탬프 필드가 전체 암호화 블록 중 일부의 암호화 블록(Block)에 속하게 된다. 이에 따라, 타임스탬프 필드 속하는 암호화 블록(Block)과 나머지 암호화 블록(Block)을 통해 타임스탬프 필드를 PTP 메시지의 나머지 부분과 구분할 수 있다. According to an embodiment of step S120, the
S120 단계의 추가적인 실시예에 따르면, 제1 암호화부(210)는 PTP 메시지를 복수의 암호화 블록(Block)으로 구분할 때, 도 4 및 도 5에 도시된 바와 같이, PTP 헤더의 앞 및 뒤 중 적어도 하나에 패드를 부가하여 타임스탬프 필드가 PTP 메시지의 다른 부분과 구분되어 다른 암호화 블록(Block)에 속하도록 한다. 다른 말로, 제1 암호화부(210)는 패드를 PTP 헤더의 앞 혹은 뒤에 부착하여 PTP 헤더와 타임스탬프 필드의 경계를 암호화 블록(Block) 간의 경계에 일치 시킨다. 이에 따라, 타임스탬프 필드는 다른 부분과 구분된 암호화 블록(Block4, Block5)에 포함된다. 따라서 도 4 및 도 5의 실시예의 경우, 도 3의 실시예와 같이 타임스탬프 필드는 PTP 헤더의 일부와 암호화 블록(Block3)을 공유하지 않는다. According to an additional embodiment of step S120, when the
전술한 바와 같이, PTP 메시지에 대한 암호화가 이루어지면, 통신스택부(120)는 S130 단계에서 암호화된 PTP 메시지를 전송 프로토콜에 따라 인코딩하여 암호화된 PTP 메시지를 포함하는 전송 프레임을 생성할 수 있다. 예컨대, 통신스택부(120)는 도 2에 도시된 바와 같이, PTP 메시지를 인코딩하여 UDP 프레임을 생성할 수 있다. 그런 다음, 통신스택부(120)는 UDP 프레임을 인코딩하여 IP 프레임을 생성할 수 있다. 이어서, 통신스택부(120)는 IP 프레임을 인코딩하여 이더넷 프레임을 생성할 수 있다. As described above, when the PTP message is encrypted, the
다음으로, 제2 암호화부(220)는 S140 단계에서 전송 프레임의 PTP 메시지의 적어도 일부를 복호화한다. 이어서, 제2 암호화부(220)는 S150 단계에서 복호화된 PTP 메시지의 일부에 최신의 시간 정보를 기록한다. 그런 다음, 제2 암호화부(220)는 S160 단계에서 복호화되고 최신의 시간 정보가 기록된 PTP 메시지의 일부를 다시 암호화한다. Next, the
여기서, 도 3, 도 4 및 도 5를 참조하면, S140, S150 및 S160 단계의 PTP 메시지의 일부는 앞서 S120 단계에서 구분된 타임스탬프 필드가 포함된 암호화 블록을 의미한다. Here, referring to FIGS. 3, 4 and 5 , a part of the PTP message in steps S140, S150, and S160 means an encryption block including the timestamp field divided in step S120 above.
일례로, 도 3의 실시예의 경우, PTP 메시지의 일부는 3개의 암호화 블록(Blcok3, Blcok4, Blcok5)이 될 수 있다. 다른 예로, 도 4 및 도 5의 실시예에의 경우, 2개의 암호화 블록(Blcok4, Blcok5)이 될 수 있다. For example, in the case of the embodiment of FIG. 3 , a portion of the PTP message may be three encryption blocks (Blcok3, Blcok4, and Blcok5). As another example, in the embodiment of FIGS. 4 and 5 , there may be two encryption blocks Blcok4 and Blcok5.
전술한 바와 같이, 제1 암호화부(210)는 도 3에 도시된 바와 같이, PTP 메시지를 복수의 암호화 블록(Block)으로 구분하고, 구분된 암호화 블록(Block) 별로 암호화하고, 인접한 암호화 블록(Block) 간의 의존성(Dependency)이 없는 암호화 방식으로 구분된 암호화 블록(Block) 별로 PTP의 메시지를 암호화한다. 따라서 제2 암호화부(220)는 구분된 암호화 블록(Block)에서 복호화 대상인 타임스탬프 필드를 포함하는 암호화 블록(Block)의 앞 혹은 뒤의 암호화 블록(Block)에 대한 복호화 여부와 상관없이 복호화 대상인 암호화 블록(Block)만 개별적으로 복호화하고 다시 암호화를 수행할 수 있다. As described above, as shown in FIG. 3 , the
특히, 도 4 및 도 5에 도시된 추가적인 실시예와 같이, 패드를 부가함에 따라, 타임스탬프 필드를 포함하면서 다른 부분과 구분된 암호화 블록(Block4, Block5)의 수가 도 3의 실시예에 대비 감소된다. 이에 따라, 복호화 및 재 암호화를 수행하는 프로세스의 시간 및 부하를 줄일 수 있다. 이에 대해 보다 구체적으로 설명하면, 앞서 S120 단계에서 제1 암호화부(210)는 패드를 PTP 헤더의 앞 혹은 뒤에 삽입하여 암호화 블록(Block)의 경계(B)와 서로 인접한 PTP 헤더 및 타임스탬프 필드의 경계를 정렬함으로써, 서로 인접한 PTP 헤더 및 타임스탬프 필드가 서로 다른 암호화 블록(Block)에 속하도록 한다. 그런 다음, 제1 암호화부(210)는 예컨대, AES CTR와 같이 인접한 암호화 블락(Block) 간의 의존성(Dependency)이 없는 암호화 방식으로 구분된 복수의 암호화 블록(Block) 단위로 암호화를 수행한다. 따라서 제2 암호화부(220)는 S140 단계에서 타임스탬프 필드가 포함된 암호화 블록만을 복호화 할 수 있으며, 가장 적은 수의 암호화 블록만을 복호화 할 수 있다. In particular, as in the additional embodiments shown in FIGS. 4 and 5 , as the pad is added, the number of encryption blocks (Block4, Block5) separated from other parts while including the timestamp field is reduced compared to the embodiment of FIG. 3 do. Accordingly, it is possible to reduce the time and load of a process for performing decryption and re-encryption. More specifically, in step S120, the
또한, S150 단계에서 PTP 메시지의 타임스탬프 필드에 기록 시점을 기준으로 최신의 시간 정보가 기록된다. 이와 같이, S150 단계에서 기록되는 최신의 시간 정보는 동기화부(110)가 PTP 메시지를 생성할 때 기록되는 시간 정보에 비해 PTP 메시지의 전송 시간에 가까운 시간이기 때문에 보다 더 정밀한 시간 동기화를 수행할 수 있다. In addition, in step S150, the latest time information based on the recording time is recorded in the timestamp field of the PTP message. As such, since the latest time information recorded in step S150 is closer to the transmission time of the PTP message than the time information recorded when the
전술한 바와 같이, 제2 암호화부가(220)가 타임스탬프 필드를 포함하는 PTP 메시지의 일부를 복호화하고, 최신의 시각 정보를 기록한 후, 다시 암호화하면, 송수신부(130)는 S170 단계에서 PTP 메시지가 포함된 전송 프레임을 다른 장치(10)로 송신한다. As described above, if the
한편, 앞서 설명된 본 발명의 실시예에 따른 방법은 다양한 컴퓨터수단을 통하여 판독 가능한 프로그램 형태로 구현되어 컴퓨터로 판독 가능한 기록매체에 기록될 수 있다. 여기서, 기록매체는 프로그램 명령, 데이터 파일, 데이터구조 등을 단독으로 또는 조합하여 포함할 수 있다. 기록매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 예컨대 기록매체는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광 기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치를 포함한다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어를 포함할 수 있다. 이러한 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다. Meanwhile, the method according to the embodiment of the present invention described above may be implemented in the form of a program readable by various computer means and recorded in a computer readable recording medium. Here, the recording medium may include a program command, a data file, a data structure, etc. alone or in combination. The program instructions recorded on the recording medium may be specially designed and configured for the present invention, or may be known and available to those skilled in the art of computer software. For example, the recording medium includes magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magneto-optical media such as floppy disks ( magneto-optical media), and hardware devices specially configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions may include high-level languages that can be executed by a computer using an interpreter or the like as well as machine language such as generated by a compiler. Such hardware devices may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.
이상 본 발명을 몇 가지 바람직한 실시예를 사용하여 설명하였으나, 이들 실시예는 예시적인 것이며 한정적인 것이 아니다. 이와 같이, 본 발명이 속하는 기술분야에서 통상의 지식을 지닌 자라면 본 발명의 사상과 첨부된 특허청구범위에 제시된 권리범위에서 벗어나지 않으면서 균등론에 따라 다양한 변화와 수정을 가할 수 있음을 이해할 것이다. Although the present invention has been described above using several preferred embodiments, these examples are illustrative and not restrictive. As such, those of ordinary skill in the art to which the present invention pertains will understand that various changes and modifications can be made in accordance with the doctrine of equivalents without departing from the spirit of the present invention and the scope of rights set forth in the appended claims.
10: 시각동기장치
110: 동기화부
120: 통신스택부
130: 송수신부
200: 암호화부
210: 제1 암호화부
220: 제2 암호화부 10: visual synchronization device
110: synchronization unit
120: communication stack unit
130: transceiver
200: encryption unit
210: first encryption unit
220: second encryption unit
Claims (6)
PTP 메시지를 생성하는 동기화부;
상기 PTP 메시지를 암호화하는 제1 암호화부;
상기 암호화된 PTP 메시지를 전송 프로토콜에 따라 인코딩하여 상기 암호화된 PTP 메시지를 포함하는 전송 프레임을 생성하는 통신스택부;
상기 전송 프레임을 송신하기 전, 상기 암호화된 PTP 메시지의 적어도 일부를 복호화하고,
복호화된 PTP 메시지의 적어도 일부에 최신의 시간 정보를 기록한 후,
복호화된 PTP 메시지의 적어도 일부를 다시 암호화하는 제2 암호화부; 및
상기 다시 암호화된 PTP 메시지를 포함하는 전송 프레임을 송신하는 송수신부;
를 포함하는 것을 특징으로 하는
정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치. An apparatus for transmitting and receiving a message of a precision time protocol, comprising:
a synchronization unit generating a PTP message;
a first encryption unit for encrypting the PTP message;
a communication stack unit encoding the encrypted PTP message according to a transmission protocol to generate a transmission frame including the encrypted PTP message;
Decrypting at least a portion of the encrypted PTP message before transmitting the transmission frame;
After recording the latest time information in at least part of the decrypted PTP message,
a second encryption unit for re-encrypting at least a portion of the decrypted PTP message; and
a transceiver for transmitting a transmission frame including the re-encrypted PTP message;
characterized in that it comprises
A device for sending and receiving messages in the precision visual protocol.
상기 제1 암호화부는
PTP 헤더 및 타임스탬프 필드를 포함하는 PTP 메시지에서 상기 타임스탬프 필드를 PTP 메시지의 나머지 부분과 구분하여 암호화하는 것을 특징으로 하는
정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치. According to claim 1,
The first encryption unit
In a PTP message including a PTP header and a timestamp field, the timestamp field is separated from the rest of the PTP message and encrypted
A device for sending and receiving messages in the precision visual protocol.
상기 제1 암호화부는
PTP 헤더 및 타임스탬프 필드를 포함하는 PTP 메시지를 복수의 암호화 블록으로 구분하되,
상기 타임스탬프 필드가 메시지의 다른 부분과 구분되어 다른 암호화 블록에 속하도록 상기 PTP 헤더의 앞 및 뒤 중 적어도 하나에 패드를 부가하고,
구분된 복수의 암호화 블록 별로 암호화를 수행하는 것을 특징으로 하는
정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치. 3. The method of claim 2,
The first encryption unit
Separating a PTP message including a PTP header and a timestamp field into a plurality of encryption blocks,
adding a pad to at least one of the front and back of the PTP header so that the timestamp field belongs to a different encryption block by being distinguished from other parts of the message;
characterized in that encryption is performed for each of a plurality of separated encryption blocks
A device for sending and receiving messages in the precision visual protocol.
상기 제1 암호화부는
구분된 복수의 암호화 블록 중 인접한 암호화 블락 간의 의존성(Dependency)이 없는 암호화 방식으로 상기 PTP 메시지를 구분된 복수의 암호화 블록 별로 암호화를 수행하는 것을 특징으로 하는
정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치. 4. The method of claim 3,
The first encryption unit
Encrypting the PTP message for each of the plurality of divided encryption blocks in an encryption method without dependency between adjacent encryption blocks among a plurality of divided encryption blocks.
A device for sending and receiving messages in the precision visual protocol.
상기 제2 암호화부는
상기 타임스탬프 필드가 속한 암호화 블록만 복호화하는 것을 특징으로 하는
정밀 시각 프로토콜의 메시지를 송수신하기 위한 장치. 4. The method of claim 3,
The second encryption unit
Decrypting only the encryption block to which the timestamp field belongs
A device for sending and receiving messages in the precision visual protocol.
동기화부가 PTP 메시지를 생성하는 단계;
제1 암호화부가 상기 PTP 메시지를 암호화하는 단계;
통신스택부가 상기 암호화된 PTP 메시지를 전송 프로토콜에 따라 인코딩하여 상기 암호화된 PTP 메시지를 포함하는 전송 프레임을 생성하는 단계;
제2 암호화부가 상기 전송 프레임의 전송 직전, 상기 암호화된 PTP 메시지의 일부를 복호화하는 단계;
상기 제2 암호화부가 복호화된 PTP 메시지의 일부에 최신의 시간 정보를 기록하는 단계;
상기 제2 암호화부가 복호화된 PTP 메시지의 일부를 다시 암호화하는 단계; 및
송수신부가 상기 다시 암호화된 PTP 메시지를 포함하는 전송 프레임을 전송하는 단계;
를 포함하는 것을 특징으로 하는
정밀 시각 프로토콜의 메시지를 송수신하기 위한 방법. A method for transmitting and receiving a message of a precision time protocol, the method comprising:
generating a PTP message by a synchronization unit;
encrypting the PTP message by a first encryption unit;
generating, by a communication stack unit, a transmission frame including the encrypted PTP message by encoding the encrypted PTP message according to a transmission protocol;
Decrypting, by a second encryption unit, a portion of the encrypted PTP message immediately before transmission of the transmission frame;
recording, by the second encryption unit, the latest time information in a part of the decrypted PTP message;
re-encrypting a portion of the decrypted PTP message by the second encryption unit; and
transmitting, by a transceiver, a transmission frame including the re-encrypted PTP message;
characterized in that it comprises
A method for sending and receiving messages in the precision visual protocol.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210062565A KR102407341B1 (en) | 2021-05-14 | 2021-05-14 | Method for transmitting and receiving messages of Precision Time Protocol (PTP) and apparatus therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210062565A KR102407341B1 (en) | 2021-05-14 | 2021-05-14 | Method for transmitting and receiving messages of Precision Time Protocol (PTP) and apparatus therefor |
Publications (1)
Publication Number | Publication Date |
---|---|
KR102407341B1 true KR102407341B1 (en) | 2022-06-13 |
Family
ID=81984556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210062565A KR102407341B1 (en) | 2021-05-14 | 2021-05-14 | Method for transmitting and receiving messages of Precision Time Protocol (PTP) and apparatus therefor |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102407341B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102550048B1 (en) * | 2022-09-16 | 2023-07-03 | (주) 시스메이트 | 5G system operating as TSN network bridge and method for generating secure channel |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110044866A (en) * | 2008-08-22 | 2011-05-02 | 마벨 월드 트레이드 리미티드 | Method and apparatus for integrating precise time protocol and media access control security in network elements |
KR20180072506A (en) | 2016-12-21 | 2018-06-29 | 주식회사 큐셀네트웍스 | Method and Apparatus for Estimating a Clock Frequency Error and a Clock Time Error in a PTP Slave |
JP2021506037A (en) * | 2018-09-20 | 2021-02-18 | 中興通訊股▲ふん▼有限公司Zte Corporation | Network cards, time synchronization methods and devices, and computer storage media |
JP2021044777A (en) * | 2019-09-13 | 2021-03-18 | 株式会社東芝 | Ptp message selection method and program as well as ptp slave device |
-
2021
- 2021-05-14 KR KR1020210062565A patent/KR102407341B1/en active IP Right Grant
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110044866A (en) * | 2008-08-22 | 2011-05-02 | 마벨 월드 트레이드 리미티드 | Method and apparatus for integrating precise time protocol and media access control security in network elements |
JP2012501108A (en) * | 2008-08-22 | 2012-01-12 | マーベル ワールド トレード リミテッド | Method and apparatus for integrating precision time protocol and media access control security into network elements |
KR20180072506A (en) | 2016-12-21 | 2018-06-29 | 주식회사 큐셀네트웍스 | Method and Apparatus for Estimating a Clock Frequency Error and a Clock Time Error in a PTP Slave |
JP2021506037A (en) * | 2018-09-20 | 2021-02-18 | 中興通訊股▲ふん▼有限公司Zte Corporation | Network cards, time synchronization methods and devices, and computer storage media |
JP2021044777A (en) * | 2019-09-13 | 2021-03-18 | 株式会社東芝 | Ptp message selection method and program as well as ptp slave device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102550048B1 (en) * | 2022-09-16 | 2023-07-03 | (주) 시스메이트 | 5G system operating as TSN network bridge and method for generating secure channel |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102132530B (en) | Method and apparatus for integrating precise time protocol and media access control security in network elements | |
US7724900B2 (en) | Method, apparatus, and program for processing information | |
US9240882B2 (en) | Key generating device and key generating method | |
CN106165353B (en) | Efficient routing of encrypted streams using point-to-point authentication protocol | |
US10084492B2 (en) | Method and system for non-persistent real-time encryption key distribution | |
US20030212886A1 (en) | Encryption/decryption system and encryption/decryption method | |
CN111193703B (en) | Communication apparatus and communication method used in distributed network | |
US20060018468A1 (en) | Data transmission method and data transmission apparatus | |
JP2013205800A (en) | Device and method for encrypting data | |
KR102407341B1 (en) | Method for transmitting and receiving messages of Precision Time Protocol (PTP) and apparatus therefor | |
JP2020520617A (en) | Configurable service packet engine that leverages frame properties | |
US20080037788A1 (en) | Data decryption apparatus and data encryption apparatus | |
CN108848413B (en) | System, method and device for preventing video from replay attack and storage medium | |
US8364947B2 (en) | Period keys | |
EP1407574B1 (en) | Streamcipher synchronisation information which is redundant in next packet of encrypted frame | |
US10382199B2 (en) | Keyword to set minimum key strength | |
KR102231620B1 (en) | Method for transmitting digital data over multiple channels | |
EP3522444B1 (en) | Communication device, communication method, communication system, and recording medium | |
US20220029797A1 (en) | Communication system, key management server device, router, and computer program product | |
JP2012029271A (en) | Encryption device, decryption device, encryption system, encryption method and program | |
CN110999208A (en) | Encryption communication device, encryption communication system, encryption communication method, and program | |
JP2007074645A (en) | Common key encryption communication system | |
US11863669B2 (en) | Session resumption with derived key | |
EP3944555B1 (en) | Communication system, key management server device, router, and computer-readable medium | |
JP6711522B2 (en) | Communication system, communication device, and communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |