Discovering blockchain keys

Page 1

Iniciativa

Discovering Blockchain keys


Content prepared by Alejandro Alija, expert in Digital Transformation and Innovation. This study has been developed within the framework of the Aporta Initiative, developed by the Ministry of Energy, Tourism and the Digital Agenda, through Red.es, a Public Corporate Entity, and in collaboration with the Ministry of Finance and Civil Service. Contents and points of view expressed in this publication are the exclusive responsibility of its author. Aporta team does not guarantee the accuracy of the data included in the study. The use of this document implies the express and full acceptance of the general reuse conditions included in the following legal notice: http://datos.gob.es/es/aviso-legal.


Discovering Blockchain keys

There is a lot of confusion about the difference between Bitcoin and blockchain.

Why is Blockchain so important? Blockchain modifies the way people, companies or organizations carry out transactions. Transacting, negotiating or making deals are some of the most daily

Blockchain was the technological solution adopted to facilitate bitcoin payments (valid for almost any digital currency). It would be like distinguishing Internet for the millions of websites on the World Wide Web.

and ancient actions of humanity. Opening the door to carry out this activities in a radical different way deserves special attention. From a conceptual point of view, Blockchain is a technology that can - in certain applications or sectors - eliminate intermediaries, also called trusted third parties. For example, banks, governments, regulatory agen-

Internet is the technology that supports browsing through web pages and gives access to unimaginable possibilities such as email, bank payments or television on demand, among many other options.

cies, notaries, registrars, etc. In order to explain it through a practical example, we will focus on digital payments field. When Juan wants to send money to his brother Pedro, Juan makes a bank transfer through his bank website. This transfer is validated by Juan’s bank at the beginning, and subsequently validated again by Pedro’s bank. After this process, Juan’s money goes to Pedro’s account and is subtracted from Juan’s account. Blockchain opens the door to transactions between Juan and Pedro without the need for bank’s validation (even without the need for a bank). The transaction is conducted only between Juan and Pedro (through the internet) and the participants in the blockchain network are responsible for validating the transaction. Nowadays, this transaction can just be done using cryptocurrencies such as bitcoin.


Discovering Blockchain keys

What is this important problem that Blockchain solves? Actually, blockchain is not a new technology but the intelligent combination of a group of wellestablished technologies that had not been combined into a single technological solution until now. This well-established technologies set is what defines a large part of the characteristics that make blockchain unique. Blockchain came to solve a classic problem of digital assets (things) transactions. This problem is commonly known as the problem of double spending.

We will try to explain this problem through the following example: Suppose we are sitting on a park bench. I own an apple and I give it to you. Now you have an apple and I do not have any one.

Let’s analyze what happened: I gave you directly the apple, so you could see how it was executed the action because we were both physically in the same place. There was no need for a third person of confidence in that place and time to help us to conduct the transaction or to act as a trusted third party ( judge, notary, etc.) to confirm the transfer. I cannot do anything else with that apple because it is no longer in my power. Now the apple belongs to you and you can give it to someone else or eat it. This is how the exchange of physical things between people works. Even in this case, when people exchange goods, there could be a notary (a third person, a trusted authority) that certify that transactions has been carried out according to the people involved. However, let’s suppose now that our apple is a digital apple (zeros and ones that represent an apple). I have my digital apple file and I’ll send it to you. Here the situation starts to get interesting. How can you be certain that the digital apple that I have sent you is really my digital apple? How can you know that I have not sent it to someone else? How can you be sure that I have not made a million copies of my digital apple before sending it to you and I still own it? The exchange of digital information involves more challenges than physical transactions. In the real world, transactions are recorded in a transaction book or ledger. That ledger is usually supervised by a single person or authority. When that book is digital and a single person or organization manage his/her information, there are obvious problems of manipulation, falsification or creation of unauthorized replicas.


Discovering Blockchain keys

But how does Blockchain really works? What is the blockchain? Is it really a chain?  

The solution proposed by Blockchain to these challenges is simple (the following explanation is a simplification with the aim of avoiding excessive technicalities). It is called blockchain because the system works in a way that transactions between participants (pairs) of the network are grouped (and ordered) in blocks. The information included in those blocks is validated (bitcoin mining process) and finally, these blocks are joined to the chain. Each block contains its own fingerprint and the fingerprint of the previous block. These fingerprints are like a unique digital key and lock set. Each key is unique in the world and only opens a single digital lock. The chain is composed following this method. The links of the chain are the blocks and their point of union are the fingerprints. Each of the network participants has their own copy of this chain. All copies are synchronized with each other, so any change in an individual copy spread across the rest of copies. Making a modification in the chain of blocks is like trying to solve the Rubick’s cube. Suppose that each copy of the chain is one side of the cube. If the cube is solved, each participant has the same color on his face. If a participant tries to modify some line on his face (he or she tries to modify the transactions in his copy of the chain), it would automatically be detected by the rest of participants, because their faces would also be affected.


Discovering Blockchain keys

Have this topyc hooked you? Do you dare with one more level in the blockchain? But, in order to really understand how blockchain is build, we need to previously understand some concepts. Through this example we will see:

1. Hash or transaction fingerprint 2.

How a block is built

3. How a block is attached to the chain


Discovering Blockchain keys

1. The Hash is the unique fingerprint of our transaction. By transaction we can understand any digital thing we want to join the blockschain. It can be a money transfer, a photograph or the chapter of a book that we have written. The magic of the Hash is that, regardless of the type of information that we want to send (or transact), no matter the length and type of that information, the hash is a unique Brand, always with the same structure that can be searched, compare and contrast at any time. If I want to obtain the hash corresponding to my name - Alejandro - the algorithm responsible for generating the hash (usually SHA256, although there are others) is responsible for generating the unique footprint of my name: 30CC1CB006F560BE31DE08160F80EFE06635BD3EFB8CB8745CF74D6CA8F6D921 In the same way, if I want to generate the hash of my entire doctoral thesis (200 pages), the algorithm will be responsible for generating a single hash with exactly the same length as the previous one,

that only encodes my 9-letter name. Hash algorithms are very interesting for several reasons: // By only modifying a single letter of my name, for example, instead of Alejandro, I write Alejandra, but the hash radically changes as if I had completely modified my name. We see the difference: Alejandro 30CC1CB006F560BE31DE08160F80EFE06635BD3EFB8CB8745CF74D6CA8F6D921 Alejandra B 6 B D D E 0 3 5 6 D B E 1F4104A8530A54E4C3F35BDFD9C0FCC2D09167E033FE95D7774 // In addition, the main characteristic of the hash is what is known as “collision resistance�. It is the hash capacity so that no one can find two different entries that generate an identical hash. For this reason, the hash is a tool to check the authenticity of things.


Discovering Blockchain keys

2. Block building. A block is the minimum set of information that is part of the chain. That is, a block can contain a set of transactions. These blocks are added to the chain that, ultimately, constitutes that transaction book - we have already spoken about it-.

Creation of Bitcoin blocks Now, we have to look for a competitive way to validate a transaction and confirm that a block contains correct information. Here comes into play the famous mining process. Actually the mining process is a mathematical calculation (performed by a computer) by which, with the block data (previous block identifier and transactions data), we search a random number (nonce) that together with the previous data, generates a hash that is less than a given value. This value defines the difficulty of the system. The greater the difficulty (and the computing capacity), the longer it takes to find that nonce number that gives the solution to the problem. To guarantee and incentivize the operation of the network, the first one who finds that random number is rewarded with a number of bitcoins.


Discovering Blockchain keys

3. Chain of blocks. Once the block is validated after this process, it is sent to the rest of the participants for their own validation. Once this is done, the block is added to the chain, providing the valid hash for this block (its identifier) that will be used in the next mining to validate the next block and so on. This is where the quasi-inviolability (immutability) of the chain comes in. Due to the blocks are linked through the hashes, any minimum change in the block contents changes the hash of that block and, subsequently, the hash of the next block. In the case

that an attacker wants to modify the transactions in any block of the chain, he would have to look for that random number from before (nonce) for all the blocks after the current block in the chain. In addition, each participant in the network has its own identical copy of the chain. So, in case an individual chain mutates due to a manipulation, that manipulation would be invalidated, since all the other copies of the chain would be different from the mutated chain. As in the faces of Rubik’s cube. Because the mining process (bitcoin only) consumes a lot of computational resources of a computer, it is not possible, in practice, to rename a large number of blocks in a chain


Discovering Blockchain keys

Do we see a practical example of how to use blockchain in a daily application? The following use case is framed within a group of applications in which Blockchain technology is used with the aim of making a(n) (existing) process faster, more efficient, with lower cost and, above all, guaranteeing confidence in the process . Go for it! This example is completely fictitious for the only purpose of illustrating a potential application of Blockchain in everyday life.

Suppose we bought a high-speed train ticket to attend a meeting from Madrid to Barcelona in the early morning. The train company (the service provider) ensures that in case of more than 20 minutes delays, 75% of the cost of the ticket will be refunded. Nowadays, in a process of this type, we have to trust that the service provider reliably records the arrival time of the train at the destination station and checks whether the delay is greater than 20 minutes. We must trust that the clock of the person / system that control the train arrival is perfectly synchronized and on time. We, as passengers, will never have access to that timestamp in the company systems, so we have to assume that the company is reliable and, even if there has been a delay of just a few seconds, they will return the money of the ticket. We can never check this data and if we have suspicions, we can start a tedious claim process that we will probably give up sooner or later, as it will consume more energy and time than we consider

appropriate to claim 75% of a train ticket. I am sure that this situation will sound familiar to most of us. Well, this same process, modeled using blockchain technology, would be described as: In case of having purchased our ticket using a train company app, we will obtain a digital ticket with all the necessary characteristics: date of purchase, price, departure, destination, name of the buyer, unique identifier of the ticket, conditions of purchase (tourist, business, etc.). This ticket purchase information would be a transaction placed in a block with the rest of the ticket information of the rest of the network participants. At the time of boarding, that ticket would be validated and that transaction would also be included into the blockchain, in its corresponding block. At the time of train departure, a system would be responsible


Discovering Blockchain keys

for recording the exact moment of departure, which, in turn, would be a new transaction entered into the blockchain. We remember that, as participants of an open network, we can all have access to that unique transaction that represents the train departure. We all have our own copy of this transaction - travelers and train company-. In case someone tries to modify the departure time, it would be immediately detected because the hash of the transaction departure time would be different and invalid compared to the rest of the chain copies. Once arrived at destination, the same system that in origin would be in charge of recording the exact time of arrival and including it as a new transaction in the network. Now comes the interesting part, in case of a delay

that exceeds the threshold of 20 minutes, a computer program (smart contract), which is part of the blockchain, would be scheduled to compare arrival time and departure time, and determine the delay time, if there any. In case of delay up to 20 minutes, the computer program would record a transaction in the public network accessible by all parties. We, as travelers, will consult delay transaction in our app.


Discovering Blockchain keys

In addition, directly through the app, we could ask to refund 75% of the ticket. Due to the app is linked to the blockchain, our refund request would be, again, a transaction registered in the blockchain, and another computer program would check it to make the payment. If you have followed this example without difficulty, you will have seen that this claim process using blockchain technology is: // More transparent for everyone (travellers, transport company, insurers, etc.), because all transactions are always available. // More efficient because there is no human intervention, claim forms, emails, etc. The return is automatically. // Safer, because the probability of fraud is very low. // Brings more confidence to the customers of the train company. // Faster, because all the systems involved (user app, ticket purchase systems, exit registration system and train arrival) are synchronized in the blockchain.


Discovering Blockchain keys

Despite these benefits, blockchain is still an incipient technology in the market and few companies or organizations have implemented real initiatives. Currently, companies are in a phase of “pilots�, easy to scale and implement in different areas. One of the reasons for this situation is that there are still a number of challenges to be solved, some of which are summarized below:

Lack of qualified talent, so it is necessary to invest in training and development of new skills.

Need to improve citizens’ electronic security practices, promoting the proper management of codes.

Need to adapt current structures.

Need to Improve the ability to adapt to regulatory changes, both current and future, necessary to support this technology

Resistance to change of the different profiles involved, so it is important to implement transparency and open communication policies.

Despite these challenges, experts believe that the aforementioned multiple advantages of transparency, efficiency and security will outweigh these challenges, and will boost investment. Therefore, the global blockchain market is expected to increase from 0.297 billion dollars in 2017 to 4.401 billion in 2022, which represents a CAGR (2017-2022) of 71.46%.


Discovering Blockchain keys

Iniciativa


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.