Secure Document Transfer Built on Top of Blockchain Technologies

Secure Document Transfer Built on Top of Blockchain Technologies

Since the emergence of Bitcoin in 2008, cryptocurrency and one of its underlying technologies, the blockchain, have already become buzzwords in the world of finance.

If you look into the short history of cryptocurrency, starting from the year when Bitcoin was introduced, it took less than 10 years for this technology to integrate deeply into the financial industry.

Today, we already have hundreds of alternative coins and cryptocurrencies available. Those who advocate for this technology believe that it can change the global landscape just as Internet did a few decades ago. And it looks like major opportunities are yet to come.

The potential of blockchain technologies: finance and beyond

As 2016 started, one of the world’s leaders in news and information on digital currencies, CoinDesk, has shared an article featuring Deloitte’s predictions on how the digital currency and the blockchain industry may evolve within the following year.

The prediction was based on a survey handled by Deloitte within its internal cryptocurrency community, addressing the question of “What do you think will be the biggest breakthrough in the blockchain space in 2016?”

The below graph displays the high-level results of the survey:

According to the survey results, the respondents believe that in 2016 the blockchain trend is likely to accelerate, resulting in new promising partnerships and high-tech product launches that would bring in major investments.

And it looks like the prediction has already started becoming a reality. According to, Microsoft has recently announced its collaboration with Bank of America, with the aim to “fuel transformation of trade finance transacting, with blockchain technology”.

The other important outcome of the Deloitte’s survey regards the emerging new use cases of the blockchain and the decentralized approach itself, as this technology seems to have a lot of potential to reach beyond the financials, spreading into real estate, commodities, retail, digital media etc.

This is just a short list of domains where a lot of experimentation with blockchain has started recently. And we at ELEKS also joined the trend with the number of experiments, building our own custom applications on top of the blockchain technologies. Below are the stories of two such experiments.

“The richest wallet”: our first experiment with blockchain

Our experiments with this technology started in 2015 with the attempts to parse the Bitcoin blockchain, looking for the richest bitcoin address or the so-called “wallet”.

Technically, a wallet is an address key that contains private keys for certain Bitcoin addresses, which belong to the user that owns the balance. At that time, the difficulty in reaching the project’s goal was that we had to download large volumes of data and store them locally.

That data had to be parsed and all information about the user balance had to be stored in memory, so we could process and analyze it. As a result of our first experiment with blockchain, we managed to build several graphs.

The below graph represents the total number of transactions taking place over the last 5 years.

Having analyzed this data, we organized it in regard to the transactions split by days over the period of the last 180 days. Here is the result.

After we had all the data organized in this way, we managed to define top addresses, in other words – the wallets with the highest balance.

With the help of this experiment, we mainly aimed to explore the Bitcoin blockchain. To get more hands-on experience with this technology, we created our own Bitcoin blockchain parser with the help of the .Net Framework.

As soon as we learned how the blockchain works and how it is organized from the inside, as a next step, we decided to build our own custom software on top of the blockchain.

We are passionate about new technologies and exploring their potential value for our customers’ businesses. As blockchain is an extremely popular and promising trend now and it spreads quickly across industries, we tested this technology to be able to quickly implement our customers’ ideas through R&D experiments and PoCs created on top of the blockchain infrastructure.

Tapping into the capability of smart contracts

While we started experimenting with blockchain technologies, we learned that the decentralized approach actually allows one to organize secure transfer for various types of data and its potential is not limited to financial transactions. And, with the introduction of the smart contracts, this capability has been extended significantly.

Smart contracts are self-automated computer programs that can self-execute and self-enforce using some pre-programmed conditions and run without any possibility of downtime, censorship, fraud or third-party interference.

Designed to be very similar to their paper equivalents, smart contracts can carry out the terms of any kind of agreement. They feature the two parties involved (the sender and the receiver), include the reference to the document that is being transferred as well as the other attributes, such as timestamp, block-address, self-address etc.

The key aim of this technology was to streamline financial transactions, allowing for business operations to be done by two anonymous parties through the Internet with no middleman required.

However, smart contracts are not limited to finance. As this technology matures, it allows for storing and transferring the assets referring to the legal sphere, real estate, intellectual property and more.

Inspired by this broad tech potential, we decided to create a custom system for smart document management on top of blockchain, allowing one to securely store and transfer various kinds of assets.

Developing a system for secure document transfer powered by Ethereum

We decided to build our system with the help of Ethereum, a decentralized platform that runs smart contracts.

One of the reasons we opted for Ethereum is because it supports a wide range of possibilities for smart contract development. This platform also provides an advanced programming language with a large variety of data types, functions and so on.

Another benefit of Ethereum is that this network is live; it already works. All these things together made Ethereum an optimal choice for us to experiment with blockchain.

The aim behind this experiment was to provide secure storage and transfer for various kinds of financial, legal or any other types of documents, such as agreements, ownership clauses, private photos and more.

In other words, we wanted to create an environment where legal transactions can be processed safely and with no third-party intermediary required. In daily life, when people conclude legal agreements, the process requires involvement of a notary whose job is to verify the agreement, sign it and register in his/her journal.

While, in the blockchain world, you do not need to pay for notary services, which usually cost a great deal of money. Thanks to cryptography, all the signatures can be secured while blockchain can do the verification and maintenance of the registry journal.

The solution we were creating included two key units: document storage and a smart contracts journal.


We wanted the storage to contain all the documents, providing public access for verification and private restricted access for reading, and therefore we chose Github for this purpose.

Having the files located in public GitHub, we made them visible to everyone, but still they were secured with encryption. Combining public storage and cryptographically-secured access, we made it possible for anyone to access the file; however, without an encryption key, this file was only a plain set of bytes.

The encryption keys were sent through the Ethereum blockchain with the help of smart contracts. These contracts contained the sender’s and receiver’s addresses, a key, as well as a link to the publicly-stored document. The contract rules were preprogrammed in a way that only the receiver could obtain a key.

We used the smart contracts journal to contain all the transactions as well as their attributes. The journal also provided an interface for private access.

We decided to add the option of changes tracking as well. Therefore, the sender and receiver could change the existing documents and all the updates could be tracked via blockchain. This way, everybody would see that there were some changes implemented, but again, no one would be able to check what was changed without an encryption key.

The blockchain network that we created contained a number of nodes: mining nodes and client nodes. Mining nodes contain a full version of the blockchain and perform the “proof-of-work” consensus algorithm to mine new blocks.

Client nodes also contain a full blockchain and do not do any work except for providing a blockchain interface to enable smart contracts creation and calls. In our case, we decided to keep the blockchain in the client nodes, so we could easily switch the node types, but it is still possible for the client node to keep only parts of the blockchain.

The mining nodes are hosted on Azure as a virtual machine with an Ubuntu operating system. Client nodes are hosted locally (as Geth – a command line interface for Entereum blockchain) together with the user interface written on .Net WPF. The client WPF application includes all the logics required to work with with GitHub as a document storage and Geth as a blockchain interface. And the reason why we opted for WPF is that the WPF application’s interface is far more user friendly, compared to a “black command line”. The WPF application also provides the logic for account creation and the wallets are stored in local Geth node.

The below scheme shows our network in detail.

The network nodes worked in a permanent operating mode to keep the blockchain up and running. We tested our network locally to see how the files are transferred, and the process looked quite smooth and reliable. So, we decided on a number of enhancements to be added to the basic features of our network.

Further improvements: our next steps with Ethereum blockchain

To improve the overall security of the transfer process, we decided to create some alternative document management system: a more secure one that would allow for creating backups and would be compatible with the existing legal compliances and regulations.

We also wanted this system to be available both through web access and on a mobile device. The next security improvement related to the account features was to implement a password recovery option, allowing one to restore passwords with the help of the user’s personal data.

As for the private key, we wanted to have it stored in a local registry or split it into multiple files. In both cases, the new features would be accessible and could be used as a service.

To allow for comprehensive network analysis, we created the concept of a tool that could monitor and display network performance and gather statistics. This tool would provide an interface for network search, covering blocks, addresses, transactions. It would also visualize all these transactions in a clear and transparent way.

To improve the user experience provided by our network, we developed a custom monetization and payments approach, defining the way the client nodes pay for transactions as well as the benefits that the mining nodes receive. Thanks to the custom document storage and “wallet and account” services described above, the shared economy of blockchain can be easily maintained.

The future of blockchain for business

For businesses, blockchain and smart contracts open a variety of new opportunities. Among all the crowdsourcing approaches, blockchain is, most likely, the best one.

It can still be considered a bit futuristic; however, it proves to be working the same way as the self-driven Uber taxi service. Imagine a safe and transparent system, accepted at the governmental level, allowing one to track and conduct legal operations with any kind of valuable assets: cars, houses, stocks and more.

Or, a comprehensive solution for investment management, where people can receive shares and payments from public companies they invested in. Indeed, the possibilities of the blockchain are broad and they keep expanding as this technology matures. Expect some new advanced use cases in the near future.

Source: ELEKS

    Popular posts

    Related posts