Method and device for transmitting data in a publish-subscribe system

DE502019013806D1Active Publication Date: 2025-09-04SIEMENS AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE502019013806
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-11-30
Filing Date
2019-10-17
Publication Date
2025-09-04
Estimated Expiration
2039-10-17

AI Technical Summary

Technical Problem

Existing publish-subscribe systems lack end-to-end security between communication devices, as message brokers may not be trustworthy, and broker-less methods do not ensure security within the group, leading to potential manipulation and decryption of messages by unauthorized devices.

Method used

Implementing a method that provides a group key for secure group communication and an asymmetrically encrypted point-to-point connection using public keys between communication devices, ensuring end-to-end encryption and integrity of messages.

Benefits of technology

This approach enhances security by preventing unauthorized manipulation and decryption of messages within the group, providing secure and efficient communication in industrial protocols and energy automation systems without requiring additional communication channels.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention relates to a method and a computer program product for transmitting data in a publish-subscribe system. Furthermore, the present invention relates to a device for transmitting data in a publish-subscribe system and to such a publish-subscribe system.

[0002] The technical field of the invention relates to the transmission of data in a publish-subscribe system, in particular the transmission of data in a publish-subscribe system between a first communication device and a second communication device.

[0003] The transition from closed systems to open IoT (Internet of Things) systems creates requirements for communication in industrial networks that are familiar from the telecommunications environment and the public internet. Due to the increasing decentralization of systems, components are also located behind firewall systems and are therefore not directly accessible from the internet.

[0004] This is where so-called publish-subscribe systems come into play. Publish-subscribe systems are characterized by the fact that, unlike traditional methods, no dedicated bidirectional communication connection is established between two communication end devices, such as a server and a client, but rather that communication is topic-based. Publish-subscribe systems can utilize both traditional point-to-point communication and group communication to reach a large number of systems as efficiently as possible. Examples of this include load shedding, connecting decentralized energy resources, or limiting the power feed-in in a smart grid system.

[0005] This requirement for end-to-end security applies to both point-to-point communication and group communication in a publish-subscribe system. In particular, this requirement includes ensuring that messages cannot be modified without authorization, both in group communication between multiple communication devices and in end-to-end communication between two communication devices.

[0006] To meet this requirement, various methods are known from the state of the art. The state of the art for publish-subscribe systems includes, in particular, message broker-based methods and broker-less-based methods.

[0007] In the message broker-based method, a group communication comprises at least one message broker (transmission device) and two or more communication devices. The message broker is arranged between two or more communication devices within a group communication. The task of the message broker is, on the one hand, to authenticate the individual communication devices, and on the other hand, to distribute, for example, digital certificates to requesting communication devices, as well as to transmit data to individual communication devices. With this type of communication, the communication devices can subscribe to topics with the message broker and receive the corresponding messages when another communication device publishes a message on the subscribed topic to the message broker.In the message broker-based method, the communication connection between the communication devices and the message broker is protected by transport encryption such as TLS, which ensures integrity and confidentiality and also enables the authentication of the message broker. This requires that the message broker has asymmetric key material and a corresponding X.509 certificate for authentication. In message broker-based methods, it is assumed that the message broker is trustworthy, at least with regard to the acceptance and delivery of data. However, end-to-end security between the communication devices in the group is not achieved. This is because, on the one hand, the message broker may not be trustworthy, and, on the other hand, the first communication device may not know the second communication device, which is a specified recipient of a message.

[0008] In the broker-less-based method, group communication involves only the individual communication devices and no message broker. Multicast addresses can be assigned to different topics. The communication devices interested in a topic are then subscribers to one or more multicast addresses. Group communication can be secured using group keys distributed to the individual communication devices in the group via a central key distribution server. This ensures that messages are at least secure within the group. However, end-to-end security between the communication devices in the group is not achieved, as all communication devices in the group can create, encrypt, modify, and decrypt messages.

[0009] In particular, DE 10 2016 222 523 A1 discloses that in a publish-subscribe system, topic-specific keys are derived from the distributed group key in order to form subgroups, which in turn have a subgroup key in order to increase the security of the end-to-end communication.

[0010] Furthermore, US 2013 / 142336 A1 discloses a method and apparatus for providing dedicated group key distribution in systems using generic object-oriented substation events (GOOSE). The method includes defining a group configuration for the GOOSE system across a plurality of field devices, verifying the possession of an asymmetric key pair of each field device in the group, and individually distributing a group key to each field group member device by a substation controller using secure interaction between the substation controller and the group member device, and updating the group key upon a change in the group configuration.

[0011] Furthermore, US 2018 / 254892 A1 discloses a computer system and method that enable delegated access to encrypted information for distributed messaging and queuing frameworks, or more generally for publish / subscribe architectures. In these frameworks and architectures, data is published by data producers and organized into channels or queues to which consumer applications can subscribe and which are managed by one or more broker entities.

[0012] US 2005 / 044356 A1 discloses an approach for establishing secure multicast communication between multiple multicast proxy service nodes. The multicast proxy service nodes, which can be distributed across an enterprise domain, are organized in a logical tree that mimics the logical tree arrangement of domains in a directory server system. The attributes of the multicast proxy service nodes include the group session keys that are members of the secure multicast or broadcast groups. Because both keys and key version information are stored in the directory, multicast security can be achieved across any number of network domains throughout the enterprise. Key information is stored in a directory service, and the logical tree is supported by the directory service. The keys are distributed through directory replication.Multicast proxy service nodes can retrieve current key information from a local copy of the replicated directory.

[0013] Against this background, one object of the present invention is to improve the transmission of data in a publish-subscribe system. This object is achieved by the features of independent claims 1, 14, 15, and 16. Preferred embodiments are the subject of the dependent claims.

[0014] According to a first aspect, a method for transmitting data in a publish-subscribe system comprising a key distribution server and a plurality of communication devices that can be coupled to the key distribution server, comprising at least one server device and a number of client devices, is proposed. The method comprises the following steps: a) Providing a group key by the key distribution server to a group selected from the communication devices to create group communication secured by the group key within the group of selected communication devices, b) Providing a point-to-point connection that can be encrypted using a public key of asymmetric encryption between a first and a second communication device of the group, and c) Transmitting a message encrypted using the public key for the point-to-point connection and secured using the group key between the first and the second communication device.

[0015] Step c) involves encrypting the message using the public key and then securing the encrypted message using the group key. Alternatively, step c) can also involve securing the message using the group key and then encrypting the secured message using the public key.

[0016] Here and in the following, "secure" refers to the application of the group key to the message. Furthermore, "encrypted" here and in the following refers to the application of the public key for the point-to-point connection.

[0017] In this case, an asymmetrically encrypted point-to-point connection is created between the first communication device and the second communication device in an existing group communication secured by the group key. This creates end-to-end encryption within the group between the first communication device and the second communication device.

[0018] End-to-end encryption makes it possible to transmit a message secured using the group key between the first communication device and the second communication device without the secured message being modified or decrypted by other communication devices within the group, or even outside the group. A communication device that wants to send a secure message, such as the first communication device, can only establish end-to-end encryption if it is in the same group as a specified recipient of the secure message, such as the second communication device.Conversely, the specified recipient can only decrypt the message encrypted using the asymmetrically encrypted point-to-point connection and secured using the group key if he is also able to decrypt the group encryption beforehand.

[0019] By providing end-to-end encryption between the first communication device and the second communication device, the security of message transmission between at least two communication devices within the group is increased, as manipulation and decryption of the encrypted and secured message by another communication device within the group that does not act as the designated recipient is prevented. Thus, increased security is achieved, for example, in industrial protocols and energy automation protocols through more efficient utilization of existing group communication, in which end-to-end encryption is integrated into the existing group communication, while no additional new communication channels are opened within the group.

[0020] The publish-subscribe system in this case is, in particular, a system that comprises at least one publisher who publishes data and one subscriber who can subscribe to and receive data. Subscribing can also be understood, for example, as subscribing. Publish-subscribe systems can also be referred to as publication and subscription systems. The publication and subscription of data is preferably topic-based. Therefore, one speaks in particular of a topic-based publish-subscribe system. The topic of the publish-subscribe system is, for example, a topic or a service of the publish-subscribe system. The topic can also be hierarchically structured, for example, using a topic tree, e.g., Topic 1, Topic 2, Topic 3.

[0021] The communication device is, in particular, a device configured to communicate with another communication device and exchange data. The first communication device is, for example, a server device. The second communication device is, in particular, a client device. Likewise, the first communication device can also be configured as a client device. The second communication device can also be configured as a server device. In particular, the communication devices within the group that do not correspond to the first communication device and the second communication device can each be configured as a server device and / or as a client device.

[0022] The group preferably comprises at least two communication devices which can transmit secure messages using a common group key.

[0023] The group key is, in particular, a symmetric cryptographic key. This means that the group key is preferably used to encrypt and decrypt messages by the communication devices within the group. Each communication device within the group can thus, for example, encrypt and / or decrypt and / or modify a message.

[0024] In this case, the key distribution server is embodied, in particular, in the publish-subscribe system as a central key distribution server or as a decentralized key distribution server on an intermediate node in the publish-subscribe system. The central key distribution server can preferably provide the group key to the communication devices of the group.

[0025] The provisioning in step a) includes, in particular, supplying all communication devices in the group with identical symmetric group keys. In order for a requesting communication device to receive a symmetric group key from the key distribution server, the requesting communication device is authenticated at the key distribution server. In particular, this allows messages within the group to be transmitted securely. The message secured by the group key preferably ensures integrity and confidentiality. This type of communication within the group is referred to as secure group communication.

[0026] Authentication preferably includes cryptographic authentication methods.

[0027] The provision in step b) is understood, in particular, to mean the provision of key material to the first and second communication devices in order to asymmetrically encrypt the point-to-point connection using the key material. The asymmetrically encryptable point-to-point connection is, in particular, a direct connection between the first and second communication devices. The asymmetrically encryptable point-to-point connection can also preferably be an indirect connection between the first communication device and the second communication device, in which another device is arranged between the first and second communication devices.

[0028] The transmission of the secured message from step c) is particularly cryptographically secured. Cryptographically secured transmission can be implemented using a security protocol such as TLS (Transport Layer Security), SSL (Secure Socket Layer), SSH (Secure Shell), or IPSec (Internet Protocol Security), which secures the entire data exchange. Alternatively, methods at higher layers of the OSI model can be used, such as S / MIME for the exchange of secure emails.

[0029] In this context, a message is understood to be, in particular, a digital data set, for example, a sequence of zeros and ones, also referred to as bits, with a specific length. The data set is preferably arranged within a data frame. A message comprises, for example, a payload part, such as an executable command, configuration information, status information, and / or a query command, and may also comprise other components, such as an integrity check value (ICV) in the form of a digital signature, a hash value, or the like.

[0030] In the present case, a point-to-point connection that can be encrypted using asymmetric encryption is understood to mean, in particular, a direct and immediate connection that is provided between two communication devices, such as the first communication device and the second communication device within the group within the framework of the publish-subscribe system.

[0031] In particular, the asymmetrically encrypted point-to-point connection and the group key provide end-to-end encryption between the first and second communication devices within the group, in which, for example, the first communication device encrypts and only the second communication device can decrypt. The asymmetrically encrypted point-to-point connection can also be established indirectly via another device between the first communication device and the second communication device.

[0032] For example, the secured message is transmitted from the first communication device or the second communication device or another communication device in the group to all communication devices in the group.

[0033] Preferably, the transmission of the secured message between the first communication device and the second communication device is carried out unidirectionally.

[0034] In particular, to implement steps b) and c), the existing group communication protocol is extended to enable the transmission of the encrypted and secure message by making it visible to the communication device to be transmitted which communication device acts as the designated recipient of the encrypted and secure message. For example, an extension is proposed that can be integrated into the existing group communication protocol, such as OPC-UA, MQTT, or XMPP.

[0035] According to one embodiment, a number Z, with Z ≥ 1, of certificates each comprising the at least one public key is distributed to the first communication device and / or to the second communication device by means of the key distribution server.

[0036] The certificate is, in particular, a digital certificate that includes a public key. For example, the digital certificate is designed according to the X.509 standard. The digital certificate contains, in particular, digital data that, for example, confirms properties of persons or objects. The digital certificate preferably serves to confirm the identity of a holder, such as the second communication device, and to ensure the integrity and confidentiality of the transmitted data using cryptographic methods. Cryptographic methods include, for example, asymmetric encryption methods and symmetric encryption methods. These include, for example, RSA (Rivest, Shamir, Adleman), ECDSA (Elliptic Curve Digital Signature Algorithm), AES (Advanced Encryption Standard), including certain operating modes of symmetric algorithms, such asGMAC (Galois Message Authentication Code), as well as the Diffie-Hellman key exchange.

[0037] In particular, the key distribution server distributes the group keys and the digital certificates, each of which includes a public key, to the selected communication devices within the group. For example, the digital certificates of the communication devices in the group can also be stored locally on a storage unit, with each communication device also having access to the digital certificates of the other communication devices.

[0038] The public key is preferably a cryptographically confirmed key. In particular, the public key is not secret. For example, the public key is distributed to other communication devices via a key distribution server. The public key can be used, in particular, to perform public operations, such as encrypting messages or verifying digital signatures. A public key can be uniquely assigned to a communication device. The public key is uniquely identified, in particular, by a fingerprint (e.g., a hash value).

[0039] According to a further embodiment, the first communication device encrypts the message using the public key of the second communication device, secures the encrypted message using the group key, and transmits the secured and encrypted message to the second communication device.

[0040] In particular, the second communication device then uses its private key to decrypt the secure message encrypted using the public key of the second communication device. The public key and the private key of the second communication device preferably form a key pair, by means of which asymmetric encryption of messages is realized. This has the particular advantage that only the communication device to which the public key for encrypting the message is assigned is also able to decrypt the encrypted message using its own private key.For example, the encrypted message is transmitted securely using the group key to all communication devices within the group and only the communication device, in this example the second communication device, is able to decrypt the transmitted secure and encrypted message using the private key.

[0041] The private key of a communication device, such as the second communication device, is preferably used to decrypt the encrypted and secured message or to sign the encrypted and secured message. In particular, in contrast to a symmetric encryption method, in which multiple communication devices share a secret key, in asymmetric encryption methods only one communication device has the private key for decrypting the encrypted and secured message. The private key of a communication device is, in particular, secret. Thus, the other communication devices within the group have no information about the secret private key of the communication device.

[0042] According to a further embodiment, a third communication device of the group is arranged as a transmission device between the first and the second communication device, wherein the message secured by means of the group key and encrypted by means of the public key of the second communication device is transmitted from the first communication device to the second communication device via the transmission device.

[0043] The transmission device has the advantage that, in addition to distributing the symmetric group key and the digital certificates, it is also configured to transmit at least one encrypted and secure message to at least one of the communication devices in the group. This enables the transmission of encrypted and secure messages not only between two communication devices, such as the first communication device and the second communication device, but also allows encrypted and secure messages to be transmitted to all subscribers or selected communication devices in the group using the transmission device.

[0044] Preferably, the transmission device is a device for transmitting messages, group keys, and digital certificates in a publish-subscribe system and is particularly designed as a message broker. Publish-subscribe systems particularly include both message broker-based methods and broker-less-based methods.

[0045] Preferably, in a message broker-based publish-subscribe system, subscribers can subscribe to topics with the message broker and receive the corresponding messages when a publisher publishes a message on this topic via the message broker. The message broker includes, in particular, a directory with the digital certificates, i.e., also the public key of the communication devices within the group, and can transmit a public key, for example, of a communication device to a requesting communication device. Furthermore, the message broker transmits encrypted and secure messages to the subscribers, preferably using the group key. Furthermore, the message broker distributes, for example, the symmetric group key to the selected communication devices within the group.The message broker can also, in particular, verify the authenticity of a requesting communication device by means of a digital signature of the requesting communication device.

[0046] In the broker-less-based approach, group communication involves only the individual communication devices and no message broker. Multicast addresses are assigned to different topics. The communication devices interested in a topic are then subscribers to one or more multicast addresses.

[0047] In particular, the third communication device can be designed as an LDAP ("Lightweight Directory Access Protocol" repository) in order to provide information about the digital certificates of the communication devices within the group.

[0048] Preferably, the connection from the first communication device via the transmission device to the second communication device corresponds to an indirect and mediated point-to-point connection. The encrypted and secured message is thus preferably transmitted indirectly from the first communication device via the transmission device to the second communication device. This also establishes end-to-end encryption.

[0049] According to a further embodiment, the key distribution server is designed as part of the transmission device.

[0050] In particular, the key distribution server can also be configured externally to the transmission device. The key distribution server is not part of the group, but merely provides the group keys and digital certificates for the selected communication devices within the group. It is also conceivable, for example, for the key distribution server to be configured as part of the group.

[0051] In both cases, for example, an authentication of a transmission device and also an authorization check are carried out when requesting a group key.

[0052] According to a further embodiment, the message secured by means of the group key and encrypted by means of the public key of the second communication device is signed by means of a private key of the first communication device to form a digital signature, wherein a data frame comprising the secured and encrypted message and the digital signature is transmitted from the first communication device to the second communication device.

[0053] This embodiment is particularly useful for messages that are too small to be transmitted, where the asymmetric encryption method is used directly. The asymmetric encryption method used here increases the security of message transmission. Furthermore, the authentication of a communication device can be verified using an electronic signature, the so-called digital signature, before message transmission.

[0054] In this context, a digital signature is understood in particular to mean a digital signature method in which a sender, for example, the first communication device, signs the encrypted and secured message using its private key. Signing involves calculating a value, which is in particular part of the encrypted and secured message and / or is appended to the encrypted and secured message. This value is referred to in particular as a "digital signature." Using this value, a recipient, for example, the second communication device, can preferably verify the authenticity of the first communication device and the integrity of the encrypted and secured message using the public key of the first communication device.

[0055] A data frame preferably comprises a data record or a plurality of data records which comprise the encrypted and secured message and additional data, such as the digital signature and / or other security-relevant data, and are transmitted in particular between the first communication device and the second communication device and / or between the message broker and at least one of the communication devices of the group and / or between an address and at least one of the communication devices of the group.

[0056] A data frame comprises, in particular, an identifier (ID, identification) of one or more communication devices that receive the encrypted and secured message, for example, a Diffie-Hellmann parameter of the sending communication device, the key length of the individual keys, the size of the data frame, a unique identifier for a key derivation, such as HKDF (Hashed Message Authentication Code (HMAC)-based key derivation function), PBKDF2 (Password Based Key Derivation Function), or hash algorithms such as SHA-256, another unique identifier for the algorithm for protecting the transmitted data within the data frame, an initialization vector for the algorithm, the encrypted and secured message, and a check value for verifying the integrity of the encrypted and secured message. Other information and data records within the data frame are conceivable.

[0057] In particular, the encrypted and secured message to be transmitted or being transmitted contains public and private (secret) portions within the data frame. The public portions of the encrypted and secured message can preferably be read by the communication devices in the group to which the encrypted and secured message is transmitted, whereas the private portions can only be read by the communication device that acts as the designated recipient of the encrypted and secured message. An example of a public portion is the header portion of the publish-subscribe system, which all communication devices within the group have. Examples of the private portion are the peer-to-peer information and the security information.

[0058] According to a further embodiment, the message secured by means of the group key is encrypted by means of a secret generated by the first communication device by means of the first communication device and the secret is encrypted by means of the public key of the second communication device by the first communication device, wherein a data frame comprising the secured message encrypted by the secret and the secret encrypted by the public key of the second communication device is transmitted from the first communication device to the second communication device.

[0059] This embodiment is used in particular for messages to be transmitted which contain large amounts of data.

[0060] The generated secret is, in particular, a symmetric key. Using a symmetric key, for example, a secure message can be encrypted and decrypted.

[0061] Using a symmetric key to encrypt the secure message has the advantage of reducing the amount of data compared to pure asymmetric encryption, which uses a public key to encrypt the secure message. This reduction in the amount of data to be asymmetrically encrypted can increase the speed of encryption of the end-to-end protected message.

[0062] According to a further embodiment, the message secured by means of the group key and encrypted by means of the secret is additionally signed by the first communication device using a private key to form a digital signature, wherein the data frame additionally comprising the digital signature is transmitted from the first communication device to the second communication device.

[0063] According to a further embodiment, a key table comprising a number G, with G ≥ 1, of secrets is generated by means of the first communication device, wherein the first communication device encrypts the message secured by the group key using a secret from the number G of secrets and encrypts the secret using the public key of the second communication device and signs the encrypted secret using a private key of the first communication device to form a digital signature, wherein a data frame comprising the secured message encrypted by the secret, the digital signature and the secret encrypted by the public key of the second communication device is transmitted from the first communication device to the second communication device.

[0064] The key table preferably comprises a number G, with G ≥ 1, of secrets. The secret is, in particular, designed as a symmetric key.

[0065] Each symmetric key in the key table has a unique identifier. For example, the first communication device encrypts the secured message with the symmetric key from "row 8" of the key table. Specifically, the unique identifier "row 8" is encrypted using the public key of the second communication device. The message encrypted and secured using the symmetric key, as well as the unique identifier of the symmetric key encrypted using the public key, are then transmitted within the data frame to the second communication device. The second communication device then decrypts the unique identifier using its private key and receives information about which symmetric key is used for encryption in which "row."Then, in particular, the second communication device can decrypt the encrypted and secured message using the symmetric key obtained from "line 8".

[0066] According to a further embodiment, the first communication device uses the public key of the second communication device as a defined key portion and generates its own key portion, wherein a further secret comprising a combination of the defined key portion and the own key portion is calculated by means of the first communication device and the further secret is used to encrypt the secured message, wherein a data frame comprising the secured and encrypted message and the own key portion is transmitted from the first communication device to the second communication device.

[0067] The further secret is, for example, a symmetric key, preferably a symmetric key as a result of a Diffie-Hellman key negotiation.

[0068] The specified key portion from, for example, the public key of the second communication device is, in this case, a specified and public Diffie-Hellmann key portion. The private key portion is, in particular, the private Diffie-Hellmann key portion. The combination of the public and private key portions creates the symmetric Diffie-Hellmann key, which is used to encrypt the secure message.

[0069] According to a further embodiment, the message secured by means of the group key and encrypted by means of the further secret is additionally signed by means of a private key of the first communication device to form a digital signature, wherein the data frame additionally comprising the digital signature is transmitted from the first communication device to the second communication device.

[0070] According to a further embodiment, a number N of messages secured by means of the group key, with N ≥ 2, are transmitted bidirectionally and / or unidirectionally between the first and the second communication device via the provided encrypted point-to-point connection.

[0071] In particular, the transmission of secure messages between the third communication device and / or the first communication device and / or the second communication device is carried out bidirectionally and / or unidirectionally.

[0072] According to a further embodiment, a key table comprising a number G, with G ≥ 2, of secrets is generated by means of the first communication device, wherein each of the secrets from the number G of secrets is assigned a specific identifier, wherein the first communication device encrypts a first message secured by the group key by means of a first of the secrets and encrypts a second message secured by the group key by means of a second of the secrets, wherein the key table is encrypted by the first communication device using the public key of the second communication device, wherein the first communication device signs the encrypted key table to form a digital signature, wherein a data frame comprising the secured first message encrypted by the first secret,the secured second message encrypted by the second secret, the key table encrypted by the public key, the digital signature, and the specific identifier for at least the first and second secret are transmitted from the first communication device to the second communication device.

[0073] The secret is, in particular, a symmetric key. Each symmetric key is assigned a unique identifier. A multitude of secure messages can then be encrypted using the symmetric keys. For example, a first message receives the symmetric key from "line 8," a second message the symmetric key from "line 2," and a third message the symmetric key from "line 7." This assigns each message a unique identifier, which the second communication device can then use to decrypt the respective message.

[0074] According to a further embodiment, the first communication device uses the public key of the second communication device as a specified key portion and generates its own key portion, wherein the first communication device calculates a further secret comprising a combination of the specified key portion and the own key portion, and the further secret is stored by the first communication device, wherein specific keys for the number N of messages secured by means of the group key are derived from the further secret by means of a key derivation function for the encryption of these messages, wherein a data frame comprising the number N of secured and encrypted messages and the specific keys as well as the own key portion is transmitted from the first communication device to the second communication device,wherein the second communication device stores the further secret.,

[0075] According to a further embodiment, a separate communication channel is established between two communication devices in order to perform an asymmetrically encrypted point-to-point connection outside the group.

[0076] According to a second aspect, a computer program product is proposed which causes the method as explained above to be carried out on a program-controlled device.

[0077] A computer program product, such as a computer program resource, can be provided or delivered, for example, as a storage medium, such as a memory card, USB stick, CD-ROM, DVD, Blu-ray, or in the form of a downloadable file from a server in a network. This can be done, for example, in a wireless communications network by transmitting a corresponding file with the computer program product or the computer program resource.

[0078] According to a third aspect, a device for transmitting data in a publish-subscribe system is proposed, comprising a key distribution server and a plurality of communication devices that can be coupled to the key distribution server, comprising at least one server device and a number of client devices. The device comprises: a first provisioning unit configured to provide a group key through the key distribution server to a group selected from the communication devices for creating group communication secured by the group key within the group of selected communication devices, a second provisioning unit configured to provide a point-to-point connection that can be encrypted using a public key of asymmetric encryption between a first and a second communication device of the group, and a transmission unit configured to transmit a message that is encrypted using the public key for the point-to-point connection and secured using the group key between the first and the second communication device via the provided encrypted point-to-point connection.

[0079] The respective unit, for example, the provision unit or the transmission unit, can be implemented in hardware and / or software. In a hardware implementation, the respective unit can be embodied as a device or as part of a device, for example, as a computer, a microprocessor, or a vehicle control computer. In a software implementation, the respective unit can be embodied as a computer program product, as a function, as a routine, as part of a program code, or as an executable object.

[0080] The embodiments and features described for the proposed device apply accordingly to the proposed method.

[0081] According to a fourth aspect, a publish-subscribe system is proposed which comprises at least one key distribution server and a plurality of communication devices which can be coupled to the key distribution server and at least one device according to the third aspect.

[0082] Further possible implementations of the invention also include combinations of features or embodiments described above or below with respect to the exemplary embodiments not explicitly mentioned. In this case, the person skilled in the art will also add individual aspects as improvements or additions to the respective basic form of the invention.

[0083] Further advantageous embodiments and aspects of the invention are the subject of the dependent claims and the exemplary embodiments of the invention described below. The invention will be explained in more detail below using preferred embodiments with reference to the accompanying figures. Fig. 1 shows a schematic flow diagram of an embodiment of a method for transmitting data in a publish-subscribe system; Fig. 2 shows a schematic block diagram of an embodiment of a publish-subscribe system for transmitting data with a transmission device and communication devices; Fig. 3 shows a schematic block diagram of an embodiment of a publish-subscribe system for transmitting data with a transmission device, a key distribution server, and communication devices; Fig. 4 shows a schematic flow diagram of an embodiment of a method for transmitting at least one message between the first communication device and at least the second communication device by means of a transmission device within a publish-subscribe system; Fig.Fig. 5 shows a schematic block diagram of an embodiment of a publish-subscribe system for transmitting data with a key distribution server and communication devices; and Fig. 6 shows a schematic block diagram of an embodiment of a device for transmitting data in a publish-subscribe system.

[0084] In the figures, identical or functionally equivalent elements have been given the same reference numerals unless otherwise stated.

[0085] Fig. 1 shows a schematic flow diagram of an embodiment of a method for transmitting data in a publish-subscribe system 100. For this purpose, the Fig. 2 A schematic block diagram of an embodiment of the publish-subscribe system 100 for transmitting data. The publish-subscribe system 100 comprises a transmission device 300 and a group G comprising communication devices 101 to 104. The communication device 101 is referred to in particular as the first communication device, while the communication device 102 is preferably referred to as the second communication device.

[0086] The transmission device 300 is particularly designed as a third communication device within group G and is preferably arranged between the first and second communication devices 101, 102. The message, secured by the group key and encrypted by the public key of the second communication device 102, is transmitted from the first communication device 101 to the second communication device 102 via the transmission device 300.

[0087] Furthermore, a key distribution server 200 is provided, which in the example of Fig. 2 is formed as part of the transmission device 300.

[0088] The embodiment of the Fig. 1 comprises the following method steps S101 to S103: In step S101, a group key is provided by the key distribution server 200 to the group G selected from the communication devices 101, 102, 103, 104 to create a group communication secured by the group key within the group G of the selected communication devices 101, 102, 103, 104.

[0089] In particular, a number Z, with Z ≥ 1, of certificates each comprising the at least one public key is distributed to the first communication device 101 and to the second communication device 102 by means of the key distribution server 200.

[0090] In step S102, a point-to-point connection that can be encrypted using a public key of asymmetric encryption is provided between the first and second communication devices 101, 102 of group G.

[0091] In step S103, a message encrypted by means of the public key for the point-to-point connection and secured by means of the group key is transmitted between the first and the second communication device 101, 102.

[0092] Preferably, the first communication device 101 encrypts the message using the public key of the second communication device 102, secures the encrypted message using the group key, and transmits the secured and encrypted message to the second communication device 102.

[0093] In particular, the message secured by the group key and encrypted by the public key of the second communication device 102 is encrypted using a private key of the first communication device 101 to form a digital signature. A data frame containing the secured and encrypted message and the digital signature is then transmitted from the first communication device 101 to the second communication device 102.

[0094] The message secured by the group key is preferably encrypted by the first communication device 101 using a secret generated by the first communication device 101, and the secret is encrypted by the first communication device 101 using the public key of the second communication device 102. A data frame comprising the secured message encrypted by the secret, as well as the secret encrypted by the public key of the second communication device, is then transmitted from the first communication device 101 to the second communication device 102.

[0095] In particular, the message secured by the group key and encrypted by the secret is additionally signed by the first communication device 101 using a private key to create a digital signature. Subsequently, the data frame, additionally comprising the digital signature, is transmitted from the first communication device 101 to the second communication device 102.

[0096] Preferably, a key table comprising a number G, with G ≥ 1, of secrets is generated by the first communication device 101. The first communication device 101 encrypts the message secured by the group key using a secret from the number G of secrets, encrypts the secret using the public key of the second communication device 102, and signs the encrypted secret using a private key of the first communication device 101 to form a digital signature. A data frame comprising the secured message encrypted by the secret, the digital signature, and the secret encrypted by the public key of the second communication device 102 is then transmitted from the first communication device 101 to the second communication device 102.

[0097] In particular, the first communication device 101 uses the public key of the second communication device 102 as a specified key portion and generates its own key portion. A further secret comprising a combination of the specified key portion and the own key portion is calculated by the first communication device 101, and the further secret is used to encrypt the secured message. A data frame comprising the secured and encrypted message and the own key portion is then transmitted from the first communication device 101 to the second communication device 102.

[0098] The message secured by the group key and encrypted by the additional secret is preferably additionally signed using a private key of the first communication device 101 to form a digital signature. The data frame, additionally comprising the digital signature, is then transmitted from the first communication device 101 to the second communication device 102.

[0099] In particular, a number N of messages secured by means of the group key, with N ≥ 2, are transmitted bidirectionally and / or unidirectionally between the first and the second communication device 101, 102 via the provided encrypted point-to-point connection.

[0100] Preferably, a key table comprising a number G, with G ≥ 2, of secrets is generated by the first communication device 101. Each of the secrets from the number G of secrets is assigned, in particular, a specific identifier. The first communication device 101 preferably encrypts a first message secured by the group key using a first of the secrets and encrypts a second message secured by the group key using a second of the secrets. The key table is encrypted by the first communication device 101, in particular, using the public key of the second communication device 102. Furthermore, the first communication device 101 signs the encrypted key table to form a digital signature.Subsequently, a data frame comprising the secured first message encrypted by the first secret, the secured second message encrypted by the second secret, the key table encrypted by the public key, the digital signature, and the specific identifier for at least the first and second secret is transmitted from the first communication device 101 to the second communication device 102.

[0101] The first communication device 101 uses, in particular, the public key of the second communication device 102 as a specified key portion and generates its own key portion. The first communication device 101 calculates a further secret comprising a combination of the specified key portion and its own key portion, and the further secret is stored by the first communication device 101. Furthermore, specific keys for the number N of messages secured by the group key are derived from the further secret using a key derivation function in order to encrypt them. A data frame comprising the number N of secured and encrypted messages, the specific keys, and the own key portion is then transmitted from the first communication device 101 to the second communication device 102.In particular, the second communication device 102 stores the further secret.

[0102] Fig. 3 shows a schematic block diagram of an embodiment of a publish-subscribe system 100 for transmitting data with a transmission device 300, a key distribution server 200 and communication devices 101 to 104. In comparison to the publish-subscribe system 100 of Fig. 2 is in Fig. 3 the key distribution server 200 is formed outside the transmission device 300.

[0103] Fig. 4 shows a schematic flowchart of an embodiment of a method for transmitting at least one message between the first communication device 101 and at least the second communication device 102 by means of a transmission device 300 within a publish-subscribe system 100. Furthermore, the publish-subscribe system 100 comprises a further communication device 103. The first communication device 101 is designed in particular as a server device. The second communication device 102 and the further communication device 103 are preferably designed as client devices. Furthermore, the transmission device 300 is designed, for example, as a message broker. The publish-subscribe system 100 from Fig. 4 is preferably topic-based. In particular, the first communication device 101 is configured as a publisher, while the second communication device 102 and the further communication device 103 are configured as subscribers.

[0104] The embodiment of the Fig. 4 comprises the following method steps S401 to S409: In step S401, a topic, such as "Measurement Sensor ID," is published to the transmission device 300 by means of the first communication device 101. The transmission device 300 has, in particular, a public directory for the communication devices 102, 103 within the group G. By means of this directory, the topics that the transmission device 300 receives from the first communication device 101 or other server devices are visible to the communication devices 102, 103.

[0105] In steps S402 and S403, the communication devices 102, 103 each subscribe to the transmission device 300. This means that the communication devices 102, 103 are informed of all messages published to the transmission device 300 via the topic "Measurement Sensor_ID" by means of the first communication device 101.

[0106] In step S404, the first communication device 101 obtains information about which communication devices 102, 103 have subscribed to the topic "Measurement Sensor_ID." Since the second communication device 102 and the further communication device 103 have subscribed, but the second communication device 102 acts as the designated recipient, the first communication device 101, i.e., the server device, queries the digital certificate of the second communication device 102 in order to obtain the public key of the second communication device 102 for later encryption of the secured message. This is particularly due to the fact that, up to now, only the transmission device 300 and / or a key distribution server (not shown) has the digital certificates of the communication devices 102, 103.

[0107] In step S405, the first communication device 101 publishes a new value, the "Value," to the transmission device 300 for the topic "Measurement Sensor_ID." This can be a measured value of a sensor with the Sensor_ID.

[0108] In step S406, the transmission device 300 now informs the subscribers, i.e., the second communication device 102 and the further communication device 103, that the first communication device 101 has published a new value under the topic "Measurement Sensor_ID." However, the transmission device 300 does not yet receive any information about the precise nature of the new "Value."

[0109] In step S407, after successful authentication at the transmission device 300, the first communication device 101 receives the digital certificate of the second communication device 102 requested in step S404 and thus its public key. Subsequently, the first communication device 101 encrypts the portion of the message with the public key of the second communication device 102 that the second communication device 102 is authorized to read, i.e., the "Value."

[0110] In step S408, the first communication device 101 publishes the message encrypted by the public key of the second communication device 102 and secured by the group key to the transmission device 300.

[0111] In step S409, the transmission device 300 then transmits the encrypted and secured message to all subscribers, i.e., to the second communication device 102 and the further communication device 103. Each of the communication devices 102, 103 subscribed to the topic "Measurement Sensor_ID" within group G can receive the encrypted and secured message. However, only the second communication device 102 can decrypt the portion of the encrypted and secured message containing the value "Value" using its private key, since the encrypted and secured message was previously encrypted using the public key of the second communication device 102. The further communication device 103 is unable to decrypt the encrypted and secured message.Thus, end-to-end encryption is realized when transmitting an encrypted and secured message within the group between the first communication device 101 and the second communication device 102.

[0112] In the case where a key table with symmetric keys is used and several messages are transmitted between the first communication device 101 and the second communication device 102, the schematic flow chart of Fig. 4 carried out as follows: Steps S401 to S407 are identical to the steps explained above.

[0113] In step S408, the first communication device 101 encrypts the message secured by the group key, which contains the value "Value," with one of the symmetric keys from the key table generated by the first communication device 101. The key table, in turn, is encrypted using the public key of the second communication device 102. The first communication device 101 then sends the encrypted and secured message and the encrypted key table with a unique identifier of the symmetric key used to the transmission device 300.

[0114] In step S409, the second communication device 102 receives the encrypted and secured message and the encrypted key table with the unique identifier of the symmetric key used. The second communication device 102 can now decrypt the encrypted key table using the private key and can then use the unique identifier to decrypt the symmetric key from the table. The method is analogous when transmitting a new message. A different symmetric key is used for the new message.

[0115] Fig. 5 shows a schematic block diagram of an embodiment of a publish-subscribe system 100 for transmitting data with a key distribution server 200 and communication devices 102, 103, 104.

[0116] Here, the key distribution of the group keys within group G is realized via a key distribution server 200. The secure message to be transmitted is transmitted to an address A. The communication devices 102, 103, 104 that wish to receive the secure message can subscribe to address A.

[0117] Fig. 6 shows a schematic block diagram of an embodiment of a device 10 for transmitting data in a publish-subscribe system 100. An example of the publish-subscribe system 100 is shown in Fig. 2 shown. The device 10 comprises a first provision unit 11, a second provision unit 12, and a transmission unit 13.

[0118] The first provisioning unit 11 is configured to provide a group key through the key distribution server 200 to a group G selected from the communication devices 101, 102, 103, 104 to create a group communication secured by the group key within the group G of the selected communication devices 101, 102, 103, 104.

[0119] The second provisioning unit 12 is configured to provide a point-to-point connection between a first and a second communication device 101, 102 of group G, which can be encrypted using a public key of asymmetric encryption.

[0120] The transmission unit 13 is configured to transmit a message encrypted by means of the public key for the point-to-point connection and secured by means of the group key between the first and the second communication device 101, 102.

[0121] Although the present invention has been described using exemplary embodiments, it can be modified in many ways.

Claims

1. Method for transferring data in a publish-subscribe system (100) comprising a key distribution server (200) and a plurality of communication apparatuses (101, 102, 103, 104) that can be coupled to the key distribution server (200), comprising at least one server apparatus and a number of client apparatuses, comprising: a) providing (S101) a group key through the key distribution server (200) to a group (G) selected from the communication apparatuses (101, 102, 103, 104) to create a group communication, which is protected by the group key, within the group (G) of selected communication apparatuses (101, 102, 103, 104), b) providing (S102) a point-to-point connection, which can be encrypted by means of a public key of an asymmetric encryption, between a first and a second communication apparatus (101, 102) of the group (G), and c) transferring (S103) a message, which is encrypted for the point-to-point connection by means of the public key and protected by means of the group key, between the first and second communication apparatuses (101, 102), wherein the first communication apparatus (101) encrypts the message by means of the public key of the second communication apparatus (102), protects the encrypted message by means of the group key and transfers the protected and encrypted message to the second communication apparatus (102).

2. Method according to Claim 1, characterized in that a number Z, where Z ≥ 1, of certificates comprising in each case the at least one public key is distributed to the first communication apparatus (101) and / or to the second communication apparatus (102) by means of the key distribution server (200).

3. Method according to Claim 1 or 2, characterized in that a third communication apparatus of the group is arranged as a transmission apparatus (300) between the first and second communication apparatuses (101, 102), wherein the message protected by means of the group key and encrypted by means of the public key of the second communication apparatus (102) is transmitted from the first communication apparatus (101) to the second communication apparatus (102) via the transmission apparatus (300).

4. Method according to Claim 3, characterized in that the key distribution server (200) is in the form of part of the transmission apparatus (300).

5. Method according to one of Claims 1 to 4, characterized in that the message protected by means of the group key and encrypted by means of the public key of the second communication apparatus (102) is signed by means of a private key of the first communication apparatus (101) to form a digital signature, wherein a data frame containing the protected and encrypted message and also the digital signature is transferred from the first communication apparatus (101) to the second communication apparatus (102).

6. Method according to one of Claims 1 to 4, characterized in that the message protected by means of the group key is encrypted by means of the first communication apparatus (101) using a secret generated by the first communication apparatus (101) and the secret is encrypted by the first communication apparatus (101) by means of the public key of the second communication apparatus (102), wherein a data frame containing the protected message encrypted by the secret and also the secret encrypted by the public key of the second communication apparatus (102) is transferred from the first communication apparatus (101) to the second communication apparatus (102).

7. Method according to Claim 6, characterized in that the message protected by means of the group key and encrypted by means of the secret is additionally signed by the first communication apparatus (101) by means of a private key to form a digital signature, wherein the data frame additionally containing the digital signature is transferred from the first communication apparatus (101) to the second communication apparatus (102).

8. Method according to one of Claims 1 to 4, characterized in that a key table comprising a number G, where G ≥ 1, of secrets is generated by means of the first communication apparatus (101), wherein the first communication apparatus (101) uses a secret from the number G of secrets to encrypt the message protected by the group key and encrypts the secret by means of the public key of the second communication apparatus (102) and uses a private key of the first communication apparatus (101) to sign the encrypted secret to form a digital signature, wherein a data frame containing the protected message encrypted by the secret, the digital signature and also the secret encrypted by the public key of the second communication apparatus (102) is transferred from the first communication apparatus (101) to the second communication apparatus (102).

9. Method according to one of Claims 1 to 4, characterized in that the first communication apparatus (101) uses the public key of the second communication apparatus (102) as a stipulated key component and generates an independent key component, wherein a further secret comprising a combination of the stipulated key component and the independent key component is calculated by means of the first communication apparatus (101) and the further secret is used to encrypt the protected message, wherein a data frame containing the protected and encrypted message and also the independent key component is transferred from the first communication apparatus (101) to the second communication apparatus (102).

10. Method according to Claim 9, characterized in that the message protected by means of the group key and encrypted by means of the further secret is additionally signed by means of a private key of the first communication apparatus (101) to form a digital signature, wherein the data frame additionally containing the digital signature is transferred from the first communication apparatus (101) to the second communication apparatus (102).

11. Method according to one of Claims 1 to 10, characterized in that a number N of messages protected by means of the group key, where N ≥ 2, is transferred bidirectionally and / or unidirectionally between the first and second communication apparatuses (101, 102) via the provided encrypted point-to-point connection.

12. Method according to Claim 11, characterized in that a key table comprising a number G, where G ≥ 2, of secrets is generated by means of the first communication apparatus (101), wherein each of the secrets from the number G of secrets is assigned a specific designation, wherein the first communication apparatus (101) uses a first of the secrets to encrypt a first message protected by the group key and uses a second of the secrets to encrypt a second message protected by the group key, wherein the key table is encrypted by the first communication apparatus (101) by means of the public key of the second communication apparatus (102), wherein the first communication apparatus (101) signs the encrypted key table to form a digital signature, wherein a data frame containing the protected first message encrypted by the first secret, the protected second message encrypted by the second secret, the key table encrypted by the public key, the digital signature and also the specific designation for at least the first and second secrets is transferred from the first communication apparatus (101) to the second communication apparatus (102).

13. Method according to Claim 11, characterized in that the first communication apparatus (101) uses the public key of the second communication apparatus (102) as a stipulated key component and generates an independent key component, wherein a further secret comprising a combination of the stipulated key component and the independent key component is calculated by the first communication apparatus (101) and the further secret is stored by the first communication apparatus (101), wherein specific keys for the number N of messages protected by means of the group key are derived from the further secret by means of a key derivation function to encrypt said messages, wherein a data frame containing the number N of protected and encrypted messages and the specific keys and also the independent key component is transferred from the first communication apparatus (101) to the second communication apparatus (102), wherein the second communication apparatus (102) stores the further secret.

14. Computer program product that causes the method according to one of Claims 1 to 13 to be performed on a program-controlled device.

15. Apparatus (10) for transferring data in a publish-subscribe system (100) comprising a key distribution server (200) and a plurality of communication apparatuses (101, 102, 103, 104) that can be coupled to the key distribution server (200), comprising at least one server apparatus and a number of client apparatuses, comprising: - a first providing unit (11) that is designed to provide a group key through the key distribution server (200) to a group (G) selected from the communication apparatuses (101, 102, 103, 104) to create a group communication, which is protected by the group key, within the group (G) of selected communication apparatuses (101, 102, 103, 104), - a second providing unit (12) that is designed to provide a point-to-point connection, which can be encrypted by means of a public key of an asymmetric encryption, between a first and a second communication apparatus (101, 102) of the group (G), and - a transfer unit (13) that is designed to transfer a message, which is encrypted for the point-to-point connection by means of the public key and protected by means of the group key, between the first and second communication apparatuses (101, 102), wherein the first communication apparatus (101) is designed to encrypt the message by means of the public key of the second communication apparatus (102), to protect the encrypted message by means of the group key and to transfer the protected and encrypted message to the second communication apparatus (102) by means of the transfer unit (13).

16. Publish-subscribe system (100) having at least one key distribution server (200), a plurality of communication apparatuses (101, 102, 103, 104) that can be coupled to the key distribution server (200) and at least one apparatus (10) for transferring data in the publish-subscribe system (100) according to Claim 15.