WO2021107389A1 - Network system and message security method thereof - Google Patents

Network system and message security method thereof Download PDF

Info

Publication number
WO2021107389A1
WO2021107389A1 PCT/KR2020/013707 KR2020013707W WO2021107389A1 WO 2021107389 A1 WO2021107389 A1 WO 2021107389A1 KR 2020013707 W KR2020013707 W KR 2020013707W WO 2021107389 A1 WO2021107389 A1 WO 2021107389A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
encryption key
payload
topic
producer
Prior art date
Application number
PCT/KR2020/013707
Other languages
French (fr)
Korean (ko)
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 서울대학교 산학협력단
Publication of WO2021107389A1 publication Critical patent/WO2021107389A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0471Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload applying encryption by an intermediary, e.g. receiving clear information at the intermediary and encrypting the received information at the intermediary before forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/061Network architectures or network communication protocols for network security for supporting key management in a packet data network for key exchange, e.g. in peer-to-peer networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/065Network architectures or network communication protocols for network security for supporting key management in a packet data network for group communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/067Network architectures or network communication protocols for network security for supporting key management in a packet data network using one-time keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/068Network architectures or network communication protocols for network security for supporting key management in a packet data network using time-dependent keys, e.g. periodically changing keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services

Definitions

  • Embodiments disclosed herein relate to a network system and its message security method. More particularly, it relates to a network system capable of increasing message security so as to prevent leakage or manipulation of a message by a broker relaying between a producer and a subscriber, and a message security method thereof.
  • the Message Queuing Telemetry Transport (MQTT) protocol is used as a lightweight subscription/production (Pub(Publish)/Sub(Subsribe)) message protocol.
  • the MQTT protocol was created for use in Machine to Machine (M2M) and Internet of Things (IoT) environments.
  • MQTT protocol is a protocol designed to be used in a low-power, low-bandwidth environment.
  • This MQTT protocol operates as a basic principle of publishing messages and subscribing to topics of interest.
  • the producer terminal may generate a message related to the topic and deliver it to the subscriber terminal.
  • a wearable information service including a wearable device that generates wearable data, a wearable broker that receives and distributes wearable data over a network, and a user terminal that receives wearable data Describe the system.
  • Embodiments disclosed herein have an object to provide a network system capable of preventing message leakage or manipulation by a broker relaying between producers and subscribers and a message security method thereof.
  • the embodiments disclosed in the present specification when receiving an encrypted topic and a payload from a producer terminal that generates a topic, decrypts the topic using an encryption key shared with the producer terminal. Checks the subscriber terminal subscribing to , encrypts the topic using an encryption key shared with the subscriber terminal, and then transmits it to the subscriber terminal together with the encrypted payload.
  • FIG. 1 is a diagram illustrating a network system according to an embodiment.
  • FIG. 2 is a flowchart illustrating an operation of a network system according to an embodiment.
  • FIG. 3 is a flowchart illustrating an operation of a subscriber terminal according to an embodiment.
  • FIG. 4 is a flowchart illustrating an operation of a broker terminal according to an embodiment.
  • 5 to 6 are flowcharts illustrating an operation of a producer terminal according to an embodiment.
  • the network system communicates with a producer terminal generating a topic, a subscriber terminal subscribing to the topic, and the subscriber terminal and the producer terminal,
  • a message including an encrypted topic and an encrypted payload is received from the producer terminal
  • the encrypted topic is decrypted using a second topic encryption key shared with the producer terminal to check the subscriber terminal subscribing to the decrypted topic and a broker terminal for encrypting the topic using a first topic encryption key shared with the subscriber terminal and transmitting the encrypted payload to the subscriber terminal.
  • a message security method performed in a network system includes, by a broker terminal, establishing a session with a subscriber terminal subscribing to a topic, the broker terminal establishing a session with a producer terminal generating the topic Step, when the broker terminal receives a message including an encrypted topic and an encrypted payload from the producer terminal, decrypting the encrypted topic using a second topic encryption key shared with the producer terminal; and the broker terminal identifies a subscriber terminal subscribing to the decrypted topic, encrypts the topic using a first topic encryption key shared with the subscriber terminal, and transmits it to the subscriber terminal together with the encrypted payload including the steps of
  • the network system refers to a system that communicates using a producer terminal and a subscriber terminal, that is, a producer and subscriber model.
  • a network system can operate based on a publish subscription-based message protocol, for example, a lightweight subscription/production (Pub(Publish)/Sub(Subsribe)) message protocol with message queuing telemetry transport (MQTT). : Message Queuing Telemetry Transport) protocol can be applied.
  • a network system may include all systems capable of utilizing a proxy, such as a smart factory or a smart home.
  • FIG. 1 is a diagram illustrating a network system according to an embodiment.
  • the network system 100 may include a subscriber terminal 110 , a broker terminal 120 , a producer terminal 130 , and a master terminal 140 .
  • the subscriber terminal 110 may be connected to the broker terminal in order to subscribe to the topic generated by the producer terminal 130, and the message generated by the producer terminal 130 may be received through the broker terminal 120 relaying the message.
  • the message may include a topic and a payload corresponding to the topic, and each is encrypted.
  • the broker terminal 120 may communicate with the subscriber terminal 110 and the producer terminal 130 .
  • the broker terminal 120 may establish a session with each of the subscriber terminal 110 and the producer terminal 130 for communication. Through this, when the broker terminal 120 receives the payload related to the topic subscribed to by the subscriber terminal 110 from the producer terminal 130, the broker terminal 120 may provide the payload related to the topic to the subscriber terminal.
  • the broker terminal 120 may generate a first topic encryption key 20 when establishing a session with the subscriber terminal 110, and may generate a second topic encryption key 30 when establishing a session with the producer terminal 130 have. At this time, the subscriber terminal 110 may also generate the first topic encryption key 20 when the session is established, and the producer terminal 130 may also generate the second topic encryption key 30 when the session is established.
  • the producer terminal 130 may generate a payload encryption key 40 for encrypting the payload.
  • the producer terminal 130 may receive the group key from the master terminal 140 .
  • the producer terminal 130 may set the group key as the payload encryption key 40 or generate the payload encryption key 40 using the group key.
  • the producer terminal 130 may encrypt the payload using the payload encryption key, and may encrypt the topic using the second topic encryption key 30 . Through this, the producer terminal 130 may generate a message including an encrypted topic and an encrypted payload.
  • the producer terminal 130 may transmit a message to the broker terminal.
  • the master terminal 140 may manage the group key when the group key of the same layer is unified and managed.
  • the master terminal 140 may not be included in the network system 10 when the group key is not unified and managed, and individual payload encryption keys are generated in each of the producer terminals.
  • the master terminal 140 may provide the group key to the producer terminal 130 by establishing a session with the broker terminal 120, and if direct communication with the producer terminal 130 is possible, do not go through the broker terminal 120 It is also possible to directly provide the group key to the producer terminal 130 without the need to.
  • the broker terminal 120 may receive a message from the producer terminal 130 .
  • the broker terminal 120 may classify the encrypted topic and the encrypted payload in the message, and may decrypt the encrypted topic with the second topic encryption key 30 .
  • the broker terminal 120 may check the decrypted topic and the subscriber terminal subscribing to the corresponding topic.
  • the broker terminal 120 may encrypt the decrypted topic with the first topic encryption key 20 and deliver the topic together with the encrypted payload to the subscriber terminal 110 subscribing to the topic.
  • the subscriber terminal 110 may decrypt the received message using the encryption key, decrypt the encrypted topic using the first topic encryption key 20, and use the encrypted payload as the payload encryption key ( 40) can be used for decryption.
  • the subscriber terminal 110 receives the payload encryption key 40 encrypted with the one-time encryption key generated by exchanging the public key with the producer terminal 130, and decrypts it with the one-time encryption key to obtain it.
  • the broker terminal 120 checks the encrypted topic among the encrypted topic and the encrypted payload in the message transmitted between the subscriber terminal 110 and the producer terminal 130, the message is transmitted without checking the message content. Because it can be delivered, the message transmitted between the subscriber terminal 110 and the producer terminal 130 can be encrypted and delivered so that the broker cannot see the message content.
  • the topic can be confirmed and transmitted in the broker terminal 120 in which the session is established, so that message security is possible. Moreover, since the payload transmitted between the subscriber terminal 110 and the producer terminal 130 cannot be checked by the broker terminal 120, the payload cannot be leaked or manipulated by the broker terminal 120, so message security can increase
  • FIG. 2 is a flowchart illustrating an operation of a network system according to an embodiment.
  • the network system includes a subscriber terminal 110 , a broker terminal 120 , and a producer terminal 130 .
  • the subscriber terminal 110 may request session establishment from the broker terminal 120 (S211).
  • the subscriber terminal may generate a public key, for example, a Diffe-Hellman (DH) public key.
  • the subscriber terminal 110 may transmit a public key (DH public key), a signature, and a certificate together when requesting session establishment.
  • DH Diffe-Hellman
  • the broker terminal 120 may respond to the request for session establishment to the subscriber terminal 110 (S213).
  • the broker terminal 120 may store the public key (DH public key), signature, and certificate of the subscriber terminal 110 received according to the session establishment request.
  • the broker terminal 120 may provide its own certificate to the subscriber terminal.
  • the subscriber terminal 110 may perform a handshake with the broker terminal 120 to subscribe to a specific topic.
  • the subscriber terminal 110 and the broker terminal 120 may establish a session (S215).
  • the subscriber terminal 110 and the broker terminal 120 may establish, for example, a Transport Layer Security (TLS) session.
  • TLS Transport Layer Security
  • the subscriber terminal 110 and the broker terminal 120 may generate a session key when establishing a session.
  • the generated session key may be used as the first topic encryption key 20 for encrypting or decrypting a topic in each of the broker terminal 120 and the subscriber terminal 110 .
  • the subscriber terminal 110 may make a connection request for subscription to a specific topic to the broker terminal 120 (S217).
  • the broker terminal 120 may make a connection response to the connection request of the subscriber terminal 110 (S219).
  • the subscriber terminal 110 may request a subscription to a specific topic desired to be subscribed to to the broker terminal 120 (S221).
  • the broker terminal 120 may make a subscription response to the subscription request to the subscriber terminal 110 (S223).
  • the subscriber terminal 110 makes a subscription request for a specific topic between the broker terminals 120 , and when receiving a subscription response corresponding to the subscription request, the subscriber terminal 110 sends a message message for the specific topic desired by the subscriber terminal 110 . Ready to receive.
  • the producer terminal 130 may request the broker terminal 120 to establish a session (S225).
  • the producer terminal 130 may generate the payload encryption key 40 while generating the topic, and may initialize the payload sequence number to 0.
  • the payload sequence number is information counted when a message is transmitted, and may be used to verify the payload in the subscriber terminal 110 and to check whether the message is manipulated or the order is changed.
  • the broker terminal 120 may respond to the request for session establishment to the producer terminal 130 (S227).
  • the broker terminal 120 may transmit the public key (DH public key), the signature, and the certificate received from the subscriber terminal to the producer terminal 130 .
  • the producer terminal 130 may perform a handshake with the broker terminal 120 in order to transmit a message related to the topic.
  • the producer terminal 130 and the broker terminal 120 may establish a session (S229).
  • the producer terminal 130 and the broker terminal 120 may establish, for example, a Transport Layer Security (TLS) session.
  • TLS Transport Layer Security
  • the producer terminal 130 and the broker terminal 120 may generate a session key when establishing a session.
  • the generated session key may be used as the second topic encryption key 30 for encrypting or decrypting the topic in each of the producer terminal 130 and the broker terminal 120 .
  • the producer terminal 130 may verify the signature and determine whether to participate in the topic generated by the producer terminal 130 .
  • the producer terminal 130 may transmit a subscriber authentication message to the broker terminal 120 to complete the subscriber authentication (S231).
  • the broker terminal 120 may transmit the received subscriber authentication message to the subscriber terminal 110 to complete subscriber authentication (S233).
  • the producer terminal 130 may generate the one-time encryption key 50 with the public key (DH public key) transmitted from the subscriber terminal 110 based on the key exchange algorithm with the subscriber terminal 110 .
  • the one-time encryption key 50 is used as an encryption key for encrypting the payload encryption key 40 and delivering it to the subscriber terminal 110, and may also be used for encryption of the payload sequence number. This, one-time encryption key 50 may be used only once for delivery of the payload encryption key 40 .
  • the producer terminal 130 may generate a message and transmit the generated message to the broker terminal 120 (S235).
  • the producer terminal 130 may generate a message by encrypting the topic with the second encryption key 30 and encrypting the payload related to the topic with the payload encryption key 40 .
  • the producer terminal 130 may transmit the payload encryption key and the payload sequence number encrypted with the one-time encryption key together using the message.
  • the producer terminal 130 may transmit the DH public key, signature, and certificate of the producer terminal 130 to the broker terminal 120 together with the message.
  • the producer terminal 130 may give a current payload sequence number to the payload when transmitting the message, encrypt the payload and the payload sequence number with the payload encryption key, and transmit it to the broker terminal 120 .
  • the broker terminal 120 may transmit the message of the producer terminal 130 to the subscriber terminal 110 (S237).
  • the broker terminal 120 may classify the encrypted topic and the encrypted payload in the message of the producer terminal 130 , and decrypt it with the second topic encryption key 30 .
  • the broker terminal 120 may use the decrypted topic to check the subscriber terminal 110 subscribing to the corresponding topic.
  • the broker terminal 120 may encrypt the topic with the first topic encryption key 20 and transmit it to the confirmed subscriber terminal 110 together with the encrypted payload.
  • the subscriber terminal 110 When the subscriber terminal 110 receives a message including the payload encryption key from the broker terminal 120, it generates a one-time encryption key 50 with the public key transmitted from the producer terminal 130 based on the key exchange algorithm, and generates The one-time encryption key 50 can decrypt the encrypted payload encryption key 40 and the encrypted payload sequence number.
  • the subscriber terminal 110 may decrypt the encrypted payload included in the message with the decrypted payload encryption key 40 .
  • the subscriber terminal 110 may decrypt the topic included in the message using the first topic encryption key 20 generated when the session with the broker terminal 120 is established.
  • the subscriber terminal 110 may decrypt the payload sequence number with the payload encryption key 40 .
  • Such a payload sequence number may be used for data verification for confirming manipulation or order change of messages in the subscriber terminal 110 .
  • the subscriber terminal 110 may receive a message corresponding to the subscription-requested topic.
  • the producer terminal 130 may update, ie, change, the payload encryption key 40 at predetermined intervals to enhance message security.
  • the producer terminal 130 may generate a new payload encryption key 60 for changing the payload encryption key 40 .
  • the producer terminal 130 activates the key update flag information in the message in order to deliver the new payload encryption key 60 to the subscriber terminal 110 (eg, change the bit value 0 -> 1, etc.),
  • the new payload encryption key 60 may be encrypted with the existing payload encryption key 40 .
  • the producer terminal 130 may encrypt the payload with the new payload encryption key 60 and transmit it to the broker terminal 120 (S239).
  • the broker terminal 120 may transmit the message of the producer terminal 130 to the subscriber terminal 110 (S241). At this time, the broker terminal 120 may extract the encrypted topic from the message of the producer terminal 130 and decrypt it with the second topic encryption key 30, and encrypt the topic with the first topic encryption key 20 It can be transmitted to the subscriber terminal 110 together with the payload.
  • the subscriber terminal 110 may check that the key is updated by checking the key update flag in the message.
  • the subscriber terminal 110 may decrypt the new payload encryption key 60 using the existing payload encryption key 40 , and decrypt the encrypted payload included in the message with the new payload encryption key 60 . can do. Also, the subscriber terminal 110 may decrypt the encrypted topic included in the encrypted message using the first topic encryption key 20 .
  • the producer terminal 130 and the subscriber terminal 120 may encrypt and decrypt the payload by changing the payload encryption key at predetermined intervals.
  • FIG. 3 is a flowchart illustrating an operation of a subscriber terminal according to an embodiment.
  • the subscriber terminal 110 may establish a session by performing a handshake with the broker terminal 120 ( S310 ).
  • the subscriber terminal 110 may use the session key generated during session establishment as the first topic encryption key for decrypting the topic of the received message.
  • the subscriber terminal 110 may transmit a subscription request for a topic for which message reception is desired to the broker terminal 120 (S320).
  • the subscriber terminal 110 may determine whether a message has been received from the broker terminal 120 (S330).
  • step S330 if the message is not received, the subscriber terminal 110 may proceed to step S340 and wait for a predetermined time to receive the message.
  • step S330 upon receiving the message, the subscriber terminal 110 may proceed to step S340.
  • the subscriber terminal 110 may check the message by decrypting the message. In this case, the subscriber terminal may decrypt the encrypted topic in the message with the first topic encryption key. Also, the subscriber terminal 110 may decrypt the encrypted payload in the message with the payload encryption key.
  • the subscriber terminal 110 when the subscriber terminal 110 receives the payload encryption key, it generates a one-time encryption key using the public key (DH public key) transmitted from the producer terminal 130 using a key exchange algorithm, and the encrypted pay It can be obtained by decrypting the load encryption key with a one-time encryption key.
  • the public key DH public key
  • the new payload encryption key encrypted with the existing payload encryption key may be decrypted to obtain a new payload encryption key.
  • the subscriber terminal 110 may decrypt the encrypted payload.
  • the subscriber terminal 110 may determine whether to end the operation (S350).
  • step S350 if the operation is not terminated, the subscriber terminal 110 may proceed to step S330 and wait for reception of the next message. However, the subscriber terminal 110 may proceed to another step as needed.
  • the subscriber terminal 110 may end the operation.
  • FIG. 4 is a flowchart illustrating an operation of a broker terminal according to an embodiment.
  • the broker terminal 120 may establish a session with the subscriber terminal 110 ( S410 ).
  • the broker terminal 120 may use the session key generated during session establishment as a second topic encryption key for encrypting the topic of a message to be transmitted to the subscriber terminal 110 .
  • the broker terminal 120 may set up a subscription with the subscriber terminal 110 for a specific topic to be subscribed to in the subscriber terminal 110 (S420).
  • the broker terminal 120 may check whether a session establishment request exists from the producer terminal 130 (S430).
  • step S430 if there is no session establishment request from the producer terminal 130 , the broker terminal 120 waits for a predetermined time and then proceeds to step S430 to check whether the session establishment request exists.
  • step S430 if there is a session establishment request from the producer terminal 130 , the broker terminal 120 may proceed to step S440 .
  • the broker terminal 120 may establish a session with the producer terminal 130 (S440).
  • the broker terminal 120 may use the session key generated during session establishment as the second topic encryption key for decrypting the topic of the message received from the producer terminal 130 .
  • the broker terminal 120 may determine whether a message has been received from the producer terminal 130 (S450).
  • step S450 if a message is not received from the producer terminal 130 , the broker terminal 120 waits for a predetermined time and then proceeds to step S450 to determine reception of the message from the producer terminal 130 .
  • step S450 when a message is received from the producer terminal 130, the broker terminal 120 may proceed to step S460.
  • the broker terminal 120 may decrypt the encrypted topic in the message with the second topic encryption key, and encrypt the decrypted topic with the first topic encryption key (S460).
  • the broker terminal 120 may transmit a message including the topic encrypted with the first topic encryption key and the encrypted payload in the message to the subscriber terminal 110 (S470).
  • the broker terminal 120 may determine whether to end the operation (S480).
  • step S480 if the operation is not terminated, the broker terminal 120 may proceed to step S450 and wait for reception of the next message. However, the broker terminal 120 may proceed to another step as needed.
  • the broker terminal 120 may end the operation.
  • 5 to 6 are flowcharts illustrating an operation of a producer terminal according to an embodiment.
  • the producer terminal 130 may establish a session ( S511 ).
  • the producer terminal 130 may establish a session when there is a message to be transmitted for the topic.
  • the producer terminal 130 may check whether to use the group key (S513). These group keys may be unified and managed as one in the same layer for payload transmission. At this time, the producer terminal 130 must receive the group key from the master terminal that manages the group key, that is, the master node. For this reason, when the producer terminal 130 newly enters the network system, it can determine whether to use the group key or its own payload encryption key while generating the topic.
  • step S5 As a result of checking in step S513, if the group key is not used, the producer terminal 130 may proceed to step S525.
  • step S513 if the group key is used, the producer terminal 130 proceeds to step S515.
  • the producer terminal 130 to register the topic of '/building/5thfloor/temperature' may use the /building/5thfloor key.
  • the producer terminal 130 may search for the group key to receive the group key from the master terminal (S515).
  • the producer terminal 130 may determine whether the group key has been received within a preset time according to the group key search (S517).
  • step S517 if the group key is received within a preset time, the producer terminal 130 may proceed to step S519.
  • the producer terminal 130 may generate a payload encryption key using the group key and proceed to step S525.
  • the producer terminal 130 may directly use the group key as the payload encryption key, but may also generate the payload encryption key using the group key.
  • step S517 if the group key is not received within a preset time, the producer terminal 130 may proceed to step S521.
  • the producer terminal 130 must receive the group key from the master terminal.
  • a temporary payload key may be generated and used in a situation in which it is difficult to receive the group key.
  • the producer terminal 130 may generate a temporary payload key (S521).
  • the producer terminal 130 may generate a payload encryption key using the temporary payload key, and proceed to step S521 (S523). After receiving the group key, the producer terminal 130 performs the payload encryption key update operation described in steps S239 to S241 of FIG. 2 to generate the payload encryption key generated as a temporary payload key using the group key. It can be used by converting the payload encryption key.
  • the producer terminal 130 may check whether a subscriber authentication request has been received from the broker terminal 120 (S525).
  • step S525 if the subscriber is not authenticated, the producer terminal 130 may proceed to step S535.
  • step S525 if the subscriber is authenticated, the producer terminal 130 may proceed to step S527.
  • the producer terminal 130 may generate a message by encrypting the topic and the payload.
  • the producer terminal 130 may generate a payload encryption key while generating a topic when not using the group key. In this case, the producer terminal 130 may also initialize the payload sequence number to 0.
  • the producer terminal 130 may encrypt the topic with the topic encryption key generated when establishing a session with the broker terminal, and the payload may be encrypted with the payload encryption key.
  • the producer terminal 130 may generate a one-time encryption key using the public key received from the subscriber terminal 110 .
  • the producer terminal 130 may encrypt the payload encryption key with a one-time encryption key.
  • the producer terminal 130 may transmit a message to the broker terminal (S529).
  • the producer terminal 130 transmits the payload encryption key to the producer terminal, there is no need to transmit the payload encryption key when transmitting the next message.
  • the producer terminal 130 may check whether to update the payload encryption key when a predetermined period or the like arrives (S531).
  • step S531 if the payload encryption key is not updated, the producer terminal 130 may generate a message by proceeding to step S527.
  • step S531 when updating the payload encryption key, the producer terminal 130 may proceed to step S533.
  • the producer terminal 130 may generate a new payload encryption key and encrypt the new payload encryption key with the existing payload encryption key (S533).
  • the producer terminal 130 may encrypt the payload to be transmitted with the new payload encryption key if there is a payload to be transmitted.
  • the producer terminal 130 may transmit a message in which the payload encryption key is updated including the new encrypted payload encryption key to the subscriber terminal 110 through the broker terminal 120 .
  • the producer terminal 130 may determine whether to end the operation (S537).
  • step S537 if the operation is not terminated, the producer terminal 130 may proceed to step S527 to generate a message. However, the producer terminal 130 may proceed to another step as needed.
  • the broker terminal 120 may end the operation.
  • ' ⁇ unit' used in this embodiment means software or hardware components such as field programmable gate array (FPGA) or ASIC, and ' ⁇ unit' performs certain roles.
  • ' ⁇ part' is not limited to software or hardware.
  • the ' ⁇ unit' may be configured to reside on an addressable storage medium or may be configured to refresh one or more processors.
  • ' ⁇ ' refers to components such as software components, object-oriented software components, class components, and task components, and processes, functions, properties, and procedures. , subroutines, segments of program patent code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
  • components and ' ⁇ units' may be implemented to play one or more CPUs in a device or secure multimedia card.
  • the message security method may be implemented as a computer program (or computer program product) including instructions executable by a computer.
  • the computer program includes programmable machine instructions processed by a processor, and may be implemented in a high-level programming language, an object-oriented programming language, an assembly language, or a machine language.
  • the computer program may be recorded in a tangible computer-readable recording medium (eg, a memory, a hard disk, a magnetic/optical medium, or a solid-state drive (SSD), etc.).
  • the message security method may be implemented by executing the computer program as described above by a computing device.
  • the computing device may include at least a portion of a processor, a memory, a storage device, a high-speed interface connected to the memory and the high-speed expansion port, and a low-speed interface connected to the low-speed bus and the storage device.
  • a processor may include at least a portion of a processor, a memory, a storage device, a high-speed interface connected to the memory and the high-speed expansion port, and a low-speed interface connected to the low-speed bus and the storage device.
  • Each of these components is connected to each other using various buses, and may be mounted on a common motherboard or in any other suitable manner.
  • the processor may process a command within the computing device, such as for displaying graphic information for providing a Graphical User Interface (GUI) on an external input or output device, such as a display connected to a high-speed interface.
  • GUI Graphical User Interface
  • Examples are instructions stored in memory or a storage device.
  • multiple processors and/or multiple buses may be used with multiple memories and types of memory as appropriate.
  • the processor may be implemented as a chipset formed by chips including a plurality of independent analog and/or digital processors.
  • Memory also stores information within the computing device.
  • the memory may be configured as a volatile memory unit or a set thereof.
  • the memory may be configured as a non-volatile memory unit or a set thereof.
  • the memory may also be another form of computer readable medium such as, for example, a magnetic or optical disk.
  • a storage device may provide a large-capacity storage space to the computing device.
  • a storage device may be a computer-readable medium or a component comprising such a medium, and may include, for example, devices or other components within a storage area network (SAN), a floppy disk device, a hard disk device, an optical disk device, or a tape device, a flash memory, or other semiconductor memory device or device array similar thereto.
  • SAN storage area network
  • floppy disk device a hard disk device
  • an optical disk device or a tape device
  • flash memory or other semiconductor memory device or device array similar thereto.

Abstract

A network system according to an embodiment of the present invention comprises: a producer terminal for generating a topic; a subscriber terminal for subscribing to the topic; and a broker terminal which communicates with the subscriber terminal and the producer terminal, decrypts an encrypted topic by using a second topic encryption key shared with the producer terminal so as to identify a subscriber terminal which is subscribing to the decrypted topic when a message including the encrypted topic and an encrypted payload is received from the producer terminal, and encrypts the topic by using a first topic encryption key shared with the subscriber terminal so as to transmit the encrypted topic together with the encrypted payload to the subscriber terminal.

Description

네트워크 시스템 및 그것의 메시지 보안 방법Network system and its message security method
본 명세서에서 개시되는 실시예들은 네트워크 시스템 및 그것의 메시지 보안 방법에 관한 것이다. 보다 상세하게는, 생산자와 구독자 사이를 중계하는 브로커에 의한 메시지의 유출이나 조작을 방지할 수 있도록 메시지 보안을 높일 수 있는 네트워크 시스템 및 그것의 메시지 보안 방법에 관한 것이다.Embodiments disclosed herein relate to a network system and its message security method. More particularly, it relates to a network system capable of increasing message security so as to prevent leakage or manipulation of a message by a broker relaying between a producer and a subscriber, and a message security method thereof.
본 연구는 과학기술정보통신부와 정보통신기획평가원의 방송통신산업기술개발 사업의 연구결과로 수행되었음(IITP-2016-0-00160-005).This study was carried out as a result of the research results of the broadcasting and communication industry technology development project of the Ministry of Science and ICT and the Information and Communication Planning and Evaluation Institute (IITP-2016-0-00160-005).
기존에 경량의 구독/생산(Pub(Publish)/Sub(Subsribe)) 메시지 프로토콜로 메시지 큐잉 텔레메트리 트랜스포트(MQTT: Message Queueing Telemetry Transport) 프로토콜이 사용되고 있다. MQTT 프로토콜은 기계 대 기계(M2M: Machine to Machine)와 사물 인터넷(IoT: Internet of Thing) 환경에서 사용을 위해 만들어 졌다. 이러한, MQTT 프로토콜은 저전력, 낮은 대역폭 환경에서도 사용할 수 있도록 설계된 프로토콜이다.The Message Queuing Telemetry Transport (MQTT) protocol is used as a lightweight subscription/production (Pub(Publish)/Sub(Subsribe)) message protocol. The MQTT protocol was created for use in Machine to Machine (M2M) and Internet of Things (IoT) environments. The MQTT protocol is a protocol designed to be used in a low-power, low-bandwidth environment.
이러한 MQTT 프로토콜은 메시지를 발행(publishing)하고, 관심있는 주제를 구독(subscribe) 하는 것을 기본 원칙으로 동작한다. 이를 위해, MQTT 프로토콜을 이용하는 네트워크에서는 구독자 단말에서 관심있는 토픽을 구독하면, 생산자 단말에서 토픽과 관련된 메시지를 생성하여 구독자 단말로 전달할 수 있다.This MQTT protocol operates as a basic principle of publishing messages and subscribing to topics of interest. To this end, in a network using the MQTT protocol, when a subscriber terminal subscribes to a topic of interest, the producer terminal may generate a message related to the topic and deliver it to the subscriber terminal.
관련하여 선행기술문헌인 한국공개특허 제10-2018-0105917호에서는 웨어러블 데이터를 생성하는 웨어러블 디바이스, 웨어러블 데이터를 수신하여 네트워크 상으로 분배하는 웨어러블 브로커, 웨어러블 데이터를 제공받는 사용자 단말을 포함한 웨어러블 정보 서비스 시스템을 기재한다.In relation to this, in Korea Patent Application Laid-Open No. 10-2018-0105917, a prior art document, a wearable information service including a wearable device that generates wearable data, a wearable broker that receives and distributes wearable data over a network, and a user terminal that receives wearable data Describe the system.
선행기술문헌에서와 같이 MQTT를 활용하는 시스템에서는 데이터 전송의 중간 과정에 위치한 브로커에 의한 데이터 유출이나 조작과 같은 상황을 고려하지 않는다. 이로 인해, 생산자 단말과 구독자 단말 간에 헬스 케어 정보와 같은 민감 정보를 교환할 경우, 생산자 단말이나 구독자 단말은 브로커 등에 의한 데이터 유출이나 조작에 대한 위험을 감수해야 하는 문제점이 있었다.In a system using MQTT as in the prior art literature, situations such as data leakage or manipulation by a broker located in the middle of data transmission are not considered. For this reason, when exchanging sensitive information such as health care information between the producer terminal and the subscriber terminal, the producer terminal or the subscriber terminal has a problem that has to take the risk of data leakage or manipulation by a broker or the like.
따라서, 근래에는 이러한 문제점을 해결하기 위한 장치 및 방법이 요구되고 있는 실정이다.Therefore, in recent years, there is a need for an apparatus and method for solving these problems.
한편, 전술한 배경기술은 발명자가 본 발명의 도출을 위해 보유하고 있었거나, 본 발명의 도출 과정에서 습득한 기술 정보로서, 반드시 본 발명의 출원 전에 일반 공중에게 공개된 공지기술이라 할 수는 없다.On the other hand, the above-mentioned background art is technical information that the inventor possessed for the derivation of the present invention or acquired in the process of derivation of the present invention, and it cannot be said that it is necessarily known technology disclosed to the general public before the filing of the present invention. .
본 명세서에서 개시되는 실시예들은, 생산자와 구독자 사이를 중계하는 브로커에 의한 메시지 유출이나 조작을 방지할 수 있는 네트워크 시스템 및 그것의 메시지 보안 방법을 제시하는 데에 목적이 있다.Embodiments disclosed herein have an object to provide a network system capable of preventing message leakage or manipulation by a broker relaying between producers and subscribers and a message security method thereof.
상기와 같은 기술적 과제를 해결하기 위해 본 명세서에서 개시되는 실시예들은, 토픽을 생성하는 생산자 단말로부터 암호화된 토픽 및 페이로드를 수신하면, 생산자 단말과 공유하는 암호키를 이용하여 토픽을 복호화하여 토픽을 구독 중인 구독자 단말을 확인하고, 구독자 단말과 공유하는 암호키를 이용하여 토픽을 암호화한 후 암호화된 페이로드와 함께 구독자 단말에 전송하는 특징을 갖는다.In order to solve the above technical problem, the embodiments disclosed in the present specification, when receiving an encrypted topic and a payload from a producer terminal that generates a topic, decrypts the topic using an encryption key shared with the producer terminal. Checks the subscriber terminal subscribing to , encrypts the topic using an encryption key shared with the subscriber terminal, and then transmits it to the subscriber terminal together with the encrypted payload.
전술한 기술적 해결방법에 의하면, 생산자와 구독자 사이를 중계하는 브로커에 의한 메시지 유출이나 조작을 방지할 수 있는 네트워크 시스템 및 그것의 메시지 보안 방법을 제시할 수 있다.According to the above-described technical solution, it is possible to provide a network system capable of preventing message leakage or manipulation by a broker that relays between producers and subscribers, and a message security method thereof.
본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtainable in the present invention are not limited to the above-mentioned effects, and other effects not mentioned may be clearly understood by those of ordinary skill in the art from the following description. will be.
도 1은 일 실시예에 따른 네트워크 시스템을 도시한 도면이다.1 is a diagram illustrating a network system according to an embodiment.
도 2는 일 실시예에 따른 네트워크 시스템의 동작을 도시한 순서도이다.2 is a flowchart illustrating an operation of a network system according to an embodiment.
도 3은 일 실시예에 따른 구독자 단말의 동작을 도시한 순서도이다.3 is a flowchart illustrating an operation of a subscriber terminal according to an embodiment.
도 4는 일 실시예에 따른 브로커 단말의 동작을 도시한 순서도이다.4 is a flowchart illustrating an operation of a broker terminal according to an embodiment.
도 5 내지 도 6은 일 실시예에 따른 생산자 단말의 동작을 도시한 순서도이다.5 to 6 are flowcharts illustrating an operation of a producer terminal according to an embodiment.
상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 일 실시예에 따르면, 네트워크 시스템은, 토픽을 생성하는 생산자 단말, 상기 토픽을 구독하는 구독자 단말, 및 상기 구독자 단말 및 상기 생산자 단말과 통신하며, 상기 생산자 단말로부터 암호화된 토픽과 암호화된 페이로드가 포함된 메시지를 수신하면, 상기 암호화된 토픽을 상기 생산자 단말과 공유하는 제 2 토픽 암호키를 이용하여 복호화하여 복호화된 토픽을 구독 중인 구독자 단말을 확인하고, 상기 구독자 단말과 공유하는 제 1 토픽 암호키를 이용하여 상기 토픽을 암호화하여 상기 암호화된 페이로드와 함께 상기 구독자 단말로 전송하는 브로커 단말을 포함한다. As a technical means for achieving the above technical problem, according to an embodiment, the network system communicates with a producer terminal generating a topic, a subscriber terminal subscribing to the topic, and the subscriber terminal and the producer terminal, When a message including an encrypted topic and an encrypted payload is received from the producer terminal, the encrypted topic is decrypted using a second topic encryption key shared with the producer terminal to check the subscriber terminal subscribing to the decrypted topic and a broker terminal for encrypting the topic using a first topic encryption key shared with the subscriber terminal and transmitting the encrypted payload to the subscriber terminal.
다른 실시예에 따르면, 네트워크 시스템에서 수행되는 메시지 보안 방법은, 브로커 단말이, 토픽을 구독하는 구독자 단말과 세션을 설정하는 단계, 상기 브로커 단말이, 상기 토픽을 생성하는 생산자 단말과 세션을 설정하는 단계, 상기 브로커 단말이, 상기 생산자 단말로부터 암호화된 토픽과 암호화된 페이로드가 포함된 메시지를 수신하면, 상기 암호화된 토픽을 상기 생산자 단말과 공유하는 제 2 토픽 암호키를 이용하여 복호화하는 단계, 및 상기 브로커 단말이, 상기 복호화된 토픽을 구독 중인 구독자 단말을 확인하고, 상기 구독자 단말과 공유하는 제 1 토픽 암호키를 이용하여 상기 토픽을 암호화하여 상기 암호화된 페이로드와 함께 상기 구독자 단말로 전송하는 단계를 포함한다.According to another embodiment, a message security method performed in a network system includes, by a broker terminal, establishing a session with a subscriber terminal subscribing to a topic, the broker terminal establishing a session with a producer terminal generating the topic Step, when the broker terminal receives a message including an encrypted topic and an encrypted payload from the producer terminal, decrypting the encrypted topic using a second topic encryption key shared with the producer terminal; and the broker terminal identifies a subscriber terminal subscribing to the decrypted topic, encrypts the topic using a first topic encryption key shared with the subscriber terminal, and transmits it to the subscriber terminal together with the encrypted payload including the steps of
아래에서는 첨부한 도면을 참조하여 다양한 실시예들을 상세히 설명한다. 아래에서 설명되는 실시예들은 여러 가지 상이한 형태로 변형되어 실시될 수도 있다. 실시예들의 특징을 보다 명확히 설명하기 위하여, 이하의 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에게 널리 알려져 있는 사항들에 관해서 자세한 설명은 생략하였다. 그리고, 도면에서 실시예들의 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, various embodiments will be described in detail with reference to the accompanying drawings. The embodiments described below may be modified and implemented in various different forms. In order to more clearly describe the characteristics of the embodiments, detailed descriptions of matters widely known to those of ordinary skill in the art to which the following embodiments belong are omitted. In addition, in the drawings, parts irrelevant to the description of the embodiments are omitted, and similar reference numerals are attached to similar parts throughout the specification.
명세서 전체에서, 어떤 구성이 다른 구성과 "연결"되어 있다고 할 때, 이는 '직접적으로 연결'되어 있는 경우뿐 아니라, '그 중간에 다른 구성을 사이에 두고 연결'되어 있는 경우도 포함한다. 또한, 어떤 구성이 어떤 구성을 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한, 그 외 다른 구성을 제외하는 것이 아니라 다른 구성들을 더 포함할 수도 있음을 의미한다.Throughout the specification, when a component is said to be "connected" with another component, it includes not only a case of 'directly connected' but also a case of 'connected with another component interposed therebetween'. In addition, when a component "includes" a component, it means that other components may be further included, rather than excluding other components, unless otherwise stated.
네트워크 시스템은 생산자 단말과 구독자 단말, 즉 생산자와 구독자 모델을 이용하여 통신을 하는 시스템을 의미한다. 이러한 네트워크 시스템은 발행 구독 기반의 메시지 프로토콜에 기반하여 동작할 수 있으며, 예를 들어, 경량의 구독/생산(Pub(Publish)/Sub(Subsribe)) 메시지 프로토콜로 메시지 큐잉 텔레메트리 트랜스포트(MQTT: Message Queueing Telemetry Transport) 프로토콜이 적용될 수 있다. 이러한, 네트워크 시스템은 스마트 팩토리 또는 스마트 홈과 같은 프록시를 활용할 수 있는 시스템을 모두 포함할 수 있다.The network system refers to a system that communicates using a producer terminal and a subscriber terminal, that is, a producer and subscriber model. Such a network system can operate based on a publish subscription-based message protocol, for example, a lightweight subscription/production (Pub(Publish)/Sub(Subsribe)) message protocol with message queuing telemetry transport (MQTT). : Message Queuing Telemetry Transport) protocol can be applied. Such a network system may include all systems capable of utilizing a proxy, such as a smart factory or a smart home.
이하 첨부된 도면을 참고하여 실시예들을 상세히 설명하기로 한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.
도 1은 일 실시예에 따른 네트워크 시스템을 도시한 도면이다.1 is a diagram illustrating a network system according to an embodiment.
도 1에 도시된 바와 같이, 네트워크 시스템(100)은 구독자 단말(110), 브로커 단말(120), 생산자 단말(130) 및 마스터 단말(140)을 포함할 수 있다.As shown in FIG. 1 , the network system 100 may include a subscriber terminal 110 , a broker terminal 120 , a producer terminal 130 , and a master terminal 140 .
구독자 단말(110)은 생산자 단말(130)에서 생성되는 토픽을 구독하기 위해 브로커 단말과 연결될 수 있으며, 메시지를 중계하는 브로커 단말(120)을 통해 생산자 단말(130)에서 생성된 메시지를 수신할 수 있다. 여기서, 메시지는 토픽과 토픽에 대응되는 페이로드를 포함할 수 있으며, 각각 암호화되어 있다.The subscriber terminal 110 may be connected to the broker terminal in order to subscribe to the topic generated by the producer terminal 130, and the message generated by the producer terminal 130 may be received through the broker terminal 120 relaying the message. have. Here, the message may include a topic and a payload corresponding to the topic, and each is encrypted.
한편, 브로커 단말(120)은 구독자 단말(110) 및 생산자 단말(130)과 통신할 수 있다. 브로커 단말(120)은 통신을 위해 구독자 단말(110) 및 생산자 단말(130) 각각과 세션을 설정할 수 있다. 이를 통해, 브로커 단말(120)은 구독자 단말(110)에 의해 구독 요청된 토픽에 관련된 페이로드를 생산자 단말(130)로부터 수신하면, 해당 토픽에 관련된 페이로드를 구독자 단말로 제공할 수 있다.Meanwhile, the broker terminal 120 may communicate with the subscriber terminal 110 and the producer terminal 130 . The broker terminal 120 may establish a session with each of the subscriber terminal 110 and the producer terminal 130 for communication. Through this, when the broker terminal 120 receives the payload related to the topic subscribed to by the subscriber terminal 110 from the producer terminal 130, the broker terminal 120 may provide the payload related to the topic to the subscriber terminal.
브로커 단말(120)은 구독자 단말(110)과 세션 설정 시 제 1 토픽 암호키(20)를 생성할 수 있으며, 생산자 단말(130)과 세션 설정 시 제 2 토픽 암호키(30)를 생성할 수 있다. 이때, 구독자 단말(110)에서도 세션 설정 시 제 1 토픽 암호키(20)를 생성할 수 있으며, 생산자 단말(130)에서도 세션 설정 시 제 2 토픽 암호키(30)를 생성할 수 있다.The broker terminal 120 may generate a first topic encryption key 20 when establishing a session with the subscriber terminal 110, and may generate a second topic encryption key 30 when establishing a session with the producer terminal 130 have. At this time, the subscriber terminal 110 may also generate the first topic encryption key 20 when the session is established, and the producer terminal 130 may also generate the second topic encryption key 30 when the session is established.
생산자 단말(130)은 페이로드를 암호화하기 위한 페이로드 암호키(40)를 생성할 수 있다. 이때, 생산자 단말(130)은 동일 계층에서 그룹키를 하나로 관리하여 사용하는 경우, 마스터 단말(140)로부터 그룹키를 수신할 수 있다. 생산자 단말(130)은 그룹키를 페이로드 암호키(40)로 설정하거나, 그룹키를 사용하여 페이로드 암호키(40)를 생성할 수도 있다. 생산자 단말(130)은 페이로드 암호키를 이용하여 페이로드를 암호화할 수 있으며, 제 2 토픽 암호키(30)를 이용하여 토픽을 암호화할 수 있다. 이를 통해, 생산자 단말(130)은 암호화한 토픽과 암호화된 페이로드를 포함한 메시지를 생성할 수 있다. 생산자 단말(130)은 메시지를 브로커 단말로 전송할 수 있다.The producer terminal 130 may generate a payload encryption key 40 for encrypting the payload. In this case, when the producer terminal 130 manages and uses one group key in the same layer, it may receive the group key from the master terminal 140 . The producer terminal 130 may set the group key as the payload encryption key 40 or generate the payload encryption key 40 using the group key. The producer terminal 130 may encrypt the payload using the payload encryption key, and may encrypt the topic using the second topic encryption key 30 . Through this, the producer terminal 130 may generate a message including an encrypted topic and an encrypted payload. The producer terminal 130 may transmit a message to the broker terminal.
한편, 마스터 단말(140)은 동일 계층의 그룹키가 하나로 통일되어 관리되는 경우, 그룹키를 관리할 수 있다. 마스터 단말(140)은 그룹키가 통일되어 관리되지 않고, 생산자 단말 각각에서 개별적인 페이로드 암호키를 생성하는 경우, 네트워크 시스템(10)에 포함되지 않을 수도 있다. 마스터 단말(140)은 브로커 단말(120)과 세션 설정을 하여 그룹키를 생산자 단말(130)로 제공할 수 있으며, 생산자 단말(130)과 직접 통신이 가능한 경우, 브로커 단말(120)을 경유하지 않고도 직접 그룹키를 생산자 단말(130)로 제공할 수도 있다.On the other hand, the master terminal 140 may manage the group key when the group key of the same layer is unified and managed. The master terminal 140 may not be included in the network system 10 when the group key is not unified and managed, and individual payload encryption keys are generated in each of the producer terminals. The master terminal 140 may provide the group key to the producer terminal 130 by establishing a session with the broker terminal 120, and if direct communication with the producer terminal 130 is possible, do not go through the broker terminal 120 It is also possible to directly provide the group key to the producer terminal 130 without the need to.
브로커 단말(120)은 생산자 단말(130)로부터 메시지를 수신할 수 있다. 브로커 단말(120)은 메시지에서 암호화된 토픽과 암호화된 페이로드를 분류할 수 있으며, 암호화된 토픽을 제 2 토픽 암호키(30)로 복호화할 수 있다. 브로커 단말(120)은 복호화한 토픽을 해당 토픽을 구독 중인 구독자 단말을 확인할 수 있다. 브로커 단말(120)은 복호화된 토픽을 제 1 토픽 암호키(20)로 암호화하여 암호화된 페이로드와 함께 해당 토픽을 구독 중인 구독자 단말(110)로 전달할 수 있다.The broker terminal 120 may receive a message from the producer terminal 130 . The broker terminal 120 may classify the encrypted topic and the encrypted payload in the message, and may decrypt the encrypted topic with the second topic encryption key 30 . The broker terminal 120 may check the decrypted topic and the subscriber terminal subscribing to the corresponding topic. The broker terminal 120 may encrypt the decrypted topic with the first topic encryption key 20 and deliver the topic together with the encrypted payload to the subscriber terminal 110 subscribing to the topic.
구독자 단말(110)은 수신된 메시지를 암호키를 이용하여 복호화할 수 있으며, 암호화된 토픽을 제 1 토픽 암호키(20)를 사용하여 토픽을 복호화하고, 암호화된 페이로드를 페이로드 암호키(40)를 사용하여 복호화할 수 있다. 구독자 단말(110)은 페이로드 암호키(40)를 생산자 단말(130)과 공개키를 서로 교환하여 생성한 일회용 암호키로 암호화한 상태로 수신하고, 이를 일회용 암호키로 복호화하여 획득할 수 있다.The subscriber terminal 110 may decrypt the received message using the encryption key, decrypt the encrypted topic using the first topic encryption key 20, and use the encrypted payload as the payload encryption key ( 40) can be used for decryption. The subscriber terminal 110 receives the payload encryption key 40 encrypted with the one-time encryption key generated by exchanging the public key with the producer terminal 130, and decrypts it with the one-time encryption key to obtain it.
이와 같이, 브로커 단말(120)은 구독자 단말(110)과 생산자 단말(130) 사이에 전송되는 메시지 내의 암호화된 토픽과 암호화된 페이로드 중에서 암호화된 토픽을 확인하면, 메시지 내용에 대한 확인 없이도 메시지를 전달할 수 있기 때문에 브로커에서 메시지 내용을 볼 수 없게 구독자 단말(110)과 생산자 단말(130) 간에 전송되는 메시지를 암호화하여 전달할 수 있다.As such, when the broker terminal 120 checks the encrypted topic among the encrypted topic and the encrypted payload in the message transmitted between the subscriber terminal 110 and the producer terminal 130, the message is transmitted without checking the message content. Because it can be delivered, the message transmitted between the subscriber terminal 110 and the producer terminal 130 can be encrypted and delivered so that the broker cannot see the message content.
이를 통해, 구독자 단말(110)과 브로커 단말(120) 또는 브로커 단말(120)과 생산자 단말(130) 사이에 토픽 암호키(20, 30)를 서로 공유하고, 구독자 단말(110)과 생산자 단말(130) 사이에 실제 데이터 즉, 페이로드를 암호화하기 위한 페이로드 암호키(40)를 공유하여 사용할 수 있다.Through this, the subscriber terminal 110 and the broker terminal 120 or the broker terminal 120 and the producer terminal 130 to share the topic encryption key (20, 30) with each other, the subscriber terminal 110 and the producer terminal ( 130) can be used by sharing the payload encryption key 40 for encrypting the actual data, that is, the payload.
이를 통해, 세션이 설정된 브로커 단말(120)에서 토픽을 확인하여 전송할 수 있어, 메시지 보안이 가능하다. 더욱이, 구독자 단말(110)과 생산자 단말(130) 사이에 전송되는 페이로드는 브로커 단말(120)에 의해 확인이 불가능하기 때문에 브로커 단말(120)에 의해 페이로드가 유출되거나 조작될 수 없어 메시지 보안을 높일 수 있다.Through this, the topic can be confirmed and transmitted in the broker terminal 120 in which the session is established, so that message security is possible. Moreover, since the payload transmitted between the subscriber terminal 110 and the producer terminal 130 cannot be checked by the broker terminal 120, the payload cannot be leaked or manipulated by the broker terminal 120, so message security can increase
도 2는 일 실시예에 따른 네트워크 시스템의 동작을 도시한 순서도이다.2 is a flowchart illustrating an operation of a network system according to an embodiment.
도 2에 도시된 바와 같이, 네트워크 시스템은 구독자 단말(110), 브로커 단말(120), 및 생산자 단말(130)을 포함한다.As shown in FIG. 2 , the network system includes a subscriber terminal 110 , a broker terminal 120 , and a producer terminal 130 .
구독자 단말(110)은 브로커 단말(120)로 세션 설정을 요청할 수 있다(S211). 이때, 구독자 단말은 공개키, 예를 들어, 디피-헬만(DH: Diffe-Hellman) 공개키를 생성할 수 있다. 구독자 단말(110)은 세션 설정의 요청 시, 공개키(DH공개키), 서명, 인증서를 함께 전송할 수 있다.The subscriber terminal 110 may request session establishment from the broker terminal 120 (S211). In this case, the subscriber terminal may generate a public key, for example, a Diffe-Hellman (DH) public key. The subscriber terminal 110 may transmit a public key (DH public key), a signature, and a certificate together when requesting session establishment.
브로커 단말(120)은 구독자 단말(110)로 세션 설정의 요청에 대한 응답을 할 수 있다(S213). 브로커 단말(120)은 세션 설정 요청에 따라 수신된 구독자 단말(110)의 공개키(DH공개키), 서명 및 인증서를 저장할 수 있다. 브로커 단말은 세션 설정 응답 시, 브로커 단말(120) 자신의 인증서를 구독자 단말로 제공할 수 있다.The broker terminal 120 may respond to the request for session establishment to the subscriber terminal 110 (S213). The broker terminal 120 may store the public key (DH public key), signature, and certificate of the subscriber terminal 110 received according to the session establishment request. When the broker terminal responds to session establishment, the broker terminal 120 may provide its own certificate to the subscriber terminal.
이와 같이, 구독자 단말(110)은 특정 토픽을 구독하기 위해 브로커 단말(120)과 핸드쉐이크(handshake)를 수행할 수 있다.In this way, the subscriber terminal 110 may perform a handshake with the broker terminal 120 to subscribe to a specific topic.
이를 통해, 구독자 단말(110)과 브로커 단말(120)은 세션 설정을 할 수 있다(S215). 구독자 단말(110)과 브로커 단말(120)은 예를 들어, 전송계층보안(TLS: Transport Layer Security) 세션을 설정할 수 있다. 구독자 단말(110)과 브로커 단말(120)은 세션 설정 시 세션키를 생성할 수 있다. 이때, 생성된 세션키가 브로커 단말(120)과 구독자 단말(110) 각각에서 토픽의 암호화 또는 복호화를 위한 제 1 토픽 암호키(20)로 사용될 수 있다.Through this, the subscriber terminal 110 and the broker terminal 120 may establish a session (S215). The subscriber terminal 110 and the broker terminal 120 may establish, for example, a Transport Layer Security (TLS) session. The subscriber terminal 110 and the broker terminal 120 may generate a session key when establishing a session. In this case, the generated session key may be used as the first topic encryption key 20 for encrypting or decrypting a topic in each of the broker terminal 120 and the subscriber terminal 110 .
구독자 단말(110)은 브로커 단말(120)로 특정 토픽에 대한 구독을 위한 연결 요청을 할 수 있다(S217). 또한, 브로커 단말(120)은 구독자 단말(110)의 연결 요청에 대한 연결 응답을 할 수 있다(S219).The subscriber terminal 110 may make a connection request for subscription to a specific topic to the broker terminal 120 (S217). In addition, the broker terminal 120 may make a connection response to the connection request of the subscriber terminal 110 (S219).
구독자 단말(110)은 브로커 단말(120)로 구독을 원하는 특정 토픽에 대한 구독 요청할 수 있다(S221). 브로커 단말(120)은 구독자 단말(110)로 구독 요청에 대한 구독 응답을 할 수 있다(S223). 이와 같이, 구독자 단말(110)은 브로커 단말(120) 간에 특정 토픽에 대한 구독 요청을 하고, 구독 요청에 대응되는 구독 응답을 받으면, 구독자 단말(110)은 자신이 원하는 특정 토픽에 대한 메시지 메시지를 수신할 준비를 완료할 수 있다.The subscriber terminal 110 may request a subscription to a specific topic desired to be subscribed to to the broker terminal 120 (S221). The broker terminal 120 may make a subscription response to the subscription request to the subscriber terminal 110 (S223). In this way, the subscriber terminal 110 makes a subscription request for a specific topic between the broker terminals 120 , and when receiving a subscription response corresponding to the subscription request, the subscriber terminal 110 sends a message message for the specific topic desired by the subscriber terminal 110 . Ready to receive.
한편, 생산자 단말(130)은 자신이 생성하는 토픽에 대해 전송할 메시지가 있으면, 브로커 단말(120)로 세션 설정을 요청할 수 있다(S225). 생산자 단말(130)은 토픽을 생성하면서 페이로드 암호키(40)를 생성할 수 있으며, 페이로드 시퀀스 번호를 0으로 초기화할 수 있다. 여기서, 페이로드 시퀀스 번호는 메시지 전송 시 카운트되는 정보로서, 구독자 단말(110)에서 페이로드를 검증하고, 메시지의 조작이나 순서 변경 여부를 확인하기 위해 사용될 수 있다.On the other hand, if there is a message to be transmitted on the topic that the producer terminal 130 generates, it may request the broker terminal 120 to establish a session (S225). The producer terminal 130 may generate the payload encryption key 40 while generating the topic, and may initialize the payload sequence number to 0. Here, the payload sequence number is information counted when a message is transmitted, and may be used to verify the payload in the subscriber terminal 110 and to check whether the message is manipulated or the order is changed.
브로커 단말(120)은 생산자 단말(130)로 세션 설정의 요청에 대한 응답을 할 수 있다(S227). 이때, 브로커 단말(120)은 구독자 단말로부터 수신한 공개키(DH공개키), 서명 및 인증서를 생산자 단말(130)로 전달할 수 있다.The broker terminal 120 may respond to the request for session establishment to the producer terminal 130 (S227). In this case, the broker terminal 120 may transmit the public key (DH public key), the signature, and the certificate received from the subscriber terminal to the producer terminal 130 .
이와 같이, 생산자 단말(130)은 토픽에 관련한 메시지를 전송하기 위해 브로커 단말(120)과 핸드쉐이크를 수행할 수 있다.In this way, the producer terminal 130 may perform a handshake with the broker terminal 120 in order to transmit a message related to the topic.
이를 통해, 생산자 단말(130)과 브로커 단말(120)은 세션 설정을 할 수 있다(S229). 생산자 단말(130)과 브로커 단말(120)은 예를 들어, 전송계층보안(TLS: Transport Layer Security) 세션을 설정할 수 있다. 생산자 단말(130)과 브로커 단말(120)은 세션 설정 시 세션키를 생성할 수 있다. 이때, 생성된 세션키가 생산자 단말(130)과 브로커 단말(120) 각각에서 토픽의 암호화 또는 복호화를 위한 제 2 토픽 암호키(30)로 사용될 수 있다.Through this, the producer terminal 130 and the broker terminal 120 may establish a session (S229). The producer terminal 130 and the broker terminal 120 may establish, for example, a Transport Layer Security (TLS) session. The producer terminal 130 and the broker terminal 120 may generate a session key when establishing a session. In this case, the generated session key may be used as the second topic encryption key 30 for encrypting or decrypting the topic in each of the producer terminal 130 and the broker terminal 120 .
생산자 단말(130)은 구독자 단말(110)의 인증서를 수신하면, 서명을 검증하고 생산자 단말(130)에서 생성한 토픽에 대한 참여 여부를 판단할 수 있다.When the producer terminal 130 receives the certificate of the subscriber terminal 110 , the producer terminal 130 may verify the signature and determine whether to participate in the topic generated by the producer terminal 130 .
생산자 단말(130)은 구독자 단말(110)을 해당 토픽에 참여 가능한 구독자 단말로 판단한 경우, 구독자 인증을 완료하기 위해 브로커 단말(120)로 구독자 인증 메시지를 전송할 수 있다(S231). 브로커 단말(120)은 수신한 구독자 인증 메시지를 구독자 단말(110)로 전송하여 구독자 인증을 완료할 수 있다(S233).When the producer terminal 130 determines that the subscriber terminal 110 is a subscriber terminal capable of participating in the topic, the producer terminal 130 may transmit a subscriber authentication message to the broker terminal 120 to complete the subscriber authentication (S231). The broker terminal 120 may transmit the received subscriber authentication message to the subscriber terminal 110 to complete subscriber authentication (S233).
또한, 생산자 단말(130)은 구독자 단말(110)과 키 교환 알고리즘에 기초하여 구독자 단말(110)에서 전송한 공개키(DH공개키)로 일회용 암호키(50)를 생성할 수 있다. 일회용 암호키(50)는 페이로드 암호키(40)를 암호화하여 구독자 단말(110)로 전달하기 위한 암호키로 사용되며, 페이로드 시퀀스 번호의 암호화에도 사용될 수 있다. 이러한, 일회용 암호키(50)는 페이로드 암호키(40)의 전달을 위해 한 번만 사용될 수 있다.In addition, the producer terminal 130 may generate the one-time encryption key 50 with the public key (DH public key) transmitted from the subscriber terminal 110 based on the key exchange algorithm with the subscriber terminal 110 . The one-time encryption key 50 is used as an encryption key for encrypting the payload encryption key 40 and delivering it to the subscriber terminal 110, and may also be used for encryption of the payload sequence number. This, one-time encryption key 50 may be used only once for delivery of the payload encryption key 40 .
생산자 단말(130)은 메시지를 생성하고, 생성된 메시지를 브로커 단말(120)로 전송할 수 있다(S235). 이때, 생산자 단말(130)은 토픽을 제 2 암호키(30)로 암호화하고, 토픽에 관련된 페이로드를 페이로드 암호키(40)로 암호화하여 메시지를 생성할 수 있다. 생산자 단말(130)은 메시지를 이용하여 일회용 암호키로 암호화한 페이로드 암호키와 페이로드 시퀀스 번호를 함께 전송할 수 있다. 또한 생산자 단말(130)은 생산자 단말(130)의 DH 공개키, 서명 및 인증서도 메시지와 함께 브로커 단말(120)로 전송할 수 있다.The producer terminal 130 may generate a message and transmit the generated message to the broker terminal 120 (S235). In this case, the producer terminal 130 may generate a message by encrypting the topic with the second encryption key 30 and encrypting the payload related to the topic with the payload encryption key 40 . The producer terminal 130 may transmit the payload encryption key and the payload sequence number encrypted with the one-time encryption key together using the message. Also, the producer terminal 130 may transmit the DH public key, signature, and certificate of the producer terminal 130 to the broker terminal 120 together with the message.
이후, 생산자 단말(130)은 메시지 전송 시, 페이로드에 현재 페이로드 시퀀스 번호를 부여하고, 페이로드와 페이로드 시퀀스 번호를 페이로드 암호키로 암호화하여 브로커 단말(120)로 전달할 수 있다.Thereafter, the producer terminal 130 may give a current payload sequence number to the payload when transmitting the message, encrypt the payload and the payload sequence number with the payload encryption key, and transmit it to the broker terminal 120 .
브로커 단말(120)은 생산자 단말(130)의 메시지를 구독자 단말(110)로 전송할 수 있다(S237). 이때, 브로커 단말(120)은 생산자 단말(130)의 메시지에서 암호화된 토픽과 암호화된 페이로드를 분류하고, 제 2 토픽 암호키(30)로 복호화할 수 있다. 이를 통해, 브로커 단말(120)은 복호화된 토픽을 사용하여 해당 토픽을 구독 중인 구독자 단말(110)을 확인할 수 있다. 브로커 단말(120)은 토픽을 제 1 토픽 암호키(20)로 암호화하여 암호화된 페이로드와 함께 확인된 구독자 단말(110)로 전송할 수 있다.The broker terminal 120 may transmit the message of the producer terminal 130 to the subscriber terminal 110 (S237). In this case, the broker terminal 120 may classify the encrypted topic and the encrypted payload in the message of the producer terminal 130 , and decrypt it with the second topic encryption key 30 . Through this, the broker terminal 120 may use the decrypted topic to check the subscriber terminal 110 subscribing to the corresponding topic. The broker terminal 120 may encrypt the topic with the first topic encryption key 20 and transmit it to the confirmed subscriber terminal 110 together with the encrypted payload.
구독자 단말(110)은 브로커 단말(120)로부터 페이로드 암호키를 포함한 메시지를 수신하면, 키 교환 알고리즘에 기초하여 생산자 단말(130)에서 전송한 공개키로 일회용 암호키(50)를 생성하고, 생성된 일회용 암호키(50)로 암호화된 페이로드 암호키(40)와 암호화된 페이로드 시퀀스 번호를 복호화할 수 있다.When the subscriber terminal 110 receives a message including the payload encryption key from the broker terminal 120, it generates a one-time encryption key 50 with the public key transmitted from the producer terminal 130 based on the key exchange algorithm, and generates The one-time encryption key 50 can decrypt the encrypted payload encryption key 40 and the encrypted payload sequence number.
구독자 단말(110)은 복호화한 페이로드 암호키(40)로 메시지에 포함된 암호화된 페이로드를 복호화할 수 있다. 또한, 구독자 단말(110)은 메시지에 포함된 토픽을 브로커 단말(120)과 세션 설정 시 생성된 제 1 토픽 암호키(20)를 이용하여 복호화할 수 있다.The subscriber terminal 110 may decrypt the encrypted payload included in the message with the decrypted payload encryption key 40 . In addition, the subscriber terminal 110 may decrypt the topic included in the message using the first topic encryption key 20 generated when the session with the broker terminal 120 is established.
또한, 구독자 단말(110)은 페이로드 시퀀스 번호를 페이로드 암호키(40)로 복호화할 수 있다. 이러한, 페이로드 시퀀스 번호는 구독자 단말(110)에서 메시지의 조작이나 순서 변경 등을 확인하는 데이터 검증에 이용할 수 있다. 구독자 단말(110)은 메시지의 검증이 완료되면, 구독 요청한 토픽에 대응되는 메시지를 수신할 수 있다.Also, the subscriber terminal 110 may decrypt the payload sequence number with the payload encryption key 40 . Such a payload sequence number may be used for data verification for confirming manipulation or order change of messages in the subscriber terminal 110 . When the verification of the message is completed, the subscriber terminal 110 may receive a message corresponding to the subscription-requested topic.
한편, 생산자 단말(130)은 페이로드 암호키(40)를 소정 주기를 간격으로 업데이트, 즉 변경하여 메시지 보안을 강화할 수도 있다. 생산자 단말(130)은 페이로드 암호키(40)를 변경하기 위한 신규 페이로드 암호키(60)를 생성할 수 있다. 생산자 단말(130)은 신규 페이로드 암호키(60)를 구독자 단말(110)로 전달하기 위해, 메시지 내에 키 업데이트 플래그 정보를 활성화(예를 들면, 비트값 0 -> 1 등으로 변경)하고, 기존 페이로드 암호키(40)로 신규 페이로드 암호키(60)를 암호화할 수 있다. 이때, 생산자 단말(130)은 전송할 페이로드가 존재하면, 신규 페이로드 암호키(60)로 페이로드를 암호화하여 브로커 단말(120)로 전송할 수 있다(S239).Meanwhile, the producer terminal 130 may update, ie, change, the payload encryption key 40 at predetermined intervals to enhance message security. The producer terminal 130 may generate a new payload encryption key 60 for changing the payload encryption key 40 . The producer terminal 130 activates the key update flag information in the message in order to deliver the new payload encryption key 60 to the subscriber terminal 110 (eg, change the bit value 0 -> 1, etc.), The new payload encryption key 60 may be encrypted with the existing payload encryption key 40 . At this time, if there is a payload to be transmitted, the producer terminal 130 may encrypt the payload with the new payload encryption key 60 and transmit it to the broker terminal 120 (S239).
브로커 단말(120)은 생산자 단말(130)의 메시지를 구독자 단말(110)로 전송할 수 있다(S241). 이때, 브로커 단말(120)은 생산자 단말(130)의 메시지에서 암호화된 토픽을 추출하여 제 2 토픽 암호키(30)로 복호화할 수 있고, 토픽을 제 1 토픽 암호키(20)로 암호화하여 암호화된 페이로드와 함께 구독자 단말(110)로 전송할 수 있다.The broker terminal 120 may transmit the message of the producer terminal 130 to the subscriber terminal 110 (S241). At this time, the broker terminal 120 may extract the encrypted topic from the message of the producer terminal 130 and decrypt it with the second topic encryption key 30, and encrypt the topic with the first topic encryption key 20 It can be transmitted to the subscriber terminal 110 together with the payload.
구독자 단말(110)은 메시지 내에서 키 업데이트 플래그를 확인하여 키가 업데이트된 것을 확인할 수 있다. 구독자 단말(110)은 기존 페이로드 암호키(40)를 이용하여 신규 페이로드 암호키(60)를 복호화할 수 있고, 신규 페이로드 암호키(60)로 메시지에 포함된 암호화된 페이로드를 복호화할 수 있다. 또한, 구독자 단말(110)은 암호화된 메시지에 포함된 암호화된 토픽을 제 1 토픽 암호키(20)를 이용하여 복호화할 수 있다.The subscriber terminal 110 may check that the key is updated by checking the key update flag in the message. The subscriber terminal 110 may decrypt the new payload encryption key 60 using the existing payload encryption key 40 , and decrypt the encrypted payload included in the message with the new payload encryption key 60 . can do. Also, the subscriber terminal 110 may decrypt the encrypted topic included in the encrypted message using the first topic encryption key 20 .
이와 같이, 생산자 단말(130)과 구독자 단말(120)은 소정 주기를 간격으로 페이로드 암호키를 변경하여 페이로드를 암호화 및 복호화할 수 있다.In this way, the producer terminal 130 and the subscriber terminal 120 may encrypt and decrypt the payload by changing the payload encryption key at predetermined intervals.
도 3은 일 실시예에 따른 구독자 단말의 동작을 도시한 순서도이다.3 is a flowchart illustrating an operation of a subscriber terminal according to an embodiment.
도 3에 도시된 바와 같이, 구독자 단말(110)은 브로커 단말(120)과 핸드쉐이크를 수행하여 세션을 설정할 수 있다(S310). 구독자 단말(110)은 세션 설정 시 생성한 세션키를 수신되는 메시지의 토픽을 복호화하기 위한 제 1 토픽 암호키로 사용할 수 있다.As shown in FIG. 3 , the subscriber terminal 110 may establish a session by performing a handshake with the broker terminal 120 ( S310 ). The subscriber terminal 110 may use the session key generated during session establishment as the first topic encryption key for decrypting the topic of the received message.
구독자 단말(110)은 메시지 수신을 원하는 토픽에 대한 구독 요청을 브로커 단말(120)로 전송할 수 있다(S320).The subscriber terminal 110 may transmit a subscription request for a topic for which message reception is desired to the broker terminal 120 (S320).
구독자 단말(110)은 브로커 단말(120)로부터 메시지를 수신하였는지 판단할 수 있다(S330). The subscriber terminal 110 may determine whether a message has been received from the broker terminal 120 (S330).
S330단계의 판단결과, 메시지를 수신하지 못하면, 구독자 단말(110)은 S340단계로 진행하여 메시지 수신을 위해 소정 시간 대기할 수 있다.As a result of the determination in step S330, if the message is not received, the subscriber terminal 110 may proceed to step S340 and wait for a predetermined time to receive the message.
S330단계의 판단결과, 메시지를 수신하면, 구독자 단말(110)은 S340단계로 진행할 수 있다.As a result of the determination in step S330, upon receiving the message, the subscriber terminal 110 may proceed to step S340.
구독자 단말(110)은 메시지를 복호화하여 메시지를 확인할 수 있다. 이때, 구독자 단말은 메시지 내 암호화된 토픽을 제 1 토픽 암호키로 복호화할 수 있다. 또한, 구독자 단말(110)은 메시지 내 암호화된 페이로드를 페이로드 암호키로 복호화할 수 있다.The subscriber terminal 110 may check the message by decrypting the message. In this case, the subscriber terminal may decrypt the encrypted topic in the message with the first topic encryption key. Also, the subscriber terminal 110 may decrypt the encrypted payload in the message with the payload encryption key.
이때, 구독자 단말(110)은 페이로드 암호키를 수신하면, 키 교환 알고리즘을 이용하여 생산자 단말(130)에서 전송한 공개키(DH공개키)를 이용하여 일회용 암호키를 생성하고, 암호화된 페이로드 암호키를 일회용 암호키로 복호화하여 획득할 수 있다.At this time, when the subscriber terminal 110 receives the payload encryption key, it generates a one-time encryption key using the public key (DH public key) transmitted from the producer terminal 130 using a key exchange algorithm, and the encrypted pay It can be obtained by decrypting the load encryption key with a one-time encryption key.
또한, 구독자 단말(110)은 키 업데이트 플래그를 통해 페이로드 암호키의 변경을 확인하면, 기존 페이로드 암호키로 암호화된 신규 페이로드 암호키를 복호화하여 신규 페이로드 암호키를 획득할 수도 있다.In addition, when the subscriber terminal 110 confirms the change of the payload encryption key through the key update flag, the new payload encryption key encrypted with the existing payload encryption key may be decrypted to obtain a new payload encryption key.
이와 같이, 구독자 단말(110)은 페이로드 암호키 또는 신규 페이로드 암호키를 획득하면, 암호화된 페이로드를 복호화할 수 있다.As such, when the subscriber terminal 110 obtains the payload encryption key or the new payload encryption key, it may decrypt the encrypted payload.
구독자 단말(110)은 동작을 종료할지 확인할 수 있다(S350).The subscriber terminal 110 may determine whether to end the operation (S350).
S350단계의 확인 결과, 동작을 종료하지 않는 경우, 구독자 단말(110)은 S330단계로 진행하여 다음 메시지의 수신을 대기할 수 있다. 하지만, 구독자 단말(110)은 필요에 따라 다른 단계로 진행할 수도 있다.As a result of the check in step S350, if the operation is not terminated, the subscriber terminal 110 may proceed to step S330 and wait for reception of the next message. However, the subscriber terminal 110 may proceed to another step as needed.
S350단계의 확인 결과, 동작을 종료하는 경우, 구독자 단말(110)은 동작을 종료할 수 있다.As a result of checking in step S350, when the operation ends, the subscriber terminal 110 may end the operation.
도 4는 일 실시예에 따른 브로커 단말의 동작을 도시한 순서도이다.4 is a flowchart illustrating an operation of a broker terminal according to an embodiment.
도 4에 도시된 바와 같이, 브로커 단말(120)은 구독자 단말(110)과 세션을 설정할 수 있다(S410). 브로커 단말(120)은 세션 설정 시 생성한 세션키를 구독자 단말(110)로 전송할 메시지의 토픽을 암호화하기 위한 제 2 토픽 암호키로 사용할 수 있다.As shown in FIG. 4 , the broker terminal 120 may establish a session with the subscriber terminal 110 ( S410 ). The broker terminal 120 may use the session key generated during session establishment as a second topic encryption key for encrypting the topic of a message to be transmitted to the subscriber terminal 110 .
브로커 단말(120)은 구독자 단말(110)에서 구독을 원하는 특정 토픽에 대해 구독자 단말(110)과 구독 설정을 할 수 있다(S420).The broker terminal 120 may set up a subscription with the subscriber terminal 110 for a specific topic to be subscribed to in the subscriber terminal 110 (S420).
브로커 단말(120)은 생산자 단말(130)로부터 세션 설정 요청이 존재하는지 확인할 수 있다(S430).The broker terminal 120 may check whether a session establishment request exists from the producer terminal 130 (S430).
S430단계의 확인결과, 생산자 단말(130)로부터 세션 설정 요청이 존재하지 않으면, 브로커 단말(120)은 소정 시간 대기 후 S430단계로 진행하여 세션 설정 요청이 존재하는지 확인할 수 있다.As a result of checking in step S430 , if there is no session establishment request from the producer terminal 130 , the broker terminal 120 waits for a predetermined time and then proceeds to step S430 to check whether the session establishment request exists.
S430단계의 확인결과, 생산자 단말(130)로부터 세션 설정 요청이 존재하면, 브로커 단말(120)은 S440단계로 진행할 수 있다.As a result of checking in step S430 , if there is a session establishment request from the producer terminal 130 , the broker terminal 120 may proceed to step S440 .
브로커 단말(120)은 생산자 단말(130)과 세션 설정을 할 수 있다(S440). 브로커 단말(120)은 세션 설정 시 생성한 세션키를 생산자 단말(130)로부터 수신한 메시지의 토픽을 복호화하기 위한 제 2 토픽 암호키로 사용할 수 있다.The broker terminal 120 may establish a session with the producer terminal 130 (S440). The broker terminal 120 may use the session key generated during session establishment as the second topic encryption key for decrypting the topic of the message received from the producer terminal 130 .
브로커 단말(120)은 생산자 단말(130)로부터 메시지가 수신되었는지 판단할 수 있다(S450).The broker terminal 120 may determine whether a message has been received from the producer terminal 130 (S450).
S450단계의 판단결과, 생산자 단말(130)로부터 메시지가 수신되지 않으면, 브로커 단말(120)은 소정 시간 대기 후, S450 단계로 진행하여 생산자 단말(130)로부터의 메시지의 수신을 판단할 수 있다.As a result of the determination in step S450 , if a message is not received from the producer terminal 130 , the broker terminal 120 waits for a predetermined time and then proceeds to step S450 to determine reception of the message from the producer terminal 130 .
S450단계의 판단결과, 생산자 단말(130)로부터 메시지가 수신되면, 브로커 단말(120)은 S460단계로 진행할 수 있다.As a result of the determination in step S450, when a message is received from the producer terminal 130, the broker terminal 120 may proceed to step S460.
브로커 단말(120)은 메시지 내의 암호화된 토픽을 제 2 토픽 암호키로 복호화하고, 복호화된 토픽을 제 1 토픽 암호키로 암호화할 수 있다(S460).The broker terminal 120 may decrypt the encrypted topic in the message with the second topic encryption key, and encrypt the decrypted topic with the first topic encryption key (S460).
브로커 단말(120)은 제 1 토픽 암호키로 암호화된 토픽과 메시지 내의 암호화된 페이로드를 포함한 메시지를 구독자 단말(110)로 전송할 수 있다(S470).The broker terminal 120 may transmit a message including the topic encrypted with the first topic encryption key and the encrypted payload in the message to the subscriber terminal 110 (S470).
브로커 단말(120)은 동작을 종료할지 확인할 수 있다(S480).The broker terminal 120 may determine whether to end the operation (S480).
S480단계의 확인 결과, 동작을 종료하지 않는 경우, 브로커 단말(120)은 S450단계로 진행하여 다음 메시지의 수신을 대기할 수 있다. 하지만, 브로커 단말(120)은 필요에 따라 다른 단계로 진행할 수도 있다.As a result of checking in step S480, if the operation is not terminated, the broker terminal 120 may proceed to step S450 and wait for reception of the next message. However, the broker terminal 120 may proceed to another step as needed.
S480단계의 확인 결과, 동작을 종료하는 경우, 브로커 단말(120)은 동작을 종료할 수 있다.As a result of checking in step S480, when the operation is terminated, the broker terminal 120 may end the operation.
도 5 내지 도 6은 일 실시예에 따른 생산자 단말의 동작을 도시한 순서도이다.5 to 6 are flowcharts illustrating an operation of a producer terminal according to an embodiment.
도 5에 도시된 바와 같이, 생산자 단말(130)은 세션을 설정할 수 있다(S511). 생산자 단말(130)은 토픽에 대해 전송할 메시지가 존재하는 경우에 세션을 설정할 수 있다.As shown in FIG. 5 , the producer terminal 130 may establish a session ( S511 ). The producer terminal 130 may establish a session when there is a message to be transmitted for the topic.
생산자 단말(130)은 그룹키를 사용할지 확인할 수 있다(S513). 이러한 그룹키는 페이로드 전송을 위해 동일 계층에서 하나로 통일되어 관리될 수 있다. 이때, 생산자 단말(130)은 그룹키를 관리하는 마스터 단말, 즉 마스터 노드로부터 그룹키를 수신해야 한다. 이로 인해, 생산자 단말(130)은 네트워크 시스템에 새롭게 진입하는 경우, 토픽을 생성하면서 그룹키를 사용하거나 자신의 고유의 페이로드 암호키를 사용할지를 결정할 수 있다.The producer terminal 130 may check whether to use the group key (S513). These group keys may be unified and managed as one in the same layer for payload transmission. At this time, the producer terminal 130 must receive the group key from the master terminal that manages the group key, that is, the master node. For this reason, when the producer terminal 130 newly enters the network system, it can determine whether to use the group key or its own payload encryption key while generating the topic.
S513단계의 확인결과, 그룹키를 사용하지 않는 경우, 생산자 단말(130)은 S525단계로 진행할 수 있다. As a result of checking in step S513, if the group key is not used, the producer terminal 130 may proceed to step S525.
S513단계의 확인결과, 그룹키를 사용하는 경우, 생산자 단말(130)은 S515단계로 진행한다. 예를 들어, '/building/5thfloor/temperature'의 토픽을 등록하려는 생산자 단말(130)이 /building/5thfloor 키를 사용할 수도 있다.As a result of checking in step S513, if the group key is used, the producer terminal 130 proceeds to step S515. For example, the producer terminal 130 to register the topic of '/building/5thfloor/temperature' may use the /building/5thfloor key.
생산자 단말(130)은 그룹키를 사용하는 경우, 마스터 단말로부터 그룹키를 수신하기 위해 그룹키를 탐색할 수 있다(S515).When using the group key, the producer terminal 130 may search for the group key to receive the group key from the master terminal (S515).
생산자 단말(130)은 그룹키 탐색에 따라 미리 설정된 소정 시간 내에 그룹키를 수신하였는지 판단할 수 있다(S517).The producer terminal 130 may determine whether the group key has been received within a preset time according to the group key search (S517).
S517단계의 판단결과, 미리 설정된 소정 시간 내에 그룹키를 수신하면, 생산자 단말(130)은 S519단계로 진행할 수 있다.As a result of the determination in step S517, if the group key is received within a preset time, the producer terminal 130 may proceed to step S519.
생산자 단말(130)은 그룹키를 사용하여 페이로드 암호키를 생성하고 S525단계로 진행할 수 있다. 예를 들어, 생산자 단말(130)은 그룹키를 페이로드 암호키로 직접 사용할 수 있지만, 그룹키를 이용하여 페이로드 암호키를 생성할 수도 있다.The producer terminal 130 may generate a payload encryption key using the group key and proceed to step S525. For example, the producer terminal 130 may directly use the group key as the payload encryption key, but may also generate the payload encryption key using the group key.
S517단계의 판단결과, 미리 설정된 소정 시간 내에 그룹키를 수신하지 못하면, 생산자 단말(130)은 S521단계로 진행할 수 있다. 생산자 단말(130)은 마스터 단말로부터 그룹키를 전달받아야 한다. 하지만, MQTT 프로토콜의 경우, 생산자 단말(130)이 마스터 단말과 실시간으로 통신을 수행하는 것이 불가능하기 때문에 그룹키를 전달받기 어려운 상황에서 임시 페이로드 키를 생성하여 사용할 수도 있다.As a result of the determination in step S517, if the group key is not received within a preset time, the producer terminal 130 may proceed to step S521. The producer terminal 130 must receive the group key from the master terminal. However, in the case of the MQTT protocol, since it is impossible for the producer terminal 130 to communicate with the master terminal in real time, a temporary payload key may be generated and used in a situation in which it is difficult to receive the group key.
생산자 단말(130)은 임시 페이로드 키를 생성할 수 있다(S521) The producer terminal 130 may generate a temporary payload key (S521).
생산자 단말(130)은 임시 페이로드 키를 사용하여 페이로드 암호키를 생성하고, S521단계로 진행할 수 있다(S523). 생산자 단말(130)은 이후 그룹키를 수신하면, 도 2의 S239 내지 S241 단게에서 설명된 페이로드 암호키 업데이트 동작을 수행하여 임시 페이로드 키로 생성한 페이로드 암호키를 그룹키를 이용하여 생성한 페이로드 암호키로 전환하여 사용할 수 있다.The producer terminal 130 may generate a payload encryption key using the temporary payload key, and proceed to step S521 (S523). After receiving the group key, the producer terminal 130 performs the payload encryption key update operation described in steps S239 to S241 of FIG. 2 to generate the payload encryption key generated as a temporary payload key using the group key. It can be used by converting the payload encryption key.
생산자 단말(130)은 브로커 단말(120)로부터 구독자 인증 요청을 수신하였는지 확인할 수 있다(S525).The producer terminal 130 may check whether a subscriber authentication request has been received from the broker terminal 120 (S525).
S525단계의 판단결과, 구독자를 인증하지 못한 경우, 생산자 단말(130)은 S535단계로 진행할 수 있다.As a result of the determination in step S525, if the subscriber is not authenticated, the producer terminal 130 may proceed to step S535.
S525단계의 판단결과, 구독자를 인증한 경우, 생산자 단말(130)은 S527단계로 진행할 수 있다.As a result of the determination in step S525, if the subscriber is authenticated, the producer terminal 130 may proceed to step S527.
생산자 단말(130)은 토픽과 페이로드를 암호화하여 메시지를 생성할 수 있다. 생산자 단말(130)은 그룹키를 이용하지 않는 경우, 토픽을 생성하면서, 페이로드 암호키를 생성할 수 있다. 이때, 생산자 단말(130)은 페이로드 시퀀스 번호도 0으로 초기화할 수 있다. 생산자 단말(130)은 토픽은 브로커 단말과 세션 설정 시 생성한 토픽 암호키로 암호화하고, 페이로드는 페이로드 암호키로 암호화할 수 있다.The producer terminal 130 may generate a message by encrypting the topic and the payload. The producer terminal 130 may generate a payload encryption key while generating a topic when not using the group key. In this case, the producer terminal 130 may also initialize the payload sequence number to 0. The producer terminal 130 may encrypt the topic with the topic encryption key generated when establishing a session with the broker terminal, and the payload may be encrypted with the payload encryption key.
또한, 생산자 단말(130)은 구독자 단말(110)로부터 수신한 공개키를 이용하여 일회용 암호키를 생성할 수 있다. 생산자 단말(130)은 일회용 암호키로 페이로드 암호키를 암호화할 수 있다.In addition, the producer terminal 130 may generate a one-time encryption key using the public key received from the subscriber terminal 110 . The producer terminal 130 may encrypt the payload encryption key with a one-time encryption key.
생산자 단말(130)은 메시지를 브로커 단말로 전송할 수 있다(S529). 생산자 단말(130)은 페이로드 암호키를 생산자 단말로 전송하면, 다음 메시지 전송 시 페이로드 암호키를 전달할 필요가 없다.The producer terminal 130 may transmit a message to the broker terminal (S529). When the producer terminal 130 transmits the payload encryption key to the producer terminal, there is no need to transmit the payload encryption key when transmitting the next message.
하지만, 생산자 단말(130)은 소정 주기 등이 도래하여 페이로드 암호키를 업데이트할지를 확인할 수 있다(S531).However, the producer terminal 130 may check whether to update the payload encryption key when a predetermined period or the like arrives (S531).
S531단계의 판단결과, 페이로드 암호키를 업데이트하지 않는 경우, 생산자 단말(130)은 S527단계로 진행하여 메시지를 생성할 수 있다.As a result of the determination in step S531, if the payload encryption key is not updated, the producer terminal 130 may generate a message by proceeding to step S527.
S531단계의 판단결과, 페이로드 암호키를 업데이트하는 경우, 생산자 단말(130)은 S533단계로 진행할 수 있다.As a result of the determination in step S531, when updating the payload encryption key, the producer terminal 130 may proceed to step S533.
생산자 단말(130)은 신규 페이로드 암호키를 생성하고, 신규 페이로드 암호키를 기존 페이로드 암호키로 암호화할 수 있다(S533). 신규 페이로드 암호키가 생성되면, 생산자 단말(130)은 전송할 페이로드가 존재하면, 신규 페이로드 암호키로 전송할 페이로드를 암호화할 수 있다.The producer terminal 130 may generate a new payload encryption key and encrypt the new payload encryption key with the existing payload encryption key (S533). When the new payload encryption key is generated, the producer terminal 130 may encrypt the payload to be transmitted with the new payload encryption key if there is a payload to be transmitted.
생산자 단말(130)은 암호화된 신규 페이로드 암호키를 포함하여 페이로드 암호키가 업데이트된 메시지를 브로커 단말(120)을 통해 구독자 단말(110)로 전송할 수 있다.The producer terminal 130 may transmit a message in which the payload encryption key is updated including the new encrypted payload encryption key to the subscriber terminal 110 through the broker terminal 120 .
생산자 단말(130)은 동작을 종료할지 확인할 수 있다(S537).The producer terminal 130 may determine whether to end the operation (S537).
S537단계의 확인 결과, 동작을 종료하지 않는 경우, 생산자 단말(130)은 S527단계로 진행하여 메시지를 생성할 수 있다. 하지만, 생산자 단말(130)은 은 필요에 따라 다른 단계로 진행할 수도 있다.As a result of the check in step S537, if the operation is not terminated, the producer terminal 130 may proceed to step S527 to generate a message. However, the producer terminal 130 may proceed to another step as needed.
S527단계의 확인 결과, 동작을 종료하는 경우, 브로커 단말(120)은 동작을 종료할 수 있다.As a result of checking in step S527, when the operation is terminated, the broker terminal 120 may end the operation.
본 실시예에서 사용되는 '~부'라는 용어는 소프트웨어 또는 FPGA(field programmable gate array) 또는 ASIC 와 같은 하드웨어 구성요소를 의미하며, '~부'는 어떤 역할들을 수행한다. 그렇지만 '~부'는 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. '~부'는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다. 따라서, 일 예로서 '~부'는 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램특허 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들, 및 변수들을 포함한다.The term '~ unit' used in this embodiment means software or hardware components such as field programmable gate array (FPGA) or ASIC, and '~ unit' performs certain roles. However, '~part' is not limited to software or hardware. The '~ unit' may be configured to reside on an addressable storage medium or may be configured to refresh one or more processors. Thus, as an example, '~' refers to components such as software components, object-oriented software components, class components, and task components, and processes, functions, properties, and procedures. , subroutines, segments of program patent code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
구성요소들과 '~부'들 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 '~부'들로 결합되거나 추가적인 구성요소들과 '~부'들로부터 분리될 수 있다.Functions provided in components and '~ units' may be combined into a smaller number of components and '~ units' or separated from additional components and '~ units'.
뿐만 아니라, 구성요소들 및 '~부'들은 디바이스 또는 보안 멀티미디어카드 내의 하나 또는 그 이상의 CPU 들을 재생시키도록 구현될 수도 있다In addition, components and '~ units' may be implemented to play one or more CPUs in a device or secure multimedia card.
또한 본 발명의 일 실시예에 따르는 메시지 보안 방법은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 컴퓨터 프로그램(또는 컴퓨터 프로그램 제품)으로 구현될 수도 있다. 컴퓨터 프로그램은 프로세서에 의해 처리되는 프로그래밍 가능한 기계 명령어를 포함하고, 고레벨 프로그래밍 언어(High-level Programming Language), 객체 지향 프로그래밍 언어(Object-oriented Programming Language), 어셈블리 언어 또는 기계 언어 등으로 구현될 수 있다. 또한 컴퓨터 프로그램은 유형의 컴퓨터 판독가능 기록매체(예를 들어, 메모리, 하드디스크, 자기/광학 매체 또는 SSD(Solid-State Drive) 등)에 기록될 수 있다. Also, the message security method according to an embodiment of the present invention may be implemented as a computer program (or computer program product) including instructions executable by a computer. The computer program includes programmable machine instructions processed by a processor, and may be implemented in a high-level programming language, an object-oriented programming language, an assembly language, or a machine language. . In addition, the computer program may be recorded in a tangible computer-readable recording medium (eg, a memory, a hard disk, a magnetic/optical medium, or a solid-state drive (SSD), etc.).
따라서 본 발명의 일실시예에 따르는 메시지 보안 방법은 상술한 바와 같은 컴퓨터 프로그램이 컴퓨팅 장치에 의해 실행됨으로써 구현될 수 있다. 컴퓨팅 장치는 프로세서와, 메모리와, 저장 장치와, 메모리 및 고속 확장포트에 접속하고 있는 고속 인터페이스와, 저속 버스와 저장 장치에 접속하고 있는 저속 인터페이스 중 적어도 일부를 포함할 수 있다. 이러한 성분들 각각은 다양한 버스를 이용하여 서로 접속되어 있으며, 공통 머더보드에 탑재되거나 다른 적절한 방식으로 장착될 수 있다. Accordingly, the message security method according to an embodiment of the present invention may be implemented by executing the computer program as described above by a computing device. The computing device may include at least a portion of a processor, a memory, a storage device, a high-speed interface connected to the memory and the high-speed expansion port, and a low-speed interface connected to the low-speed bus and the storage device. Each of these components is connected to each other using various buses, and may be mounted on a common motherboard or in any other suitable manner.
여기서 프로세서는 컴퓨팅 장치 내에서 명령어를 처리할 수 있는데, 이런 명령어로는, 예컨대 고속 인터페이스에 접속된 디스플레이처럼 외부 입력, 출력 장치상에 GUI(Graphic User Interface)를 제공하기 위한 그래픽 정보를 표시하기 위해 메모리나 저장 장치에 저장된 명령어를 들 수 있다. 다른 실시예로서, 다수의 프로세서 및(또는) 다수의 버스가 적절히 다수의 메모리 및 메모리 형태와 함께 이용될 수 있다. 또한 프로세서는 독립적인 다수의 아날로그 및(또는) 디지털 프로세서를 포함하는 칩들이 이루는 칩셋으로 구현될 수 있다. Here, the processor may process a command within the computing device, such as for displaying graphic information for providing a Graphical User Interface (GUI) on an external input or output device, such as a display connected to a high-speed interface. Examples are instructions stored in memory or a storage device. In other embodiments, multiple processors and/or multiple buses may be used with multiple memories and types of memory as appropriate. In addition, the processor may be implemented as a chipset formed by chips including a plurality of independent analog and/or digital processors.
또한 메모리는 컴퓨팅 장치 내에서 정보를 저장한다. 일례로, 메모리는 휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 다른 예로, 메모리는 비휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 또한 메모리는 예컨대, 자기 혹은 광 디스크와 같이 다른 형태의 컴퓨터 판독 가능한 매체일 수도 있다.Memory also stores information within the computing device. In one example, the memory may be configured as a volatile memory unit or a set thereof. As another example, the memory may be configured as a non-volatile memory unit or a set thereof. The memory may also be another form of computer readable medium such as, for example, a magnetic or optical disk.
그리고 저장장치는 컴퓨팅 장치에게 대용량의 저장공간을 제공할 수 있다. 저장 장치는 컴퓨터 판독 가능한 매체이거나 이런 매체를 포함하는 구성일 수 있으며, 예를 들어 SAN(Storage Area Network) 내의 장치들이나 다른 구성도 포함할 수 있고, 플로피 디스크 장치, 하드 디스크 장치, 광 디스크 장치, 혹은 테이프 장치, 플래시 메모리, 그와 유사한 다른 반도체 메모리 장치 혹은 장치 어레이일 수 있다. In addition, the storage device may provide a large-capacity storage space to the computing device. A storage device may be a computer-readable medium or a component comprising such a medium, and may include, for example, devices or other components within a storage area network (SAN), a floppy disk device, a hard disk device, an optical disk device, or a tape device, a flash memory, or other semiconductor memory device or device array similar thereto.
전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The above description of the present invention is for illustration, and those of ordinary skill in the art to which the present invention pertains can understand that it can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. will be. Therefore, it should be understood that the embodiments described above are illustrative in all respects and not restrictive. For example, each component described as a single type may be implemented in a dispersed form, and likewise components described as distributed may be implemented in a combined form.
본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is indicated by the following claims rather than the above detailed description, and all changes or modifications derived from the meaning and scope of the claims and their equivalent concepts should be interpreted as being included in the scope of the present invention. do.

Claims (15)

  1. 토픽을 생성하는 생산자 단말;a producer terminal that creates a topic;
    상기 토픽을 구독하는 구독자 단말; 및a subscriber terminal subscribing to the topic; and
    상기 구독자 단말 및 상기 생산자 단말과 통신하며, 상기 생산자 단말로부터 암호화된 토픽과 암호화된 페이로드가 포함된 메시지를 수신하면, 상기 암호화된 토픽을 상기 생산자 단말과 공유하는 제 2 토픽 암호키를 이용하여 복호화하여 복호화된 토픽을 구독 중인 구독자 단말을 확인하고, 상기 구독자 단말과 공유하는 제 1 토픽 암호키를 이용하여 상기 토픽을 암호화하여 상기 암호화된 페이로드와 함께 상기 구독자 단말로 전송하는 브로커 단말을 포함하는 네트워크 시스템When communicating with the subscriber terminal and the producer terminal, and receiving a message including an encrypted topic and an encrypted payload from the producer terminal, using a second topic encryption key that shares the encrypted topic with the producer terminal Checking the subscriber terminal subscribing to the decrypted topic by decryption, encrypting the topic using the first topic encryption key shared with the subscriber terminal, and transmitting the encrypted payload to the subscriber terminal together with the broker terminal included network system
  2. 제 1 항에 있어서,The method of claim 1,
    상기 생산자 단말은,The producer terminal,
    상기 암호화된 페이로드를 복호화하는 페이로드 암호키를 생성하고, 상기 구독자 단말과 공개키를 교환하여 일회용 암호키를 생성하고, 상기 페이로드 암호키를 상기 일회용 암호키로 암호화하여 상기 구독자 단말로 전달하는 네트워크 시스템.generating a payload encryption key for decrypting the encrypted payload, generating a one-time encryption key by exchanging a public key with the subscriber terminal, encrypting the payload encryption key with the one-time encryption key, and delivering to the subscriber terminal network system.
  3. 제 2 항에 있어서,3. The method of claim 2,
    상기 구독자 단말은,The subscriber terminal,
    상기 생산자 단말과 공개키를 교환하여 일회용 암호키를 생성하고, 상기 생산자 단말로부터 암호화된 페이로드 암호키를 수신하면, 상기 일회용 암호키를 사용하여 상기 페이로드 암호키를 복호화하는 네트워크 시스템.A network system for generating a one-time encryption key by exchanging a public key with the producer terminal, and decrypting the payload encryption key using the one-time encryption key when receiving an encrypted payload encryption key from the producer terminal.
  4. 제 2 항에 있어서,3. The method of claim 2,
    상기 생산자 단말은,The producer terminal,
    상기 페이로드 암호키를 소정 주기를 간격으로 신규 페이로드 암호키를 생성하고, 상기 신규 페이로드 암호키가 생성되면, 기존 페이로드 암호키로 상기 신규 페이로드 암호키를 암호화하여 상기 구독자 단말로 전달하는 네트워크 시스템.The payload encryption key generates a new payload encryption key at a predetermined interval, and when the new payload encryption key is generated, the new payload encryption key is encrypted with the existing payload encryption key and delivered to the subscriber terminal network system.
  5. 제 4 항에 있어서,5. The method of claim 4,
    상기 구독자 단말은,The subscriber terminal,
    암호화된 신규 페이로드 암호키를 수신하면, 기존 페이로드 암호키로 상기 신규 페이로드 암호키를 복호화하여 암호화된 페이로드의 복호화에 사용하는 네트워크 시스템.When receiving the encrypted new payload encryption key, the network system decrypts the new payload encryption key with the existing payload encryption key and uses it to decrypt the encrypted payload.
  6. 제 1 항에 있어서,The method of claim 1,
    상기 브로커 단말은,The broker terminal,
    상기 구독자 단말과 세션을 설정하고, 상기 세션의 설정 시 상기 제 1 토픽 암호키를 생성하는 네트워크 시스템.A network system for establishing a session with the subscriber terminal and generating the first topic encryption key when the session is established.
  7. 제 1 항에 있어서,The method of claim 1,
    상기 브로커 단말은,The broker terminal,
    상기 생산자 단말과 세션을 설정하고, 상기 세션의 설정 시 상기 제 2 토픽 암호키를 생성하는 네트워크 시스템.A network system for establishing a session with the producer terminal and generating the second topic encryption key when the session is established.
  8. 제 1 항에 있어서,The method of claim 1,
    상기 네트워크 시스템은,The network system is
    그룹키를 관리하는 마스터 단말을 더 포함하고,Further comprising a master terminal that manages the group key,
    상기 생산자 단말은,The producer terminal,
    상기 네트워크 시스템에 신규로 접속 시, 그룹키를 탐색하여 상기 마스터 단말로부터 소정 시간 이내에 그룹키를 수신하면, 상기 그룹키를 사용하여 상기 암호화된 페이로드를 복호화하기 위한 페이로드 암호키를 생성하고,Upon new access to the network system, when a group key is retrieved and received from the master terminal within a predetermined time, a payload encryption key for decrypting the encrypted payload is generated using the group key,
    상기 마스터 단말로부터 소정 시간 이내에 그룹키를 수신하지 못하면, 임시 그룹키를 생성하고, 상기 임시 그룹키를 사용하여 상기 페이로드 암호키를 생성하는 네트워크 시스템.If the group key is not received from the master terminal within a predetermined time, a temporary group key is generated, and the payload encryption key is generated using the temporary group key.
  9. 네트워크 시스템에서 수행되는 메시지 보안 방법에 있어서,A message security method performed in a network system, comprising:
    브로커 단말이, 토픽을 구독하는 구독자 단말과 세션을 설정하는 단계;establishing, by the broker terminal, a session with the subscriber terminal subscribing to the topic;
    상기 브로커 단말이, 상기 토픽을 생성하는 생산자 단말과 세션을 설정하는 단계;establishing, by the broker terminal, a session with a producer terminal generating the topic;
    상기 브로커 단말이, 상기 생산자 단말로부터 암호화된 토픽과 암호화된 페이로드가 포함된 메시지를 수신하면, 상기 암호화된 토픽을 상기 생산자 단말과 공유하는 제 2 토픽 암호키를 이용하여 복호화하는 단계; 및When the broker terminal receives a message including an encrypted topic and an encrypted payload from the producer terminal, decrypting the encrypted topic using a second topic encryption key shared with the producer terminal; and
    상기 브로커 단말이, 상기 복호화된 토픽을 구독 중인 구독자 단말을 확인하고, 상기 구독자 단말과 공유하는 제 1 토픽 암호키를 이용하여 상기 토픽을 암호화하여 상기 암호화된 페이로드와 함께 상기 구독자 단말로 전송하는 단계를 포함하는 메시지 보안 방법.The broker terminal identifies a subscriber terminal subscribing to the decrypted topic, encrypts the topic using a first topic encryption key shared with the subscriber terminal, and transmits it to the subscriber terminal together with the encrypted payload A message security method comprising steps.
  10. 제 9 항에 있어서,10. The method of claim 9,
    상기 생산자 단말이, 상기 암호화된 페이로드를 복호화하는 페이로드 암호키를 생성하고, 상기 구독자 단말과 공개키를 교환하여 일회용 암호키를 생성하는 단계;generating, by the producer terminal, a payload encryption key for decrypting the encrypted payload, and generating a one-time encryption key by exchanging a public key with the subscriber terminal;
    상기 구독자 단말이, 상기 생산자 단말과 공개키를 교환하여 일회용 암호키를 생성하는 단계;generating, by the subscriber terminal, a one-time encryption key by exchanging a public key with the producer terminal;
    상기 생산자 단말이, 상기 페이로드 암호키를 상기 일회용 암호키로 암호화하여 상기 구독자 단말로 전달하는 단계; 및encrypting, by the producer terminal, the payload encryption key with the one-time encryption key and transmitting the encryption key to the subscriber terminal; and
    상기 구독자 단말이, 상기 생산자 단말로부터 암호화된 페이로드 암호키를 수신하면, 상기 일회용 암호키를 사용하여 상기 페이로드 암호키를 복호화하는 단계를 더 포함하는 메시지 보안 방법.When the subscriber terminal receives the encrypted payload encryption key from the producer terminal, the method further comprising the step of decrypting the payload encryption key using the one-time encryption key.
  11. 제 10 항에 있어서,11. The method of claim 10,
    상기 생산자 단말이, 상기 페이로드 암호키를 소정 주기를 간격으로 신규 페이로드 암호키를 생성하고, 상기 신규 페이로드 암호키가 생성되면, 기존 페이로드 암호키로 상기 신규 페이로드 암호키를 암호화하여 상기 구독자 단말로 전달하는 단계를 더 포함하는 메시지 보안 방법.The producer terminal generates a new payload encryption key using the payload encryption key at a predetermined interval, and when the new payload encryption key is generated, the new payload encryption key is encrypted with the existing payload encryption key to Message security method further comprising the step of delivering to the subscriber terminal.
  12. 제 11 항에 있어서,12. The method of claim 11,
    상기 구독자 단말로 전달하는 단계 이후에,After the step of delivering to the subscriber terminal,
    상기 구독자 단말이, 암호화된 신규 페이로드 암호키를 수신하면, 기존 페이로드 암호키로 상기 신규 페이로드 암호키를 복호화하여 암호화된 페이로드의 복호화에 사용하는 단계를 더 포함하는 메시지 보안 방법.and, when the subscriber terminal receives the encrypted new payload encryption key, decrypting the new payload encryption key with the existing payload encryption key and using it to decrypt the encrypted payload.
  13. 제 9 항에 있어서,10. The method of claim 9,
    상기 구독자 단말과 세션을 설정하는 단계는,The step of establishing a session with the subscriber terminal comprises:
    상기 브로커 단말이, 상기 구독자 단말과 상기 세션의 설정 시 상기 제 1 토픽 암호키를 생성하는 단계를 포함하는 메시지 보안 방법.and generating, by the broker terminal, the first topic encryption key when establishing the session with the subscriber terminal.
  14. 제 9 항에 있어서,10. The method of claim 9,
    상기 생산자 단말과 세션을 설정하는 단계는,The step of establishing a session with the producer terminal,
    상기 브로커 단말이, 상기 생산자 단말과 상기 세션의 설정 시 상기 제 2 토픽 암호키를 생성하는 단계를 포함하는 메시지 보안 방법.Message security method comprising the step of generating, by the broker terminal, the second topic encryption key when establishing the session with the producer terminal.
  15. 제 9 항에 있어서,10. The method of claim 9,
    상기 생산자 단말이, 상기 네트워크 시스템에 신규로 접속 시, 그룹키를 탐색하여 마스터 단말로부터 소정 시간 이내에 그룹키를 수신하면, 상기 그룹키를 사용하여 상기 암호화된 페이로드를 복호화하는 페이로드 암호키를 생성하고,When the producer terminal newly accesses the network system, searches for the group key and receives the group key within a predetermined time from the master terminal, the payload encryption key for decrypting the encrypted payload using the group key create,
    상기 마스터 단말로부터 소정 시간 이내에 그룹키를 수신하지 못하면, 임시 그룹키를 생성하고, 상기 임시 그룹키를 사용하여 상기 페이로드 암호키를 생성하는 단계를 더 포함하는 메시지 보안 방법.If the group key is not received from the master terminal within a predetermined time, generating a temporary group key, and generating the payload encryption key using the temporary group key.
PCT/KR2020/013707 2019-11-29 2020-10-08 Network system and message security method thereof WO2021107389A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2019-0156578 2019-11-29
KR1020190156578A KR102265611B1 (en) 2019-11-29 2019-11-29 Network system and method for performing message security thereof

Publications (1)

Publication Number Publication Date
WO2021107389A1 true WO2021107389A1 (en) 2021-06-03

Family

ID=76129353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/013707 WO2021107389A1 (en) 2019-11-29 2020-10-08 Network system and message security method thereof

Country Status (2)

Country Link
KR (1) KR102265611B1 (en)
WO (1) WO2021107389A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11936773B2 (en) 2021-11-09 2024-03-19 Penta Security Inc. Encryption key management method in data subscription system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120087550A (en) * 2011-01-28 2012-08-07 오픈스택 주식회사 Encrypted Communication Method and Encrypted Communication System Using the Same
KR20160050766A (en) * 2014-10-31 2016-05-11 삼성에스디에스 주식회사 Apparatus and method for message communication
KR101760376B1 (en) * 2015-11-26 2017-07-24 고려대학교 산학협력단 Terminal and method for providing secure messenger service
KR20190007336A (en) * 2017-07-12 2019-01-22 주식회사 코스콤 Method and apparatus for generating end-to-end security channel, and method and apparatus for transmitting/receiving secure information using security channel
KR102028151B1 (en) * 2017-04-07 2019-10-02 주식회사트러스트홀딩스 Encryption method and system using authorization key of device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120087550A (en) * 2011-01-28 2012-08-07 오픈스택 주식회사 Encrypted Communication Method and Encrypted Communication System Using the Same
KR20160050766A (en) * 2014-10-31 2016-05-11 삼성에스디에스 주식회사 Apparatus and method for message communication
KR101760376B1 (en) * 2015-11-26 2017-07-24 고려대학교 산학협력단 Terminal and method for providing secure messenger service
KR102028151B1 (en) * 2017-04-07 2019-10-02 주식회사트러스트홀딩스 Encryption method and system using authorization key of device
KR20190007336A (en) * 2017-07-12 2019-01-22 주식회사 코스콤 Method and apparatus for generating end-to-end security channel, and method and apparatus for transmitting/receiving secure information using security channel

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LEE HYUNWOO, LIM JUNGHWAN, KWON TED LTAEKYOUNGR: "MQTLS: Toward Secure MQTT Communication with an Untrusted Broker", 2019 INTERNATIONAL CONFERENCE ON INFORMATION AND COMMUNICATION TECHNOLOGY CONVERGENCE (ICTC), IEEE, 1 October 2019 (2019-10-01) - 18 October 2019 (2019-10-18), pages 53 - 58, XP055815920, ISBN: 978-1-7281-0893-3, DOI: 10.1109/ICTC46691.2019.8940001 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11936773B2 (en) 2021-11-09 2024-03-19 Penta Security Inc. Encryption key management method in data subscription system

Also Published As

Publication number Publication date
KR20210067208A (en) 2021-06-08
KR102265611B1 (en) 2021-06-15

Similar Documents

Publication Publication Date Title
WO2016137304A1 (en) Trust-zone-based end-to-end security
US7978858B2 (en) Terminal device, group management server, network communication system, and method for generating encryption key
WO2020029585A1 (en) Neural network federation modeling method and device employing transfer learning, and storage medium
WO2015147547A1 (en) Method and apparatus for supporting login through user terminal
WO2016190476A1 (en) Method for managing encryption key for cloud service and apparatus thereof
WO2014063455A1 (en) Instant messaging method and system
WO2009145495A2 (en) Method and apparatus for providing broadcast service using encryption key in a communication system
WO2019132272A1 (en) Id as blockchain based service
WO2019074326A1 (en) Method and apparatus for secure offline payment
WO2018151390A1 (en) Internet of things device
WO2020101087A1 (en) Encryption system and method for handling personal information
WO2009151277A2 (en) Encryption key distribution method in mobile broadcasting system and system for the same
WO2019182377A1 (en) Method, electronic device, and computer-readable recording medium for generating address information used for transaction of blockchain-based cryptocurrency
WO2011122912A2 (en) Method and system for managing an encryption key for a broadcasting service
WO2015199271A1 (en) Method and system for sharing files over p2p
WO2021162341A1 (en) Operation method of blockchain remittance service system, and electronic wallet for remittance
WO2021107389A1 (en) Network system and message security method thereof
WO2017206602A1 (en) Data processing method and apparatus
WO2022177204A1 (en) Did-based decentralized system for storing and sharing user data
WO2020111403A1 (en) Stream cipher-based image security method using zero-watermarking, server, and computer readable recording medium
WO2022080784A1 (en) Method and device for quantum key distribution
WO2023149660A1 (en) Group signature-based federated learning method and system, and recording medium for performing same
WO2018004114A2 (en) Proxy authentication system and authentication method for providing proxy service
WO2018128264A1 (en) Method for managing key in security system of multicast environment
WO2010147317A2 (en) Content encoding method, content decoding method and electronic device using same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20894165

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20894165

Country of ref document: EP

Kind code of ref document: A1