DATA EXCHANGE IN THE BLOCKCHAIN
Patent Information
- Application Number
- DE502021005684
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-11-02
- Filing Date
- 2021-04-06
- Publication Date
- 2024-11-28
- Estimated Expiration
- 2041-04-06
AI Technical Summary
Existing blockchain solutions fail to securely exchange confidential data between parties without revealing business relationships, as they either require excessive channel creation or disclose communication relationships, which is not satisfactory for applications needing to hide recipient information.
A method where data exchange in a blockchain network uses a hash value of the document and partner name to determine a specific storage location, utilizing the Keyed-Hash Message Authentication Code (HMAC) method to securely write and read data, ensuring that business relationships remain hidden from third parties.
This approach allows secure data exchange between participants in a blockchain network while maintaining confidentiality of business relationships, ensuring that third parties cannot trace the recipient of the data, thus preserving the benefits of decentralization, security, and transparency.
Description
[0001] The present invention relates to a method and a device for data exchange in a blockchain network.
[0002] Various technologies are available for implementing a blockchain network, such as Ethereum or Hyperledger.
[0003] Such a blockchain network can be used for data exchange and decentralized and / or distributed, audit-proof data storage. However, whenever one party accesses the data, all other parties can see what was written and who initiated the transaction.
[0004] However, there are also applications in which individual parties in a blockchain network wish to exchange additional confidential data. Preferably, the parties wish to exchange data relating to an internal document. This document should preferably have been previously exchanged via a secure channel among all participants, preferably a group of participants. In other words, there is an exchanged key or a shared secret. However, who interacts with whom via the blockchain, preferably doing business, should remain secret from third parties.
[0005] In addition, however, one does not want to forego the well-known advantages of blockchain technology, such as decentralization, security, transparency, increased speed, and traceability. However, existing blockchain solutions do not yet offer a satisfactory solution with regard to the above-mentioned requirements.
[0006] In the Hyperledger Fabric blockchain, there are so-called "channels" to model private sub-blockchains for a group of N participants, for example, bilateral business relationships. Data exchanged within a channel is visible only to the respective group of participants. The disadvantage is that these channels are always created in advance, and there must be N*N channels for N participants in the network. With a large number of participants, the number of channels increases very quickly, and one encounters
[0007] Another option for private data exchange in the Hyperledger Fabric blockchain is so-called private collections. These also have the disadvantage that they must be defined in advance, i.e., N*N. Furthermore, write accesses and thus the relationships between partners remain visible, and only the data content is hidden from outside participants.
[0008] The existing options are therefore not satisfactory, since neither the reduced performance with high configuration complexity nor the disclosure of communication relationships, preferably business relationships, are acceptable in the application scenario described above.
[0009] In particular, for certain applications it is essential to conceal the business relationships of the partners involved from third parties.
[0010] In summary, the problem is that N partners want to exchange data via a blockchain without allowing third parties to draw conclusions about the business relationships, even though all transactions and data in the blockchain network are visible to all participants. In other words, data should be exchanged via a blockchain without allowing third parties to trace the recipient of the data.
[0011] US 2020 / 0280444 A1 concerns a system and techniques for identity and electronic signature verification using blockchain technology. The identity of all users executing a document can be verified based on authentication by a trusted, independent system. Information about the respective signatories, the document or smart contract, and the authentication can be stored as transactions in a blockchain.
[0012] KR 2018 0069470 A relates to a billing method for roaming charges. According to one embodiment, the billing method for roaming charges of a user terminal by a home network device comprises the steps of: registering a roaming billing ledger of a user terminal in a blockchain; and transmitting an address of the blockchain in which the roaming billing ledger is registered to the user terminal.
[0013] The above-mentioned objects are achieved by the subject matter of the appended independent claims. The dependent claims relate to further aspects of the invention.
[0014] The invention is defined in the appended claims. Any subsequent descriptions relating to embodiments, objects, and / or examples that do not fall within the scope of the claims are to be considered as not forming part of the invention.
[0015] According to the invention, a method is provided for data exchange between a first and one or more second participants in a blockchain network; wherein the blockchain network is configured to store data in a ledger; wherein each first and second participant has access to a specific document D; wherein each first participant knows the respective partner name of the one or more second participants; wherein a specific storage location in the ledger for the data exchanged in the data exchange from a first participant to one or more second participants is determined from a hash value of the document D and the respective partner name of the respective second participant; and wherein the data of the data exchange is written by the first participant to the specific storage location.
[0016] Preferably, the data of the data exchange are read out by the one or more second participants.
[0017] Preferably, the data of the data exchange are read out by the one or more second participants.
[0018] In one embodiment of the invention, the particular memory location is determined using the Keyed-Hash Message Authentication Code method, HMAC, preferably with respect to the document D.
[0019] In one embodiment of the invention, a SHA256 is used as a hash function.
[0020] In one embodiment of the invention, the specific memory location is determined from H (partner name + H(D)), where H denotes a hash function.
[0021] In one embodiment of the invention, the document D and / or a hash of the document D is disclosed for subsequent calculation of the storage locations.
[0022] In one embodiment of the invention, document D is a roaming agreement between two mobile operators.
[0023] In another embodiment, the document D is a digital contract and the data of the data exchange is a digital signature.
[0024] According to the invention, a node of a blockchain network is provided which is configured as a data processing device to carry out the method according to one of the embodiments as the first participant.
[0025] According to the invention, a node of a blockchain network is provided which is configured as a data processing device to carry out the method according to one of the embodiments as a second participant.
[0026] According to the invention, a blockchain network is provided as a data processing network with at least one first and second node according to the invention.
[0027] According to the invention, a computer program is provided, comprising instructions which, when the program is executed by a first computer, cause the first computer to carry out the steps of the method according to one of the embodiments, as the first participant.
[0028] According to the invention, a computer program is provided, comprising instructions which, when the program is executed by a first computer, cause the first computer to carry out the steps of the method according to one of the embodiments, as a second participant.
[0029] According to the invention, a computer-readable data carrier is provided on which the computer program according to the invention is stored. Short description of the drawings
[0030] The above-described objects, advantages and features of the present invention will be more easily understood from the following detailed description of certain preferred embodiments of the invention when considered in conjunction with the accompanying drawings in which Fig. 1 shows a block diagram representation of the method according to the invention. Detailed description of the drawings
[0031] Embodiments of the invention are described below. It should be noted that some aspects of one of the described embodiments may also be found in other embodiments, unless otherwise indicated or obvious. However, for clarity, each aspect will be described in detail only upon first mention, and any repeated description of the same aspect will be omitted.
[0032] In one embodiment of the invention, M parties, also referred to as participants, have access to a blockchain network. Each participant can read and write any memory address in the ledger in a transaction. However, with each write access, all other participants can see what was written and who initiated the transaction.
[0033] A subgroup of N parties wishes to exchange data regarding a confidential document. All N parties have a copy of the confidential data, preferably a shared document, also known as a secret. The document is most preferably an agreement regarding roaming charges. The data to be exchanged is worthless without the document and can be shared openly. However, the business relationships between the N partners must not be disclosed to third parties.
[0034] One application of the invention is the signing of roaming contracts. After the contract data has been distributed between two partners, preferably via a secure channel, the individual participants, i.e., the two partners, now want to digitally sign this contract on a blockchain. Using the method according to the invention, the cryptographic signature can be stored on a publicly visible blockchain without disclosing the business relationship between the two partners.
[0035] In one embodiment of the invention, confidential data, i.e., a document, is first exchanged. The exchange preferably takes place via an external and secure connection, particularly preferably via a 1-to-1 connection, between the individual partners.
[0036] In one embodiment of the invention, a cryptographic hash function H is used using the Keyed-Hash Message Authentication Code (HMAC) method. The cryptographic hash function allows for efficient calculation of a hash value based on an input. In the opposite direction, however, calculating the input document based on the hash is not possible. The execution of the method can be represented as: HMAC K M = H K ⊕ opad ‖ H K ⊕ ipad ‖ M
[0037] Based on the HMAC function, a memory address is then calculated based on the document and the partner name. In one embodiment of the invention, HMAC is a function standardized according to RFC2104. In the above representation, "∥" means a simple concatenation, i.e., ab || cd => abcd; ⊕ means a bitwise XOR.
[0038] The calculation of the HMAC is described on page 2 of RFC2104 [1]. Assume H is a cryptographic hash function with an output length of B bytes. In this case, it is assumed that the document is longer than the block size B of the hash algorithm. In this case, let K = H(document) and M be defined as the partner name. In the case that the length of K is smaller than the key length of the hashing algorithm used, K is extended by appending zeros.
[0039] It is important to ensure that the document is not easily guessable and has sufficient entropy. While a reverse calculation from a hash of the document is cryptographically impossible, if very similar or easily guessable documents are exchanged, a brute-force attack is conceivable. In this special case, an attacker could simply try all "reasonable" versions of the document, calculate the HMAC, and compare the result with the data written to the blockchain. If a match is found, the attacker would have "reconstructed" both the business relationship and the actual content of the document.
[0040] An example: The exchanged documents are always structured as follows: "Partner X pays Y Z euros rent per year." The only changing values in this document are X, Y, and Z. If an attacker simply tries all possible values for partner X and Y, as well as an amount from 1 to 9999, they could guess this document and thus also the HMAC.
[0041] In embodiments of the invention, it is therefore preferred that the exchanged documents have sufficient entropy and do not follow a simple pattern.
[0042] In detail, in embodiments of the invention, HMAC is calculated as follows: 1) As many 0 bytes are appended to K until KB bytes are long 2) Calculate K XOR ipad 3) Append the M to the result of (2): K XOR ipad ∥ M 4) Apply H to the result (3): H(K XOR ipad ∥ M) 5) Calculate K XOR opad 6) Append the result of (4) to the end of the result (5): K XOR opad ∥ H(K XOR ipad ∥ M) 7) Now apply H to the result (6): H(K XOR opad ∥ H(K XOR ipad ∥ M))
[0043] The appending and XOR operations generate a cryptographically secure key. If the key were very short, the process would no longer be secure enough. Padding ensures that a key K that is too short is padded to the bit length of the hashing algorithm used.
[0044] It's clear that the terms "document" and "partner name" should be interpreted broadly. "Document" encompasses all forms of previously exchanged data. "Partner name" encompasses all publicly known information about a participant, preferably an ID.
[0045] In embodiments of the invention based on the Hyperledger Fabric blockchain, it is advisable to use the MSP ID of the partners within the network. This ensures direct recognition and unique identification within the network.
[0046] In one embodiment of the invention, SHA256 is preferably used as the hash function H. Alternatively or in addition to the SHA256 algorithm, various other hash algorithms such as MD5, SHA1, or SHA3 can also be used. Relevant criteria are key length and security; therefore, SHA256 is preferred.
[0047] In one embodiment of the invention, Partner X wants to send a message S regarding document D to Partner Y. According to the invention, Partner X writes the data of the message to the following memory address on the ledger: Ledger HMAC K Y : = S y , where Ledger [X] is used here as an example to represent the contents of the memory location X in the ledger.
[0048] In other words, the storage address for the message is determined by the first partner X by applying HMAC to the partner name of the second partner Y and the hash of the document D (K=H(D)).
[0049] It should be noted that the content of message S is still stored at the specified storage address, visible to all participants in the blockchain. This data exchange is therefore only suitable for data that is not inherently sensitive.
[0050] In the above-mentioned application of the invention, the message S is preferably a digital cryptographic signature, which in turn does not allow any conclusions to be drawn about the underlying data. The actual message S is therefore public, but the recipient, and thus also the business relationship between X and Y, is not visible to third parties.
[0051] In one embodiment of the invention, three companies FA, F B and F C Exchange data regarding a document D. Would like to company FA now data for company F B it calculates the storage location to which FA the data is now stored as S 1 = HMAC D ( Facebook ).
[0052] The Company F B can now read the written value and send a message to FA by sending to address S 2 = HMAC D ( FA ) writes.
[0053] All three companies FA, F B and F C has access to document D and, based on the partner names of the other company and the document itself, can clearly determine which information is being sent to whom. An outside company, FE, cannot do this because it has no knowledge of the contents of document D.
[0054] The described embodiments of the invention are independent of the blockchain technology used, as long as it offers the possibility of storing data in a ledger. No modification of the underlying blockchain software is necessary.
[0055] Embodiments of the invention are implemented on a blockchain that allows the writing of arbitrary memory addresses. In a preferred embodiment, the method according to the invention is implemented for a Hyperledger Fabric blockchain. Furthermore, an implementation on an Ethereum blockchain is preferred, as this blockchain solution also allows the writing of arbitrary memory addresses: In an Ethereum smart contract, it is possible to access a so-called memory area for reading and writing. This memory area allows each 32-byte address to be assigned a unique 32-byte value.
[0056] One embodiment of the invention relates to roaming. Roaming refers to the ability of a mobile phone subscriber registered in a foreign network to continue using telephone, data, and other mobile services. Roaming is used whenever the subscriber cannot reach their provider's network, whether due to a lack of radio coverage within their own country or abroad. If a customer makes a call using a foreign network, the data packets are forwarded via the foreign network, and all usage times are logged.
[0057] To enable roaming, individual providers worldwide have agreements with each other. These agreements stipulate, among other things, all billing terms, preferably the price per data unit for data transfer or the price per time unit for calls. At the end of a billing period, the consumption of all services used is totaled and forwarded to the respective providers of the foreign users.
[0058] These contracts are concluded bilaterally between individual providers or their country-specific subsidiaries. Offering global roaming requires a large number of contracts. Negotiating, exchanging, and signing these contracts is time-consuming and costly, and the process is rarely digitized. In some cases, the contracts are exchanged by fax.
[0059] The exchange of billing data is also not yet fully digitalized, and possible inconsistencies, such as different recording of telephone minutes by the forwarding provider and the actual provider, result in lengthy renegotiations and sometimes require the use of a clearing house.
[0060] Many of these problems could be avoided with the help of a blockchain solution. Decentralization, security, transparency, increased speed, and traceability offer enormous potential here.
[0061] One embodiment of the invention relates to an exchange of roaming contracts. The creation of a contract for billing individual mobile services is not a strictly linear process and requires multiple exchanges of the draft between both parties. After several iterations, both partners agree on the billing modalities and both sign the contract document.
[0062] Both the drafting phase and the signing of the contract can be easily implemented using available blockchain solutions. However, the openness and traceability of blockchain technology are both a blessing and a curse. On the one hand, the process benefits from precisely these qualities, but on the other, companies don't want to share business details or business relationships with third parties.
[0063] The present invention enables a secure exchange of data between n contractual partners without third parties being able to determine who is exchanging data or doing business with whom and when.
[0064] One embodiment of the invention relates to an exchange of billing data and / or a dispute process. After the roaming contracts have been negotiated and signed, the applicable fees are calculated based on usage periods and negotiated price lists and discount models.
[0065] In this use case, too—the exchange of billing data and the resolution of any disputes that may arise—a blockchain solution can be advantageous due to its transparency and traceability. However, even here, it is necessary to protect the business relationships between the individual parties.
[0066] Should it become necessary to disclose the exchanged data to a third party, such as a clearing house, in the course of resolving a dispute, this is easily possible. In one embodiment of the invention, the initial document is forwarded to the clearing house. This allows the clearing house to also calculate the secret write positions. The traceability and immutability of transactions in the blockchain network now allows the clearing house to trace the exchange of data, including exact timestamps. This makes it easy to resolve any disputes.
[0067] One embodiment of the invention relates to the creation of digital signatures. Suppose two parties have a document that both need to sign. In the analog world, both parties could meet at one location and sign the document. Alternatively, the document could be sent back and forth between both parties by mail and signed one after the other.
[0068] A digital solution would also benefit from blockchain technology here, as it eliminates the time-consuming manual steps. Furthermore, a blockchain solution clearly traces who, when, and what exactly was signed. In addition to advantages in terms of traceability, such a solution also offers further advantages in terms of security and increased speed.
[0069] The complete transparency of existing blockchain solutions is both an advantage and a disadvantage here. The traceability and verifiability of every single transaction is one of the main arguments in favor of a blockchain solution, but it is also a disadvantage when it comes to keeping business relationships secret, whether for reasons of protecting trade secrets or complying with data protection regulations.
[0070] This is where the solution presented here comes in, enabling the confidentiality of business relationships. Without knowledge of the document, third parties cannot draw conclusions about business relationships based on the publicly visible transactions in the blockchain network. However, in the event of a legal dispute, for example, it is possible to grant a third party access by sharing the document, allowing that party to understand the situation.
[0071] One embodiment of the invention comprises a blockchain network with M-authenticated participants. Preferably, each of these participants has previously verified themselves to a certification authority and is thus uniquely identifiable by their cryptographic keys.
[0072] For example, two participants in this network now want to sell or buy a piece of land and draw up a contract. Both parties now have exactly the same document D in digital form.
[0073] In one embodiment of the invention, both participants can now calculate the secret memory location they need to write to in order to send a message to their partner based on D. Both parties then calculate a digital signature with which they digitally sign the document and store this signature in the previously calculated memory locations.
[0074] Both parties can now see and clearly verify that their partner has signed the document in question. It is even possible to determine exactly when this signature was made. Due to the immutability of the blockchain solution, tampering, i.e., retracting the signature, is also impossible.
[0075] If there are disputes regarding the signatures, it is also possible to provide insight to a third party by disclosing the document hash, if necessary.
[0076] The above-described objects, advantages, and features of the embodiments of the present invention will become clearer in the following detailed pseudocode presentation. The pseudocode serves to clarify the core elements of the invention at the data processing level. Depending on the specific implementation, data processing environment, and application, adaptations may be necessary.
[0077] In one embodiment of the invention, the following functions are provided on the client side:
[0078] In one embodiment of the invention, the following function is provided on the blockchain network side: ... function write(address, value){ ledger[address] = value} ...
[0079] Then a first user, PC Partner Y, performs the following steps: listen("partner y", "secret document") → key = H("secret document") → address = HMAC(key, "partner y") = 0x45f0b508c7adcle0e... → Now waits for incoming messages at location < address >
[0080] A second user, PC Partner X, performs the following steps: send("partner x", "partner y", "secret document", "message 1") -+ key = H("secret document") + address = HMAC(key, "partner y") = 0x45f0b508c7adc1e0e... -+ invoke_chaincode("modify_ledger", 0x45f0b508c7adc1e0e..., "message 1")
[0081] Thus, the "write" code is now triggered in the blockchain network and the following step is executed in the blockchain network: write(0x45f0b508c7adc1e0e..., "message 1") → ledger[0x45f0b508c7adc1e0e...] = "message 1"
[0082] Finally, the first user is optionally informed about the availability of new information: → new_data_on(0x45f0b508c7adcle0e...) = true -+ send_notification("partner y", "message 1")
[0083] Fig. 1 shows a block diagram representation of the method according to the invention. In one embodiment of the invention, partner X 100 and partner Y 200 each possess the document and an ID. Both partners are connected to a blockchain network 300.
[0084] In the example scenario shown, partner X wants to send a message to partner Y regarding document 301.
[0085] Based on the document and the ID of partner Y, the storage location 302 can now be calculated. By executing the chaincode in S1, the message is written 303a to the storage location 302 in the blockchain network 300. Preferably, partner X receives a success message 303b from the blockchain network 300 after the storage has been completed.
[0086] On the other hand, partner Y observes 305 the storage location. To do so, it calculates the storage location 306 based on the document and its ID. By registering an observation function in S2, the storage location is now observed 304a in the blockchain network 300. If the data stored there changes, a notification is sent 304b, and partner Y receives the message 307. It should be noted here that observation is a local action and therefore not visible from outside.
[0087] The foregoing description describes embodiments of the invention along with some variations. The terms, descriptions, and figures used herein are for illustrative purposes only and are not to be construed as limitations. All terms are intended in their broadest reasonable sense unless otherwise specified. Reference list
[0088] [1] https: / / tools.ietf.org / html / rfc2104
Claims
1. Method for a data exchange between a first and one or more second participants in a blockchain network; wherein the blockchain network is configured to store data in a ledger; wherein each first and second participant has access to a specific document D; wherein each first participant knows the respective partner name of the one or more second participants; characterized in that each first and each second participant calculates a specific storage location in the ledger for the data that is exchanged from a first participant to one or more second participants in the data exchange, wherein the specific storage location is calculated from a hash value of the document D and the respective partner name of the respective second participant; and wherein the data of the data exchange is written by the first participant to the specific storage location; and wherein the data of the data exchange is read out by the one or more second participants at the specific storage location.
2. The method according to claim 1, wherein the specific storage location is determined using the Keyed-Hash Message Authentication Code method, HMAC, preferably with respect to the document D.
3. The method according to claim 1 or 2, wherein a SHA256 is used as a hash function.
4. The method according to any one of claims 1 to 3, wherein the specific storage location is determined from H (partner name + H(D)), wherein H denotes a hash function.
5. The method according to any one of claims 1 to 4, wherein a disclosure of the document D and / or a hash of the document D is made for a subsequent calculation of the storage locations.
6. The method according to any one of claims 1 to 5, wherein the document D is a roaming contract between two mobile service providers; or wherein the document D is a digital contract and the data of the data exchange is a digital signature.
7. A node of a blockchain network, which, as a data processing device, is configured to perform the method according to any one of claims 1 to 6 as a first participant.
8. A node of a blockchain network, which, as a data processing device, is configured to perform the method according to any one of claims 1 to 6 as a second participant.
9. A blockchain network which, as a data processing network, is configured with at least one node according to claims 7 and 8.
10. A computer program comprising instructions which, when the program is executed by a first node of a blockchain network, cause the first node to execute the steps of the method according to any one of claims 1 to 6 as a first participant.
11. A computer program comprising instructions which, when the program is executed by a first node of a blockchain network, cause the first node to execute the steps of the method according to any one of claims 1 to 6 as a second participant.
12. A computer-readable data carrier on which the computer program according to claim 10 or 11 is stored.
