Terminal device, computer program
By encrypting specific portions of message data and using predefined conditions for distribution, the publish-subscribe model ensures confidentiality and openness, addressing the challenge of plaintext exposure in existing models.
Patent Information
- Application Number
- JP2022542563
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-08-14
- Publication Date
- 2024-09-12
- Estimated Expiration
- 2040-08-14
AI Technical Summary
In the publish-subscribe message model, ensuring the confidentiality of message data between a publisher and a subscriber is challenging, as encrypting the entire publish message requires the broker to decrypt it, exposing plaintext data to external devices.
The terminal device encrypts at least a portion of the external data, generating encrypted message data with plaintext topic specification data, allowing the broker to register without decryption, and distributes encrypted messages based on predefined encryption conditions.
This approach ensures the confidentiality of message data by encrypting sensitive information while allowing open distribution of non-sensitive data, balancing confidentiality and openness in the publish-subscribe model.
Smart Images

Figure 0007549909000001 
Figure 0007549909000003 
Figure 0007549909000002
Abstract
Description
[Technical field]
[0001] The technology disclosed herein relates to communication technology based on a publish-subscribe message model. [Background technology]
[0002] A publish-subscribe message model (hereinafter referred to as the "pub-sub model") is known as a method for communication between terminal devices (see, for example, Patent Document 1). In the pub-sub model, a terminal device functioning as a publisher (hereinafter simply referred to as the "publisher") generates a publish message including topic designation data and message data, and transmits it to a broker. The topic designation data is information for designating a topic managed by the broker. The broker registers the message data included in the received publish message to a topic designated by the topic designation data included in the publish message. The broker transmits the message data registered to the topic to a terminal device functioning as a subscriber (hereinafter referred to as the "subscriber") that has previously subscribed to the topic. This allows the subscriber to subscribe to the message data distributed by the publisher that corresponds to the topic to which the subscriber previously subscribed. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2018-13960 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the pub-sub model, there are cases where confidentiality of message data is required to be ensured between a publisher and a subscriber. Here, as a method for ensuring confidentiality of message data, for example, a method in which the publisher encrypts the entire publish message using a known encryption method (for example, a standard encryption method using TLS (Transport Layer Security)) and transmits it to a broker is considered. However, in this method, the broker needs to decrypt the encrypted publish message to obtain the topic specification data. When decrypted, not only the plaintext topic specification data but also the plaintext message data are stored in the broker. For this reason, this plaintext message data can be obtained, for example, from an external device that can access the broker, which causes a problem that confidentiality of the message data cannot be ensured.
[0005] This specification discloses a technique that can solve the above-mentioned problems. [Means for solving the problem]
[0006] The technology disclosed in this specification can be realized, for example, in the following forms.
[0007] (1) The terminal device disclosed in this specification is a terminal device that communicates with an external device through a broker based on a publish-subscribe-message model, and includes an acquisition unit that acquires external data, an encryption processing unit that encrypts at least a part of the external data to generate encrypted message data including ciphertext, and a data distribution unit that distributes an encrypted publish message including plaintext topic designation data and the encrypted message data to the broker. The terminal device can distribute an encrypted publish message including plaintext topic designation data and encrypted message data obtained by encrypting at least a part of the external data to the broker. Therefore, the encrypted message data is registered to the designated topic in the broker without the need to decrypt the encrypted message data. As a result, the terminal device can distribute the encrypted message data to an external device while ensuring confidentiality.
[0008] (2) In the above terminal device, the external data may include first external data and second external data, and the encryption processing unit may be configured to leave the first external data in plaintext and encrypt the second external data to generate the encrypted message data including plaintext and ciphertext. According to this terminal device, for example, the first external data in plaintext that emphasizes openness and the second external data in ciphertext that emphasizes confidentiality can be delivered to the external device together as an encrypted publish message.
[0009] (3) In the above terminal device, the external data may include first external data and second external data, and the encryption processing unit may be configured to encrypt the first external data and the second external data using a method in which at least one of an encryption rule and an encryption key is different from each other to generate the encrypted message data. According to this terminal device, a plurality of external data encrypted using different encryption methods can be delivered to an external device together as an encrypted publish message.
[0010] (4) The above terminal device may further include an encryption determination unit that determines whether an encryption condition is satisfied, and if the encryption determination unit determines that the encryption condition is satisfied, the encryption processing unit generates the encrypted message data, and the data distribution unit distributes the encrypted publish message to the broker, and if the encryption determination unit determines that the encryption condition is not satisfied, the data distribution unit distributes an unencrypted publish message including plaintext topic specification data and plaintext message data to the broker. This terminal device can selectively use a confidential distribution form in which an encrypted publish message that emphasizes confidentiality is distributed to a broker and a public distribution form in which an unencrypted publish message that emphasizes openness is distributed to a broker, based on whether a predetermined encryption condition is satisfied. This makes it possible to realize a publish-subscribe-message model that balances the confidentiality and openness of message data.
[0011] (5) The terminal device may further include a topic processing unit that includes pattern identification data in the topic specification data for identifying an arrangement pattern of ciphertext in each of the encrypted publish message and the unencrypted publish message. The topic specification data of the encrypted publish message and the unencrypted publish message delivered from the terminal device includes pattern identification data. Therefore, the external device can identify the arrangement pattern of ciphertext in each of the encrypted publish message and the unencrypted publish message based on this pattern identification data. This makes it possible to cause the external device to normally process a publish message whose arrangement pattern of ciphertext may change at any time, without requiring a separate means for transmitting pattern identification data to the external device, for example.
[0012] (6) The above terminal device may further include an encryption rule generating unit that generates encryption rule data including at least one of a decryption rule and an encryption key for decrypting the encrypted message data, and the data distribution unit may distribute an encryption rule publish message including the topic designation data and the encryption rule data to the broker. According to this terminal device, at least one of the encryption rule and the encryption key generated on the terminal device side is distributed to an external device by communication based on a publish-subscribe message model. This makes it possible to determine the encryption rule and the encryption key on the terminal device side and distribute the encryption rule and the encryption key to the external device without requiring a separate communication means.
[0013] (7) In the above terminal device, the encryption rule data may include the decryption rule, the encryption key, and a delimiter character that separates the decryption rule and the encryption key, the delimiter character being a plurality of character strings. According to this terminal device, only an external device that knows the common delimiter character in advance can obtain the encryption rule data from an encryption rule publish message received from a broker. This improves confidentiality of the distribution of encryption rule data to a specific external device.
[0014] (8) The above terminal device may further include a cipher change determination unit that determines whether or not an cipher change condition is satisfied, and when the cipher change determination unit determines that the cipher change condition is satisfied, the cipher rule generation unit may generate new cipher rule data in which at least one of the decryption rule, the encryption key, and the delimiter is changed. According to this terminal device, at least one of the encryption rule, the encryption key, and the delimiter is changed on the terminal device side. This makes it possible to effectively improve the confidentiality of the distribution of the cipher rule data to a specific external device.
[0015] (9) In the above terminal device, the encryption change determination unit may determine whether a first encryption change condition and a second encryption change condition that is more frequently satisfied than the first encryption change condition are satisfied, and the encryption rule generation unit may generate new first encryption rule data in which at least one of the decryption rule and the encryption key is changed when the encryption change determination unit determines that the first encryption change condition is satisfied, and may generate new second encryption rule data in which the delimiter is changed when the encryption change determination unit determines that the second encryption change condition is satisfied. According to this terminal device, the frequency of changing the delimiter, which requires a relatively small processing load, is higher than the frequency of changing the encryption rule or the encryption key, and therefore it is possible to more effectively improve the confidentiality of the distribution of encryption rule data to a specific external device while suppressing the processing load associated with changing the encryption rule data.
[0016] (10) A computer program disclosed in this specification causes a computer of a terminal device that communicates with an external device based on a publish-subscribe message model via a broker to execute an acquisition process for acquiring external data, an encryption process for encrypting at least a part of the external data to generate encrypted message data including ciphertext, a data generation process for generating an encrypted publish message including topic specification data in plaintext and the encrypted message data, and a data distribution process for distributing the encrypted publish message generated by the data generation process to the broker. According to this computer program, it is possible to distribute the encrypted message data to the external device while ensuring the confidentiality of the encrypted message data.
[0017] (11) The communication system disclosed in this specification includes a plurality of terminal devices and a broker, and performs communication between the plurality of terminal devices through the broker based on a publish-subscribe-message model, in which at least one of the terminal devices includes an acquisition unit that acquires external data, an encryption processing unit that encrypts at least a part of the external data to generate encrypted message data including ciphertext, and a data distribution unit that distributes an encrypted publish message including plaintext topic specification data and the encrypted message data to the broker, and at least another terminal device different from the one terminal device includes a data subscription unit that subscribes to the encrypted publish message from the broker, and a decryption processing unit that decrypts the encrypted message data included in the encrypted publish message. According to this communication system, it is possible to distribute encrypted message data from one terminal device to another terminal device while ensuring confidentiality of the encrypted message data.
[0018] (12) A communication method disclosed in this specification is a communication method for performing communication based on a publish-subscribe-message model between multiple terminal devices via a broker, comprising a publish process in which at least one of the terminal devices acquires external data, encrypts at least a part of the external data to generate encrypted message data including ciphertext, generates an encrypted publish message including topic specification data in plaintext and the encrypted message data, and distributes the encrypted publish message to the broker, and a subscribe process in which at least another terminal device different from the one terminal device subscribes to the encrypted publish message from the broker and decrypts the encrypted message data included in the encrypted publish message. According to this communication method, it is possible to distribute encrypted message data from one terminal device to other terminal devices while ensuring confidentiality of the encrypted message data.
[0019] The technology disclosed in this specification can be realized in various forms, such as a terminal device (publisher / subscriber), a communication system having a broker and multiple terminal devices, a communication method, a computer program that realizes those methods, a non-transitory recording medium on which that computer program is recorded, etc. [Brief description of the drawings]
[0020] [Figure 1] FIG. 1 is an explanatory diagram showing a schematic configuration of a communication system 10 according to an embodiment of the present invention. [Diagram 2] A block diagram showing the schematic configuration of a broker 100. [Diagram 3] FIG. 2 is a block diagram showing a schematic configuration of a terminal device 200. [Figure 4] A flowchart showing the publishing process [Diagram 5] Flowchart showing the contents of the encryption change process [Figure 6] Flowchart showing the contents of the subscription process [Figure 7] FIG. 1 is an explanatory diagram showing an example of use of a communication system 10. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0021] A. Embodiment: A-1. Configuration of communication system 10: FIG. 1 is an explanatory diagram showing a schematic configuration of a communication system 10 in this embodiment. The communication system 10 is a system for performing communication among a plurality of terminal devices 200 by a publish-subscribe message model (hereinafter referred to as a "pub-sub model"). The communication system 10 includes a broker (also referred to as a "server") 100 and terminal devices 200 used by a plurality of users P (P1, P2, . . . , Pn). The devices constituting the communication system 10 are connected to each other so as to be able to communicate with each other via a communication network NET.
[0022] The broker 100 is a management device that accepts requests for publishing messages and subscribing to messages from each terminal device 200 in order to exchange messages among a plurality of terminal devices 200 in a pub-sub model. The broker 100 may implement, as a protocol corresponding to the pub-sub model, for example, MQTT (MQ Telemetry Transport), AMQP (Advanced Message Queuing Protocol), OPC UA (OPC Unified Architecture), and PubSub extension (XEP-0060) of XMPP (eXtensible Messaging and Presence Protocol).
[0023] 2 is a block diagram showing a schematic configuration of the broker 100. The broker 100 includes a control unit 110, a storage unit 130, a display unit 152, an operation input unit 156, and an interface unit 158. These units are connected to each other via a bus 190 so as to be able to communicate with each other.
[0024] The display unit 152 of the broker 100 is, for example, an LCD display or an organic EL display, and displays various images and information. The operation input unit 156 is, for example, a keyboard, mouse, buttons, microphone, and the like, and accepts operations and instructions from the administrator. The interface unit 158 is, for example, a LAN interface or a USB interface, and communicates with other devices by wire or wirelessly.
[0025] The storage unit 130 of the broker 100 is composed of, for example, a ROM, a RAM, a hard disk drive (HDD), etc., and is used to store various programs and data, and as a work area when executing various programs, and as a temporary storage area for data. For example, the storage unit 130 stores a broker program BP, which is a computer program for executing various processes related to the pub-sub model. The broker program BP is provided in a state stored in a computer-readable recording medium (not shown), such as a CD-ROM, a DVD-ROM, or a USB memory, or is downloaded from an external device via a communication network NET and installed in the broker 100, thereby being stored in the storage unit 130.
[0026] Topic management data TD is stored in the storage unit 130 of the broker 100. The topic management data TD is a storage area for registering message data included in a publish message received from a terminal device 200 functioning as a publisher, in association with a topic specified by topic specification data included in the publish message. A topic (sometimes called a "key" or "name") is a name indicating a logical channel for distributing (publishing) a message.
[0027] The control unit 110 of the broker 100 is configured with, for example, a CPU, and controls the operation of the broker 100 by executing a computer program read from the storage unit 130. For example, the control unit 110 functions as a message management unit 112 that executes various processes related to the pub-sub model by reading and executing a broker program BP from the storage unit 130. This function will be described in conjunction with the description of the message management process below.
[0028] The terminal device 200 is, for example, a smartphone, a tablet terminal, a personal computer (PC), a GPS (Global Positioning System) terminal, a wearable terminal, a sensor, etc. Fig. 3 is a block diagram showing a schematic configuration of the terminal device 200. The terminal device 200 includes a control unit 210, a storage unit 230, a display unit 252, an acquisition unit 254, an operation input unit 256, and an interface unit 258. These units are connected to each other via a bus 290 so as to be able to communicate with each other.
[0029] The display unit 252 of the terminal device 200 is configured, for example, by a liquid crystal display or an organic EL display, and displays various images and information. The operation input unit 256 is configured, for example, by a keyboard, a mouse, buttons, a microphone, and the like, and receives operations and instructions from the user P. The display unit 252 may be provided with a touch panel so as to function as the operation input unit 256. The interface unit 258 is configured, for example, by a LAN interface or a USB interface, and communicates with other devices by wire or wirelessly.
[0030] The acquisition unit 254 includes, for example, a camera, a microphone, various sensors (such as a temperature sensor), a GPS receiving antenna, and the like, and acquires external data. The external data is, for example, meteorological data (environmental data) such as temperature, position (latitude and longitude) data, and data detected by sensors, measuring instruments, and the like (emergency call data, abnormality detection data, internal data such as blood pressure and pulse rate, and the like). Note that the operation input unit 256 may be configured to function as the acquisition unit. In this case, the external data is information input by operating the operation input unit 256 (for example, personal information such as name and age, and the like).
[0031] The storage unit 230 of the terminal device 200 is composed of, for example, a ROM, a RAM, a HDD, etc., and is used to store various programs and data, and as a work area when executing various programs, and as a temporary storage area for data. For example, the storage unit 230 stores a publish program PP and a subscribe program SP, which are application programs for executing various processes related to the pub-sub model. The publish program PP and the subscribe program SP are provided in a state stored in a computer-readable recording medium (not shown), such as a CD-ROM, a DVD-ROM, or a USB memory, or are downloaded from an external device via a communication network NET and installed in the terminal device 200, thereby being stored in the storage unit 230.
[0032] The control unit 210 of the terminal device 200 is configured with, for example, a CPU, and controls the operation of the terminal device 200 by executing a computer program read from the storage unit 230. For example, the control unit 210 functions as a publishing processing unit 212 that executes publishing processing by reading a publishing program PP from the storage unit 230 and executing it. At this time, the terminal device 200 functions as a publisher that requests the broker 100 to distribute (send) a message. Hereinafter, the terminal device 200 that functions as a publisher is particularly referred to as a "publisher 200P". The publishing processing unit 212 includes a distribution condition determination unit 213, an encryption determination unit 214, an encryption processing unit 215, a topic processing unit 216, a data distribution unit 217, an encryption change determination unit 218, and an encryption rule generation unit 219. The functions of each of these units will be described in conjunction with the description of the publishing processing described later. The terminal device 200 that functions as the publisher 200P is an example of a publisher in the claims.
[0033] The control unit 210 functions as a subscribe processing unit 222 that executes the subscribe process by reading and executing the subscribe program SP from the storage unit 230. At this time, the terminal device 200 functions as a subscriber that requests the broker 100 to subscribe (receive) a message. Hereinafter, the terminal device 200 that functions as a subscriber is particularly referred to as a "subscriber 200S." The subscribe processing unit 222 includes a subscription condition determination unit 223, a data distribution unit 224, an encryption acquisition unit 225, and a decryption processing unit 226. The functions of each of these units will be explained in conjunction with the explanation of the subscribe process described later. The terminal device 200 that functions as the subscriber 200S is an example of a subscriber and an external device in the claims.
[0034] A-2. Various aspects of the Pub-Sub model: A-2-1. Processing performed by the Broker 100: A description will now be given of the message management process executed by the broker 100. The message management process is a process for mediating the delivery and subscription of messages between the publisher 200P and the subscriber 200S.
[0035] When the message manager 112 (FIG. 2) of the broker 100 receives a publish message including topic designation data and message data from the publisher 200P, the message manager 112 registers the message data included in the received publish message to the topic specified by the topic designation data included in the publish message in the topic management data TD. Meanwhile, the message manager 112 transmits the message data registered to the topic to the subscriber 200S who has previously subscribed to the topic. This allows the subscriber 200S to subscribe to only the message data distributed by the publisher 200P that corresponds to the topic to which the subscriber 200S has previously subscribed.
[0036] A-2-2. Process executed by Publisher 200P: (Publishing process) The publishing process executed in the publisher 200P will be described. The publishing process is a process of delivering a publishing message (an encrypted publishing message PD1 and an unencrypted publishing message PD2 described later) including external data to the broker 100 as a message delivery request. FIG. 4 is a flowchart showing the contents of the publishing process. The publishing process is automatically started when the terminal device 200 is turned on, for example, by connecting the terminal device 200 and the broker 100 so as to be able to communicate with each other, and is constantly executed while the terminal device 200 is turned on. The publishing process may be manually started by a specific user Px tapping a publishing icon (not shown) arranged on a screen displayed on the display unit 252 of the terminal device 200.
[0037] It is assumed that the encryption information QD and the delimiter WD are stored in advance in the storage unit 230. The encryption information QD includes a decryption rule and an encryption key (also called a "secret key"). The delimiter WD is one or more character strings, and may be a combination of at least two of alphabets, numbers, and symbols, for example. The encryption information QD and the initial values of the delimiter WD may be stored in the storage unit 230 by transmitting the encryption information QD from an external device to the terminal device 200 via a communication means such as email, Bluetooth (registered trademark), or peer-to-peer, or by inputting the encryption information QD into the terminal device 200 via an input operation by the user P, data transfer from an external memory, or reading a QR code (registered trademark) or a barcode, and storing the encryption information QD in the storage unit 230.
[0038] As shown in FIG. 4, the distribution condition determination unit 213 (FIG. 3) of the publisher 200P determines whether the distribution condition of the external data is satisfied (S110). The distribution condition is a condition for distributing the external data, and may be, for example, a repetition timing of a predetermined period or the arrival of a predetermined deadline, or when the acquisition unit 254 acquires the external data, or when the external data acquired by the acquisition unit 254 changes. The acquisition unit 254 can acquire multiple types of external data simultaneously or at different times. Hereinafter, a case where the acquisition unit 254 acquires multiple types of external data simultaneously will be described as an example. The process of acquiring the external data by the acquisition unit 254 is an example of an acquisition process in the claims.
[0039] When the distribution condition determination unit 213 determines that the distribution condition is satisfied (S110: YES), the encryption determination unit 214 (FIG. 3) determines whether the encryption condition is satisfied for each of the acquired multiple types of external data (S120). The encryption condition is a condition for encrypting at least a part of the external data acquired by the acquisition unit 254, and may be, for example, a repetition timing of a predetermined period or the arrival of a predetermined deadline, or a change in the external data acquired by the acquisition unit 254 (for example, whether or not information having abnormality or urgency is included), or the external data is relatively confidential (for example, personal information, trade secret information). The encryption condition is set individually for each of the multiple types of external data. The encryption determination unit 214 determines that the encryption condition is satisfied when at least one type of external data that satisfies the encryption condition exists among the multiple types of external data. The multiple types of external data may include external data that is always not encrypted because the encryption condition is not satisfied (for example, external data with low confidentiality and emphasis on openness).
[0040] If the encryption determination unit 214 determines that the encryption condition is satisfied (S120: YES), the topic processing unit 216 (FIG. 3) generates topic designation data including pattern identification data according to the encryption condition (S130). The topic designation data generated here includes topic identification data and pattern identification data. The topic identification data is data indicating the topic name managed by the broker 100.
[0041] The pattern identification data is data for identifying the arrangement pattern of ciphertext in the publish messages (encrypted publish message PD1, unencrypted publish message PD2) in the subscriber 200S. The arrangement pattern is a pattern according to the presence or absence of ciphertext in the message data and the position of the ciphertext in the message data. For example, when the message data is a data string in which multiple types of external data are separated by a delimiter (e.g., a comma), the arrangement pattern includes an all-plaintext pattern in which all of the multiple types of external data are plaintext, and a ciphertext pattern including at least one type of external data that is ciphertext. Plaintext is data that can be deciphered by a computer (broker 100 or terminal device 200) without decryption. This ciphertext pattern includes multiple patterns according to the position of the ciphertext in the message data.
[0042] For example, when the message data includes the first external data and the second external data in this order, the arrangement patterns include the following patterns. "All plaintext patterns": "First external data (plaintext), second external data (plaintext)" "First half ciphertext pattern": "First external data (ciphertext), second external data (plaintext)" "Second half ciphertext pattern": "First external data (plaintext), second external data (ciphertext)" "All ciphertext patterns": "First external data (ciphertext), second external data (ciphertext)" In addition, when encrypting multiple types of external data (first external data, second external data), the encryption processing unit 215 may encrypt each of the multiple types of external data using a method in which at least one of the encryption rules and the encryption key is different from each other, to generate encrypted message data.
[0043] Next, the encryption processing unit 215 (FIG. 3) encrypts the external data to be encrypted among the multiple types of external data to generate encrypted message data (S140 to S170). The encrypted message data is a data string including ciphertext obtained by encrypting at least one of the multiple types of external data. For example, when the multiple types of external data are the above-mentioned first external data and second external data, the encrypted message data is message data of any one of the above-mentioned first half ciphertext pattern, second half ciphertext pattern, and full ciphertext pattern.
[0044] Specifically, the encryption processing unit 215 sequentially performs the following processes for each of the multiple types of external data. First, the encryption processing unit 215 judges whether or not encryption of the external data X is necessary (S140). The external data X means each of the multiple types of external data. The encryption processing unit 215 judges whether or not encryption of the external data X is necessary based on the result of the encryption judgment by the encryption judgment unit 214 in the above S120. When the encryption processing unit 215 judges that encryption of the external data X is necessary (S140: YES), it reads out the latest encryption information QD corresponding to the external data X from the storage unit 230, encrypts the external data X based on the encryption information QD, and sets it in the message data (S150). Here, as described later, the latest encryption information QD is also grasped by the subscriber 200S who has registered in the topic. That is, the external data X is encrypted by an encryption process that can be decrypted by the subscriber 200S who has registered in the topic. The process of S150 is an example of an encryption process in the claims.
[0045] When the encryption processing unit 215 determines that encryption of the external data X is not necessary (S140: NO), it sets the external data X in plain text to the message data without encryption (S160). When unprocessed external data X remains (S170: NO), the encryption processing unit 215 returns to S140 and executes the process from S140 onwards for the next external data X. When the processing of all the external data X is completed (S170: YES), the data delivery unit 217 generates an encrypted publish message PD1 and delivers it to the broker 100 (S180). The encrypted publish message PD1 is data for delivery including the topic specification data in plain text and encrypted message data. After delivering the encrypted publish message PD1, the control unit 210 of the publisher 200P returns to the process of S110 and enters a standby state. The process of S180 is an example of the data generation process and the data delivery process in the claims.
[0046] If the encryption determination unit 214 determines that the encryption conditions are not satisfied (S120:N), an unencrypted publish message PD2 is generated and distributed to the broker 100 (S190). That is, message data of the above-mentioned all-plaintext pattern is generated in which the multiple types of external data are all set in plain text without being encrypted. That is, the unencrypted publish message PD2 is data for distribution that includes plain text topic specification data and plain text message data. After distributing the unencrypted publish message PD2, the control unit 210 of the publisher 200P returns to the process of S110 and goes into a standby state. Note that if the distribution condition determination unit 213 determines that the distribution conditions are not satisfied in S110 (S110:NO), the process of S110 goes into a standby state.
[0047] (Encryption change process) The encryption change process executed in publisher 200P will be described. The encryption change process is a process for appropriately changing encryption information QD for decrypting encrypted message data included in encrypted publish message PD1 at subscriber 200S in order to improve confidentiality of the encrypted publish message PD1. Fig. 5 is a flowchart showing the contents of the encryption change process.
[0048] As shown in Fig. 5, the encryption change determination unit 218 (Fig. 3) of the publisher 200P determines whether the encryption change condition for the external data X is satisfied (S210). The encryption change condition is a condition for changing at least a part of the encryption information QD used when encrypting and decrypting the external data for each of a plurality of types of external data X. The encryption change condition may be, for example, a predetermined operation by the user P, a predetermined number of times of encryption processing of the external data reaching a predetermined number, or a predetermined repetition timing or a predetermined deadline.
[0049] When the encryption change determination unit 218 determines that the encryption change condition is satisfied (S210: YES), the encryption rule generation unit 219 (FIG. 3) generates the latest encryption rule data for the external data X. The encryption rule data is information including the encryption information QD and the delimiter WD. The encryption rule generation unit 219 generates new encryption information QD for the external data X according to a predetermined algorithm and updates the storage contents of the storage unit 230 (S220). The new encryption information QD has at least one of a decryption rule and an encryption key different from the encryption information QD already stored in the storage unit 230.
[0050] Here, the encryption change determination unit 218 determines whether the delimiter change condition of the external data X is satisfied, separately from S210 in FIG. 5, and when it is determined that the delimiter change condition is satisfied, generates a new delimiter WD of the external data X according to a predetermined algorithm and updates the storage contents of the storage unit 230. The delimiter change condition is a condition for changing the delimiter WD stored in the storage unit 230, and is a condition that is satisfied more frequently than the encryption change condition in S210. The delimiter change condition may be, for example, that the number of encryption processes of the external data X reaches a predetermined number of times that is less than the encryption change condition, or that a repetition timing or a predetermined deadline with a shorter period than the encryption change condition has arrived. In this embodiment, for example, the delimiter WD may be changed in a short time every predetermined time (for example, about 5 minutes) using a one-time password (which may be a timestamp method or a challenge-response method).
[0051] Therefore, the encryption rule data generated by the encryption rule generation unit 219 is information including the latest encryption information QD and the latest delimiter WD, and the delimiter WD is changed at any time more frequently than the encryption information QD. The encryption change condition in S210 is an example of a first encryption change condition in the claims, and the delimiter change condition is an example of a second encryption change condition in the claims.
[0052] Next, the data delivery unit 217 generates an encryption rule publish message PD3 of the external data X from the latest encryption rule data of the external data X, and delivers the encryption rule publish message PD3 to the broker 100 (S230). The encryption rule publish message PD3 is a data string for delivery including plaintext topic designation data and plaintext encryption rule data. The plaintext topic designation data includes encryption rule notification data indicating whether or not an encryption rule is notified, in addition to topic identification data. The encryption rule data is a data string (message data) in which the plaintext decryption rule and the plaintext encryption key are separated by the above-mentioned plaintext delimiter WD and arranged in this order. Note that the order of the decryption rule and the encryption key may be interchanged. After delivering the encryption rule publish message PD3, the control unit 210 of the publisher 200P returns to the process of S210 and enters a standby state. In S210, if the cipher change determination unit 218 determines that the cipher change condition is not satisfied (S210: NO), the process of S210 also goes into a standby state.
[0053] A-2-3. Processing performed in subscriber 200S: The subscribe process executed in the subscriber 200S will be described. The subscribe process is a process of subscribing to a publish message (publish messages PD1 and PD2 including external data, and an encryption rule publish message PD3) as a message subscription request to the broker 100. FIG. 6 is a flowchart showing the contents of the subscribe process. The subscribe process is automatically started when the terminal device 200 is turned on, for example, by connecting the terminal device 200 and the broker 100 so that they can communicate with each other, and is repeatedly executed at predetermined time intervals while the terminal device 200 is turned on. The subscribe process may be started manually by a specific user Px tapping a subscribe icon (not shown) arranged on the screen displayed on the display unit 252 of the terminal device 200.
[0054] 6, the subscription condition determination unit 223 (FIG. 3) of the subscriber 200S determines whether or not the subscription condition of the topic registered in the broker 100 is satisfied (S310). The subscription condition is a condition for subscribing to (receiving) a publish message corresponding to a topic, and may be, for example, a repetition timing of a predetermined period or the arrival of a predetermined deadline.
[0055] When the subscription condition determination unit 223 determines that the subscription condition is satisfied (S310: YES), the data distribution unit 224 (FIG. 3) subscribes to (receives) a publish message (any of PD1 to PD3) registered in the topic and determines whether this subscription is a subscription to encryption information QD (S320). At this time, the data distribution unit 224 is an example of a data subscription unit in the claims. If the encryption rule notification data is included in the topic designation data included in the publish message, the data distribution unit 224 determines that the subscription is to encryption information QD (encryption rule publish message PD3), and if the encryption rule notification data is not included in the topic designation data, the data distribution unit 224 determines that the subscription is to external data (encrypted publish message PD1 or unencrypted publish message PD2).
[0056] When the data sorting unit 224 judges that the request is a subscription to encrypted information (S320: YES), the cipher acquisition unit 225 judges whether or not a delimiter that matches the delimiter WD currently stored in the storage unit 230 is included in the encryption rule data (S330). When the cipher acquisition unit 225 judges that a matching delimiter is included in the encryption rule data (S330: YES), it can extract the decryption rule and the encryption key delimited by the delimiter WD. Then, the cipher acquisition unit 225 (FIG. 3) acquires the latest encryption information QD from the encryption rule data, stores it in the storage unit 230, and updates it (S340), and returns to S310. This allows the subscriber 200S to decrypt the encrypted message data encrypted based on the encryption information QD that is changed at any time by the publisher 200P.
[0057] When the encryption acquisition unit 225 determines that the matching delimiter is not included in the encryption rule data (S330: NO), the latest encryption information QD cannot be acquired from the encryption rule data, so the encryption information QD stored in the storage unit 230 is not updated, and the process returns to S310. In this way, by making the latest delimiter WD understood by each of the multiple subscribers 200S registered to a common topic different from each other, the encryption rule data can be changed individually at different times.
[0058] If data sorting unit 224 determines that the message data is not a subscription to encrypted information (S320: NO), decryption processing unit 226 (FIG. 3) determines whether the message data is encrypted, i.e., whether it is encrypted message data (S350). Decryption processing unit 226 determines that the message data is encrypted if the pattern identification data included in the topic designation data of the publish message indicates the above-mentioned ciphertext pattern, and determines that the message data is not encrypted if the pattern identification data indicates the above-mentioned full plaintext pattern.
[0059] If the data sorting unit 224 determines that the message data is encrypted (S350: YES), the decryption processing unit 226 determines whether the ciphertext included in the encrypted message data can be decrypted using the encryption information QD currently stored in the storage unit 230 (S360). The decryption processing unit 226 can grasp the arrangement of the ciphertext in the encrypted message data based on the pattern identification data. If the decryption processing unit 226 determines that the message data can be decrypted (S360: YES), it decrypts the ciphertext included in the encrypted message data according to the encryption information QD (S370). As a result, all of the multiple types of external data included in the encrypted message data are obtained in plaintext. Next, the control unit 210 of the subscriber 200S executes processing based on the plaintext message data (S380) and returns to S310.
[0060] If the decryption processing unit 226 determines that decryption is not possible (S360: NO), the control unit 210 of the subscriber 200S obtains only the plaintext contained in the encrypted message data, executes processing based on that plaintext (S380), and returns to S310.
[0061] If the data sorting unit 224 determines that the message data is not encrypted message data (S350: NO), the control unit 210 of the subscriber 200S executes processing based on the plain text contained in the message data (S380) and returns to S310. Also, if the subscription condition determination unit 223 determines in S310 that the subscription conditions are not satisfied (S310: NO), the control unit 210 goes into a standby state.
[0062] A-3.Example: Next, a usage example of the communication system 10 described above will be described. FIG. 7 is an explanatory diagram showing a usage example of the communication system 10. As shown in FIG. 7, this description is based on the following premise. The communication system 10 includes one publisher 200P and two subscribers 200S. The external data is of two types: temperature data and location data. The memory units 230 of the publisher 200P and the first subscriber 200S1 store common encryption information QD and delimiter WD ("temp&gps 1"). On the other hand, the memory unit 230 of the second subscriber 200S2 does not store common encryption information QD and delimiter WD.
[0063] A-3-1. Delivery and subscription of encrypted publish message PD1: The following describes the delivery and subscription of the encrypted publish message PD1. In FIG. 7, an encrypted publish message PD1 having the following content is illustrated. Topic (topic specification data): "Temperature & GPS / 1" Incidentally, " / 1" is pattern identification data indicating the latter half ciphertext pattern. Message (message data): "Tokyo: 21.3°C, nUumV5RUCB3ExetfJgmRzHT3vppFsdUjsQ6SjRaTAKfFh / JXTOLu85K6kgW1+6wK" Note that the string before the comma is the plaintext temperature data, and the string after the comma is the ciphertext of the location data (latitude: 35.681236 longitude: 139.767125) encrypted with the encryption key (described below).
[0064] For example, in the publishing process (FIG. 4) in the publisher 200P, if the encryption condition for the temperature data is not satisfied but the encryption condition for the location data is satisfied, it is determined in S120 that the encryption condition is satisfied (S120: YES). Here, since the temperature data is of high public interest and should be made open to the public, the encryption condition for the temperature data is always not satisfied. On the other hand, since the location data is personal information that identifies the location of the user P1 who owns the publisher 200P and should be made confidential, the encryption condition for the location data is, for example, that the external data acquired by the acquisition unit 254 is data indicating a normal state. The normal state is, for example, a state in which the temperature data is within a normal range (for example, below a predetermined upper limit temperature and above a predetermined lower limit temperature). In addition, the encryption condition for the location data may be that the location of the location data is outside a predetermined prohibited area.
[0065] Next, in the publisher 200P, topic specification data ("Temperature & GPS / 1") including pattern identification data " / 1" indicating the latter half of the ciphertext pattern is created (S130). In addition, the plaintext temperature data ("Tokyo: 21.3°C") and the ciphertext location data ("nUumV5RUCB3Exet100JgmRzHT3vppFsdUjsQ6SjRaTAKPD1Fh / JXTOLu85K6kgW1+6wK") are set in the message data (S150, S160), and the encrypted publish message PD1 is generated and delivered to the broker 100 (S180).
[0066] In both the first subscriber 200S1 and the second subscriber 200S2, when the subscription conditions are satisfied in the subscription process (FIG. 6) (S310: YES), the encrypted publish message PD1 is subscribed to from the broker 100. Because the topic specification data of the encrypted publish message PD1 includes pattern identification data (" / 1") indicating the latter half of the ciphertext pattern, it is determined that the subscription is not for encrypted information (S320: NO), and the message data is determined to be encrypted (S350: YES).
[0067] Here, the storage unit 230 of the first subscriber 200S1 stores the encryption information QD common to the publisher 200P. Therefore, the encrypted location data in the message data is decrypted (S360: YES, S370). That is, the first subscriber 200S1 can obtain both the temperature data and the location data as plain text, and executes processing based on the temperature data and the location data (S380). For example, the display unit 252 of the first subscriber 200S1 displays information on the temperature obtained by the publisher 200P and the location of the publisher 200P. This allows the user P2 who owns the first subscriber 200S1 to know both the ambient temperature and the location of the user P1.
[0068] On the other hand, the storage unit 230 of the second subscriber 200S2 does not store the encryption information QD common to the publisher 200P. The encrypted location data in the message data is not decrypted (S360: NO). That is, the second subscriber 200S2 can obtain only the temperature data as plain text, and executes processing based on this temperature data (S380). For example, the display unit 252 of the second subscriber 200S2 displays information about the temperature obtained by the publisher 200P. This allows the user P3 who owns the second subscriber 200S2 to know the ambient temperature of the user P1 but not his / her location.
[0069] As described above, by distributing and subscribing to the encrypted publish message PD1, data that requires emphasis on public access (temperature data) can be obtained by all subscribers 200S (200S1, 200S2) that have registered with the topic ("Temperature & GPS / ♯"), while data that requires emphasis on confidentiality (location data) can be obtained only by some of the subscribers 200S (200S1).
[0070] A-3-2. Delivery and subscription of unencrypted publish message PD2: The delivery and subscription of the unencrypted publish message PD2 will now be described. In FIG. 7, an unencrypted publish message PD2 having the following content is illustrated. Topic (topic specification data): "Temperature & GPS / emg" It should be noted that " / emg" means "emergency" and is pattern identification data that indicates the above full plaintext pattern. Message (message data): "Urgent: Latitude: 35.681236 Longitude: 139.767125 Tokyo: 38.1℃" All message data is in plain text.
[0071] For example, in publisher 200P, when acquisition unit 254 acquires temperature data indicating 38.1°C, which is outside the normal temperature range, not only the encryption condition for the temperature data but also the encryption condition for the position data is not satisfied. Then, in the publishing process (FIG. 4), it is determined that the encryption condition is not satisfied (S120: NO).
[0072] Next, the publisher 200P creates topic specification data ("Temperature & GPS / emg") including pattern identification data " / emg" indicating the entire plaintext pattern, and generates the above-mentioned unencrypted publish message PD2, which is delivered to the broker 100 (S190).
[0073] In both the first subscriber 200S1 and the second subscriber 200S2, when the subscription conditions are satisfied in the subscription process (FIG. 6) (S310: YES), the unencrypted publish message PD2 is subscribed to from the broker 100. Because the topic specification data of the unencrypted publish message PD2 includes pattern identification data (" / emg") indicating the entire plaintext pattern, it is determined that the subscription is not for encrypted information (S320: NO), and the message data is determined to be unencrypted (S350: NO).
[0074] As a result, both the first subscriber 200S1 and the second subscriber 200S2 can obtain both the temperature data and the location data as plain text, and execute processing based on the temperature data and the location data (S380). For example, information on "emergency," the temperature obtained by the publisher 200P, and the location of the publisher 200P is displayed on the display units 252 of the first subscriber 200S1 and the second subscriber 200S2. This allows not only the user P2 who owns the first subscriber 200S1, but also the user P3 who owns the second subscriber 200S2 to know both the ambient temperature and the location of the user P1.
[0075] As described above, by distributing and subscribing to the encrypted publish message PD1 and the unencrypted publish message PD2, it is possible to switch between a public distribution format in which data that requires confidentiality (location data) is distributed to all subscribers 200S (200S1, 200S2) registered in the topic ("Temperature & GPS / ♯"), and a confidential distribution format in which data is distributed only to some of the subscribers 200S (200S1), based on the encryption conditions.
[0076] A-3-3. Delivery and subscription of cryptographic rule publish message PD3: The delivery and subscription of the encryption rule publish message PD3 will now be described. Fig. 7 illustrates an example of an encryption rule publish message PD3 having the following content. Topic (topic specification data): "Temperature&GPS / key" It should be noted that " / key" is encryption rule notification data that indicates notification of an encryption rule. Message(Message data):"CSV-2Columntemp&gps 1Encryption key" Note that the string before the delimiter ("temp&gps 1") is the plain text of the decryption (encryption) rule, and the string after the delimiter ("temp&gps 1") is the plain text of the encryption key. "CSV-2Column" means that the rule is to decrypt the second column of the message data.
[0077] For example, in the encryption change process (FIG. 5) in the publisher 200P, if it is determined that the encryption change condition for the location data is satisfied (S210: YES), new encryption information QD is generated and stored in the storage unit 230 (S220). In addition, the encryption rule publish message PD3 in which the new encryption information QD is delimited by a delimiter ("temp&gps 1") is delivered to the broker 100 (S230).
[0078] The first subscriber 200S1, who has registered to the topic ("Temperature & GPS / ♯"), stores the common delimiter WD ("temp & gps 1"), and can identify the common delimiter WD in the encryption rule data of the subscribed encryption rule publish message PD3, and can obtain the latest encryption information QD (decryption rule and encryption key). On the other hand, the second subscriber 200S2, who has registered to the topic ("Temperature & GPS / ♯"), does not store the common delimiter WD, and cannot obtain the encryption information QD from the encryption rule data of the subscribed encryption rule publish message PD3. That is, the encryption information QD, which is changed from time to time on the publisher 200P side, can be subscribed to only by a specific subscriber 200S (200S1) by the pub-sub model while ensuring confidentiality. Moreover, the common delimiter is successively changed between the publisher 200P and the first subscriber 200S1, for example, in synchronization with the time by a one-time password. This makes it possible to further improve the confidentiality of the encryption information QD.
[0079] A-4. Usage example: The communication system 10 of the present embodiment can be used, for example, in the following manner. (Conditionally open) The conditional open form is a form in which, if certain open conditions are not met, the publisher 200P delivers an encrypted publish message PD1 that emphasizes confidentiality, and, if certain open conditions are met, the publisher 200P delivers an unencrypted publish message PD2 that emphasizes openness.
[0080] The conditionally open form can be used, for example, in the following applications: Publisher 200P's User P1: Protected person (child, elderly person, person requiring care, etc.) User P2 of the first subscriber 200S1: guardian (family member or relative of the person under guardianship, etc.) User P3 of the second subscriber 200S2: Non-guardian (contractor who subscribes to the topic, local resident, etc.) Prescribed opening conditions: An emergency situation has occurred. Encrypted publish message PD1: Includes the ciphertext of external data for which confidentiality should be emphasized (e.g., personal data such as body temperature, pulse rate, sweat, etc., and location data) and the plaintext of external data for which openness should be emphasized (highly public data such as weather data such as temperature, etc.). Examples of emergency situations include pressing an emergency button on the publisher 200P, or the publisher 200P acquiring external data (weather data, physical data, location data, etc.) that indicates a value outside a predetermined normal range.
[0081] If the open conditions are not met, an encrypted publish message PD1 that emphasizes confidentiality is distributed from the publisher 200P. As a result, external data for which confidentiality should be emphasized is obtained by the guardian (P2) but not by non-guardians (P3), ensuring the confidentiality of external data for which confidentiality should be emphasized. On the other hand, external data for which openness should be emphasized is obtained not only by the guardian (P2) but also by non-guardians (P3). By widely distributing external data for which openness should be emphasized in this way, it is possible to improve services for conditionally open contractual parties and to acquire and utilize big data.
[0082] If the open condition is met, an unencrypted publish message PD2 is distributed from the publisher 200P. As a result, the external data for which confidentiality is important is obtained not only by the protector (P2) but also by the non-protector (P3). This allows, for example, the non-protector (P3) who finds the protected person (P1) to take appropriate action based on the external data for which confidentiality is important.
[0083] (Location transmission format) The location transmission mode is a mode in which the publisher 200P distributes an encrypted publish message PD1 that includes the plaintext of the personal location data.
[0084] The location transmission mode can be used, for example, in the following applications. Publisher 200P's User P1: People of concern (children, elderly people, people in need of care, people infected with viruses, etc.) User P2 of the first subscriber 200S1: related person (family member or relative of the person to be warned, etc.) User P3 of the second subscriber 200S2: Non-related party (contractors who subscribe to the topic, drivers of vehicles, bicycles, motorcycles, etc., local residents, etc.) Encrypted publish message PD1: Includes the ciphertext of external data that requires particular confidentiality (e.g., personal data that can identify the person of interest (P1)) and the plaintext of location data for identifying the location of the person of interest (P1).
[0085] The publisher 200P distributes an encrypted publish message PD1 including the plaintext of the location data. As a result, the location data of the person to be careful (P1) is acquired not only by the related party (P2) but also by the non-related party (P3). However, the personal data of the person to be careful (P1) is acquired by the related party (P2) but not by the non-related party (P3). That is, the related party (P2) can always know where the person to be careful (P1) is, who is the object of his / her protection. On the other hand, the non-related party (P3) can know the location of the person to be careful (P1) through the display unit 252 of the second subscriber 200S2, although he / she does not know who the person to be careful (P1) is. As a result, by displaying the location of the person to be careful (P1) on a map displayed on a car navigation system installed in a vehicle or a mobile phone, for example, the person to be careful can know that he / she needs to be particularly careful when driving because he / she will be passing near the person to be careful (P1), and it is expected that traffic accidents will be suppressed.
[0086] A-5. Advantages of this embodiment: As described above, the publisher 200P of this embodiment can distribute to the broker 100 an encrypted publish message PD1 including plaintext topic specification data and encrypted message data in which at least a portion of external data is encrypted (see FIG. 4). Therefore, the broker 100 registers the encrypted message data in the specified topic without the need to decrypt the encrypted message data. As a result, according to this embodiment, it is possible to distribute the encrypted message data to an external device (subscriber 200S) while ensuring the confidentiality of the encrypted message data. In other words, by not encrypting the topic, it is possible to encrypt the message data and distribute it by topic in the broker 100.
[0087] In this embodiment, the external data includes first external data and second external data, and the encryption processing unit 215 can leave the first external data as plaintext and encrypt the second external data to generate encrypted message data including plaintext and ciphertext (see FIG. 4). As a result, according to this embodiment, for example, the first external data in plaintext that emphasizes openness and the second external data in ciphertext that emphasizes confidentiality can be delivered together to an external device as an encrypted publish message PD1.
[0088] In this embodiment, the encryption processing unit 215 may encrypt the first external data and the second external data using a method in which at least one of the encryption rule and the encryption key is different from each other to generate encrypted message data. As a result, according to this embodiment, multiple pieces of external data encrypted using different encryption methods can be delivered to an external device together as an encrypted publish message PD1.
[0089] In this embodiment, if the encryption determination unit 214 determines that the encryption condition is satisfied (S120: YES), the encryption processing unit 215 generates encrypted message data, and the data delivery unit 217 delivers the encrypted publish message PD1 to the broker 100, and if the encryption condition is not satisfied (S120: NO), the data delivery unit 217 delivers the unencrypted publish message PD2 including the plaintext topic designation data and the plaintext message data to the broker 100. That is, in this embodiment, depending on whether or not a predetermined encryption condition is satisfied, it is possible to selectively use a confidential delivery form (S180) in which an encrypted publish message that emphasizes confidentiality is delivered to the broker, and a public delivery form (S190) in which an unencrypted publish message that emphasizes openness is delivered to the broker. As a result, according to this embodiment, it is possible to realize a pub-sub model that balances the confidentiality and openness of message data.
[0090] The topic specification data of the encrypted publish message PD1 and the unencrypted publish message PD2 delivered from the publisher 200P includes pattern identification data. Therefore, the subscriber 200S can identify the arrangement pattern of the ciphertext in each of the encrypted publish message PD1 and the unencrypted publish message PD2 based on this pattern identification data (see FIG. 6). This allows the subscriber 200S to normally process the publish message whose arrangement pattern of the ciphertext may change at any time, for example, without requiring a separate means for transmitting the pattern identification data to the subscriber 200S.
[0091] In this embodiment, at least one of the encryption rules and the encryption key generated on the publisher 200P side is distributed to the subscriber 200S by communication based on the pub-sub model. This allows the encryption rules and the encryption key to be determined on the publisher 200P side without being restricted by the broker 100, and to be distributed to the subscriber 200S without requiring a separate communication means. In addition, it is possible to suppress an increase in the processing load on the broker 100 regarding encryption.
[0092] In this embodiment, only the first subscriber 200S1, who knows the common delimiter in advance, can obtain the encryption rule data from the encryption rule publish message PD3 received from the broker 100 (see FIG. 6). This improves confidentiality of the distribution of encryption rule data to a specific subscriber 200S. Since communication based on the pub-sub model is open communication in which all subscribers 200S who have registered with a topic can subscribe to the publish message of that topic, confidentiality of the distribution of encryption rule data to a specific subscriber 200S is particularly important.
[0093] In this embodiment, at least one of the encryption rule, the encryption key, and the delimiter is changed on the publisher 200P side (see FIG. 5). This makes it possible to effectively improve the confidentiality of the distribution of encryption rule data to a specific external device.
[0094] In this embodiment, the frequency of changing delimiters, which entails a relatively small processing load, is higher than the frequency of changing encryption rules and encryption keys. This makes it possible to more effectively improve the confidentiality of the distribution of encryption rule data to a specific external device while suppressing the processing load associated with changing encryption rule data.
[0095] B. Variations: The technology disclosed in this specification is not limited to the above-described embodiments, and can be modified in various forms without departing from the spirit of the invention. For example, the following modifications are also possible.
[0096] The configurations of the communication system 10, the broker 100, and the terminal device 200 in the above embodiment are merely examples and can be modified in various ways. For example, in the above embodiment, the communication system 10 is configured to include a plurality of subscribers 200S, but it may be configured to include one publisher 200P and one subscriber 200S. The terminal device 200 may be configured to not include at least one of the display unit 252 and the operation input unit 256. Furthermore, the broker 100 may be configured to include a plurality of information processing devices, and these multiple information processing devices may work together to execute the message management process.
[0097] In the above embodiment, a configuration was exemplified in which the acquisition unit 254 is capable of acquiring multiple types of external data at the same time, but the acquisition unit 254 may be configured to acquire multiple types of external data at different times, may be configured to acquire only one type of external data, or may be configured to acquire multiple external data of the same type (for example, multiple temperature data detected at different positions).
[0098] The contents of each process in the above embodiment are merely examples and can be modified in various ways. For example, in the above embodiment, the terminal device 200 is a general-purpose device that functions as both the publisher 200P and the subscriber 200S, but it may be a dedicated device that functions as only one of the publisher 200P and the subscriber 200S.
[0099] In the above embodiment, one or more pieces of external data included in the encrypted message data of the encrypted publish message PD1 may all be ciphertext. Also, the publisher 200P may encrypt the entire publish message using a known encryption method (e.g., a standard encryption method using TLS (Transport Layer Security)) and deliver it to the broker 100. Also, the broker 100 may encrypt the entire publish message using a known encryption method and have the subscriber 200S subscribe to it.
[0100] The encryption information QD may include only one of the decryption rule and the encryption key. The delimiter WD may be a single character symbol (such as a comma or a special symbol) or a character string consisting of multiple characters including at least two combinations of alphabets, numbers, and symbols.
[0101] In the above embodiment, an example in which both the decryption rule and the encryption key are changed in the encryption change process (FIG. 5) has been described, but only one of the decryption rule and the encryption key may be changed. Also, in the above embodiment, an example in which both the encryption information QD and the delimiter WD are changed has been described, but only one of the encryption information QD and the delimiter WD may be changed.
[0102] In the above embodiment, the processing for one topic has been described, but the above processing may be executed for each of a plurality of topics. For example, the publisher 200P may be configured to request the broker 100 to send a message for each of a plurality of different topics and to individually execute the processing of Fig. 4 and Fig. 5. The subscriber 200S may be configured to request the broker 100 to subscribe to a message for each of a plurality of different topics and to individually execute the processing of Fig. 6.
[0103] In the publishing process of Fig. 4, the process of S130 may always be executed without executing the process of S120. Also, if the arrangement pattern of the ciphertext in the publish message is invariant, the process of S130 may not be executed. Also, the cipher change process of Fig. 5 may not be executed. In this case, in the subscribe process of Fig. 6, the process of S350 may be executed without executing the process of S320.
[0104] In addition, in each of the above embodiments, a part of the configuration realized by hardware may be replaced by software, and conversely, a part of the configuration realized by software may be replaced by hardware. [Explanation of symbols]
[0105] 10: Communication system 35: Latitude: 100: Broker 110, 210: Control unit 112: Message management unit 130, 230: Memory unit 139: 681236 Longitude: 152, 252: Display unit 156, 256: Operation input unit 158, 258: Interface unit 190, 290: Bus 200: Terminal device 200P: Publisher 200S1: First subscriber 200S2: Second subscriber 200S: Subscriber 212: Publish processing unit 213: Distribution condition determination unit 214: Encryption determination unit 215: Encryption processing unit 216: Topic processing unit 217: Data distribution unit 218: Encryption change determination unit 219: Encryption rule generation unit 222: Subscribe processing unit 223: Subscription condition determination unit 224: Data distribution unit 225: Encryption acquisition unit 226: Decryption processing unit 254: Acquisition unit NET: Communication network PD1: Encrypted publish message PD2: Non-encrypted publish message PD3: Encryption rule publish message
Claims
1. A terminal device that communicates with an external device via a broker based on a publish-subscribe message model, An acquisition unit that acquires external data; an encryption processing unit that encrypts at least a portion of the external data to generate encrypted message data including a ciphertext; a data distribution unit that distributes an encrypted publish message including plaintext topic specification data and the encrypted message data to the broker; an encryption determination unit that determines whether an encryption condition is satisfied; Equipped with When the encryption determination unit determines that the encryption condition is satisfied, the encryption processing unit generates the encrypted message data, and the data delivery unit delivers the encrypted publish message to the broker; If the encryption determination unit determines that the encryption condition is not satisfied, the data distribution unit distributes an unencrypted publish message including plaintext topic specification data and plaintext message data to the broker; The terminal device further comprises a topic processing unit that includes, in the topic specification data, pattern identification data for identifying an arrangement pattern of ciphertext in each of the encrypted publish message and the unencrypted publish message.
2. The terminal device according to claim 1, the external data includes first external data and second external data; the encryption processing unit is capable of generating the encrypted message data including a plaintext and a ciphertext by leaving the first external data as a plaintext and encrypting the second external data. Terminal device.
3. The terminal device according to claim 1 or 2, the external data includes first external data and second external data; the encryption processing unit is capable of encrypting the first external data and the second external data by a method in which at least one of an encryption rule and an encryption key is different from each other, to generate the encrypted message data. Terminal device.
4. A terminal device that communicates with an external device via a broker based on a publish-subscribe message model, An acquisition unit that acquires external data; an encryption processing unit that encrypts at least a portion of the external data to generate encrypted message data including a ciphertext; a data distribution unit that distributes an encrypted publish message including plaintext topic specification data and the encrypted message data to the broker; an encryption rule generating unit that generates encryption rule data including at least one of a decryption rule and an encryption key for decrypting the encrypted message data; Equipped with The data distribution unit distributes a cryptography rule publish message including the topic designation data and the cryptography rule data to the broker; The encryption rule data includes the decryption rule, the encryption key, and a delimiter that separates the decryption rule and the encryption key, the delimiter being a plurality of character strings. Terminal device.
5. A terminal device as claimed in claim 4, The encryption / decryption unit further includes a cryptography change determination unit that determines whether a cryptography change condition is satisfied, When the encryption change determination unit determines that the encryption change condition is satisfied, the encryption rule generation unit generates new encryption rule data by changing at least one of the decryption rule, the encryption key, and the delimiter. Terminal device.
6. A terminal device according to claim 5, the encryption-change determination unit determines whether a first encryption-change condition and a second encryption-change condition that is more frequently satisfied than the first encryption-change condition are each satisfied; the encryption rule generation unit generates new first encryption rule data in which at least one of the decryption rule and the encryption key is changed when the encryption change determination unit determines that the first encryption change condition is satisfied, and generates new second encryption rule data in which the delimiter is changed when the encryption change determination unit determines that the second encryption change condition is satisfied. Terminal device.
7. A computer of a terminal device that communicates with an external device via a broker based on a publish-subscribe message model, An acquisition process for acquiring external data; an encryption process for encrypting at least a portion of the external data to generate encrypted message data including ciphertext; a data generation process for generating an encrypted publish message including plaintext topic specification data and the encrypted message data; a data distribution process that distributes the encrypted publish message generated by the data generation process to the broker; an encryption determination process for determining whether an encryption condition is satisfied; When it is determined in the encryption determination process that the encryption condition is satisfied, the encryption process generates the encrypted message data, and the data distribution process distributes the encrypted publish message to the broker. If it is determined in the encryption determination process that the encryption condition is not satisfied, the data distribution process distributes an unencrypted publish message including plaintext topic specification data and plaintext message data to the broker; and causing the computer to execute a topic process for including, in the topic specification data, pattern identification data for identifying an arrangement pattern of ciphertext in each of the encrypted publish message and the unencrypted publish message. Computer program.
8. A computer of a terminal device that communicates with an external device via a broker based on a publish-subscribe message model, An acquisition process for acquiring external data; an encryption process for encrypting at least a portion of the external data to generate encrypted message data including ciphertext; a data distribution process for distributing an encrypted publish message including plaintext topic specification data and the encrypted message data to the broker; an encryption rule generation process for generating encryption rule data including at least one of a decryption rule and an encryption key for decrypting the encrypted message data; Run the command, In the data distribution process, a cryptography rule publish message including the topic designation data and the cryptography rule data is distributed to the broker; The encryption rule data includes the decryption rule, the encryption key, and a delimiter that separates the decryption rule and the encryption key, the delimiter being a plurality of character strings. Computer program.
Citation Information
Patent Citations
Authentication method and related method for executing a payment
EP3428865A1
Shield machine
JP2008163612A
Access control with multicast
JP2008503950A
Data management device, data management method, and program
JP2015041319A
Resource management system, communication system, resource management method, and program
JP2018013960A
