Blockchain as refinery for Industrial IoT data

Alisher A. Khassanov
Robonomics Network by Airalab
15 min readOct 14, 2018

--

How to turn production data into a valuable consumer product? How can an Industrial IoT create trust between participants in the supply chain? What can blockchain technologies contribute to the production?

User story

At the annual congress on the Internet of Things in Barcelona in 2017, I saw the industrial giant Yokogawa, together with a cloud technology partner, offering tracing wine delivery terms for buyers. Indeed, it is easy to spoil wine by violating its storage conditions: temperature and humidity. If by the QR code from the label I can get data on the quality of storage and delivery from the sensors installed in the storages, I can be sure that I will receive a product of good quality with an original flavor and aroma. This is the future of brands that care about delivering the quality product to their consumer. This way you can create the added value of the product, because confidence in its quality makes such a product better than its counterpart’s. In case of wine, consumers will rather choose the bottle that can tell its story. And many, including myself, will find these data valuable enough to pay for them. In Industry 4.0, this is the inevitable development of meta-information about the product for the buyer, because they started without any labels at all and continued by standardizing the indication of the composition and conditions of production. Perhaps with the understanding and penetration of digital technology this will become the standard. Imagine yourself in the future: among the products on the store shelf that can tell you all their production and delivery story, will you buy those those that cannot tell this story? This is the same as choosing a product without a label today.

But for anyone, even for those a little familiar with computer technology, sooner or later the vulnerability of the data added to the product will become obvious. The manufacturer and the data storage organization are business partners. Therefore, it is profitable for them to show not the true data, but only those that convince to buy their product. In this system, it is advantageous to forge data or delete those that show violations of the terms of delivery. At best, they can remove data from the system along with the disposal of the damaged batch of products. However, they can edit the recorded sensor readings. Especially if at the time of purchase the loss of quality is not obvious. Of course, brands can rely on their reputation, but in this case there is still no adequate technology that would allow honest brands to take advantage or control the conditions of production and delivery by their partners. In any case, with the use of cloud technologies, the buyer still does not buy the product along with the data. Data is only granted access to. And this is still the usual website of the selling partner companies, storing data on servers controlled by them.

My name is Alisher, I’m an engineer in the community of open source developers Airalab and Chief Engineer of the research center Airalab Rus. At Airalab community we develop Robonomics — a network for blockchain applications of Smart Cities and Industry 4.0 (for example, this is a contract system for operating machines in the economy, more details can be found in the whitepaper) on the Ethereum platform. At Airalab Rus, we use the Robonomics platform for experiments and proof-of-concepts in Russia and, for example, we are currently implementing a project which is trying to demonstrate how data can truly be produced with a product if their unique footprint along with the cause (contract) will be recorded in public blockchain. Such a record will make obvious any attempt to edit the data: backdating or deleting it, which will make the data after its release independent of the manufacturer or its partners, as well as the product that the buyer acquires. Many other blockchain platforms have made the announcements of similar projects with their own vision. Our project is still in progress and I will tell you more about it when I myself buy a cake with a secure delivery history. Or, as we call it, with a “blockchainization” of the supply chain.

Here I want to share the result of the industrial data protection concept implemented this summer using the same idea. As I see it, today companies can use technological data only for internal purposes, or they must provide confidence in the inter-corporate use of data by supporting their own name in long-term relationships or by resorting to auditing. In our case, the customer — a large Russian industrial company — was interested in a system that would allow to trust the data on the operation of their equipment by small local organizations, relying on blockchain technology.

Technology

Here I will describe a method of providing trust in the technological data for the possibility of their use by several partner companies. The method does not require an audit or involvement of a third party, but is entirely provided by modern cryptography: electronic digital signature tools and blockchain technologies.

The process of obtaining and publishing data that requires protection in order to have value for a third-party organization or for engaging in common processes can be divided into two stages. In the following sections, the steps will be described using a sensor as an example

Obtaining data

Physical information enters the digital environment through a sensor, technological processes are controlled by digital controllers. Information needs to be protected at the earliest stage, when reliable information is needed in the technological chain for the control process, and physical disturbance of the measuring process is unacceptable. That is, as soon as the information has acquired a digital form inside the sensor.

Our partners REMME offer a public key infrastructure based on decentralized technologies. This is the same digital signature that you use for secure communication on the Internet, in bank cards for payment, or in EDS tokens for signing documents.

The key difference lies in the decentralization of the infrastructure: instead of the root certificate of the centralized authorization center, the ownership of the public key is confirmed by the entry in the public blockchain, which works 100% of the time and cannot be compromised.

REMME infrastructure components

Step 1. Request generation of the key pair and register the public key. In the REMME infrastructure, this is done using remme-client-js JavaScript client libraries or the remme-client-dotnet .NET platform. Our colleagues have announced future python support, which will make it easier to use in ROS packages (Robot Operating System, framework for robotic applications). We hope for a solution for embedded microcontroller systems and support for the signature of ed25519. The public key from the generated pair is registered by the infrastructure in the blockchain based on Hyperledger Sawtooth.

Step 2. Install the keys in the sensor. The built-in computer of the sensor providing its digital interface hosts software for digitally signing measurements with the private key of the generated pair. To protect against compromise, the signing private key can be placed in the sensor by the manufacturer. Or it can be placed on a hardware carrier, for example, on a cryptographic chip.

Step 3. Transfer the sensor readings together with the meta-information and digital signature. The measurement message is signed without leaving the sensor. In the Proof-of-Concept project, we made a ROS-compliant message like: time timestamp, string source_id, int sequence, measurement_type data.

Message with a digital signature

Here data is the sensor’s useful data of the measurement_type type. For example, for a temperature sensor, type measurement_type may be a temperature in Celsius degrees. In the timestamp field, the sensor can record the date and time of the measurement, if it has a reliable clock. The ID of the sensor is recorded in source_id, and the number of this measurement in a common sequence is recorded in the sequence field. With the help of the latter one can detect the loss of the measurement performed by the sensor.

Step 4. Check the authenticity of the performed measurements. Now, each sensor measurement is not just a record in the database, but structured values, signed by the secret key of the sensor. You can verify that the readings have not been altered or trimmed since signing. It is impossible to sign another data block and issue it as the original one: the key is registered in the blockchain and the compliance of the signature with the public key can be checked in the PKI REMME.

It seems now there is only a threat to the integrity of the information about the process by deleting the stored data. In business processes, data relevant to the contractual relationship has value. For example, the port calculates the price of cargo handling at the rate referred to in the contract with the shipping agent. With the help of sensors on the equipment, the consumption of electricity or fuel is determined, the costs are calculated (based on the staff salaries and equipment depreciation), the margin is added and the price of movement of the load by the equipment is obtained. Not only the information of the sensors is important, but also its connection with the cause of the occurrence — the contract under which the technological data of one side is transferred to the other.

Smart contracts exist to reflect contractual relationships in the digital environment. These are programs. They can, according to a given algorithm — the terms of the contract — check, reserve and transfer funds of the parties. Robonomics platform users and cyber-physical systems can use the platform to conclude contracts on equal terms, and a decentralized network monitors compliance with its conditions and, by results, decides whether to transfer funds to the contractor or return them to the customer without the involvement of a third party. For example, at the beginning of this year, we conducted a demonstration game, in which automatic “factories” accepted market demand for the “goods” they produce and concluded contracts with an automatic supplier of raw materials and a warehouse. In the alpha version of the game, more than two thousand contracts were concluded, about two thirds of which were between the machines. How else it can be used and how it works can be found in robonomics white paper. Here I will show how the platform allows you to protect the integrity of the data, linking them with the execution of the contract.

Blockchainization

A digital signature allows you to verify the authenticity of the data (i.e., that they were not forged), and by verifying the public key, you can confirm that the owner of the pairwise private key, and not someone else, signed the data. But the data in this case still belong to their manufacturer and are managed by them. For example, data can be deleted, some of them can be hidden. We need a way to make the data independent of its source and available in a common environment, and it is better to be embedded in a secure description of the business process.

To collect data, a monitoring agent is installed in the supplying organization — a software robot with which you can conclude a smart contract that reflects the business process in the blockchain. The process that the agent performs under the contract is the logging of data related to the work of the organization that is of interest to us. During the execution of the contract, the agent aggregates the readings of the sensors or other systems of the enterprise. When a contract termination condition occurs (order completion, work shift, etc.), the agent publishes in the IPFS network a unique imprint of the created data — a hash. The log hash is also its reference for downloading a file from the IPFS network. So by this link you can download only the original file and no other. When editing the information in the original result file, the edited information will form just a new file. The hash reference is transferred within the agent’s transaction to the executable contract for its completion.

What do we have, summarizing:

  1. There is a smart contract between the customer and the contractor in the public blockchain, it reflects their business process, or a special agreement about blockchainization of data,
  2. Using a hash reference from the final transaction in the contract, you can load a data file,
  3. Data file cannot be changed,
  4. Each message in the log has a digital signature and a public key source.

Example in details

Let us consider one executed contractual blockchain liability

At etherscan.io: 0xa96aB408cD9A3a7579c3755096b5A8f2Db4dd8ec. This is RobotLiability contract, created by Robonomics infrastructure according to the corresponding lots of supply and demand of a particular service. We have deployed an infrastructure from the liability “factory” in the mainnet: 0x44CFBcb1Ca0d3df0925dDA3354E955d38d78ad6B, which created liability contracts and “lighthouses” (for instance, https://etherscan.io/address/0x532975d56cf18f597480e2521246b273ad9ae348) — contracts that accept transactions for the creation and finalization of liabilities from registered providers. It is the providers that take the lots of the parties of the contract via the offline channel (IPFS) and, if the conditions proposed by the parties correlate, they send the transactions to the lighthouses to create the next liability. At this point, economic and technical information is combined, which is interesting in itself, because it provides traceability and transparency, which is significantly different from traditional means, which divide the exchange of technical specifications and the payment channel. Here in the history it remains obvious what task was done, under what conditions and with what result. In the fields of the contract you can see the hash of execution of the cyber-physical system’s behavioral model:

“Promisor” is the executor of this model:

It undertook fulfillment of this bid, the hash of which is also recorded in the contract:

with the specified conditions in the fields. Among them: “objective” — specification of the particular performance of the model with variable operating parameters; “cost” — cost; “token” — ERC20 token of payment for the work; “validator” — validator’s address in the Robonomics network, which checks the result and decides whether the conditions for the execution of the contract are met. And “result” — file with performance data, a hash-link, by which you can download a file from the IPFS network. In our case: for the blockchainization contract, this file contains signed sensor measurements. At the request of the customer, access to contract data is limited to its participants (access control is provided by traditional network tools and can be changed after the completion of the contract). Parties can download contract data from the IPFS network by hash links at any time. Details of the liability creation transaction can be viewed on etherchain: 0x764f51793510c592addd57219df806a61256986ce5471fa752dbaf2d72847fca.

Usecases

Both the participants of the supply chain and the final consumers of the product can trust the data with a secure digital signature and blockchainization. These data are entirely in a public environment, do not depend on the manufacturer or its partners, their authenticity is easy to check. This technology is there for honest companies to make their processes more transparent and open to partners and consumers.They aim at creating a new value from the data. Creating value added products or saving on reducing risks, losses and friction. There are also problems of trust in the data in ecology. You can get to know more about the projects of our research center in this line in Russia: the information is available in Russian in the company’s blog. Not so long ago, my colleague, engineer Vadim Manaenko wrote about a pilot blockchain project for the production of a pharmaceutical product. This is an interesting example of continuous audit for quality control.

I will describe a few more options for the use of these blockchain technologies in the field of the Internet of things. The possibilities of the described method, of course, are not limited to them.

Case 1. Products that can tell you their story

The same scenario that was described at the very beginning, but with blockchainization technology creates trust in the data, creates an honest product history, just as independent of the manufacturer after the release as the product itself. The pharmaceutical industry can show not only the conditions of production and delivery of the product. The manufacturer of the final product, as a consumer of raw materials, can use its history of origin to select the best suppliers. And it will be of interest to the end user. For my family, I would rather buy those medicines, in the authenticity of which I will be sure. Food, children’s products, any responsible production will be more valuable with the history of the product from the very early stages of redistribution.

Case 2. Continuous audit

Audit of compliance with production technology, suppliers of parts and contractors, compliance with safety and labor conditions, monitoring of equipment operation conditions — in the digital age, the necessary data is either already available in digital form or can be measured by sensors. Connect the blockchain application to the field equipment, SCADA, ERP, MES or other information systems (this can be done on the platform of Robonomics), make the data independent of the source and trustworthy due to the technology of their receipt, storage and transmission. You only have to add automatic data analysis so that continuous control appears over each process. Instead of a one-time audit procedure, software robots can monitor and audit continuously. They are not corrupt and the human factor is excluded. How much better will compliance with the Paris Agreements be if carbon unit emissions and compliance monitoring are automatically audited? You can read more about it in Anton Galenovich’s article Carbon Credits and Other Mitigation Instruments Verification on Public Blockchain and on the website of our partner, who made the platform for the integration of climate initiatives based on the Robonomics network https://ipci.io/.

Case 3. Integration of financial and technical data

Let’s not forget that the first use of the blockchain is bitcoin, a digital exchange unit, money. In Robonomics, a liability contract contains both hash references to technical data and contains information on the transfer of cryptocurrency between the parties, if there was any. Imagine a power supply system whose consumption and generation data is integrated into the network with payment data. As far as one could simplify and automate, for example, the introduction of different tariffs for energy consumption from traditional or reproducible sources, or the sale of power from solar-wind generators to households.

Case 4. Distinguishing between the like

Aluminum in Russia is produced by consumption of environmentally friendly hydroelectricity, while aluminum in China is produced by consumption of electricity from burning coal (as you know, aluminum production requires a lot of electricity)? Responsible automobile makers might have a greater interest in buying environmentally friendly raw materials, but how to distinguish between the same commodities? By distinguishing them by history, as described in option 1.

Maciej Kranz, vice president of strategic innovation at Cisco Systems, wrote on the new business models that open with the unification of the industrial Internet of things and blockchain technologies. Thoughts that the data is the new oil has been discussed for more than 10 years already. Blockchainization of the supply chain is being introduced in the food industry by such respected computer industry giants as IBM (Nestle, Dole Food, Tyson Foods, Kroger, Unilever and Walmart are already connected to the platform). But I agree with the opinion of the critics: the system does not create added value if the data are not in a public environment and remain under the control of a business partnership. Blockchainization in a private blockchain makes no more sense than collecting, storing and transferring data by traditional means. Unlike solutions on public platforms, the security of information in which is protected by large capitalization, as in Ethereum.

I think that on the Robonomics platform you can make excellent “processing plants” for data, and digital signature and blockchainization of production data and supply chain data are ways of turning raw materials into high-octane fuel.

At Airalab, we help solution developers, startups and corporate R&D to implement Proof-Of-Concept, design blockchain systems for the real sector using open source software, and do experimental and educational work. Send us an email to engineering@aira.life to order these services or learn about the use case of blockchain technologies for your business.

--

--