Что такое блокчейн простыми словами

What is blockchain? How does blockchain work? We will give a easy explanation

Now there is a lot of information on the topic of blockchain, cryptocurrencies, NFT, ICO, smart contracts, etc. Many still have questions about what a blockchain is. Let us try to explain effortlessly what a blockchain is.

The blockchain is based on three basic concepts:

1. p2p (peer—to—peer) is a peer-to-peer, decentralized network based on the equality of participants.

Each computer connected to the network simultaneously performs the functions of both the server and the client, that is, each computer stores information and sends it to another computer (client) at its request. Computers “communicate” with each other, transmit information to each other without a central element.

Что такое блокчейн простыми словами

There is also a multi-rank, centralized network in which a central server stores information and other computers access this server for information.

Что такое блокчейн простыми словами

The p2p network is most often used in the blockchain, that is, all information is stored at once by all network participants, hence the name — decentralized. Such a network organization allows you to maintain operability with any number and combination of nodes, even if some of them are disconnected.

The security of the network is due to the fact that everyone has information stored at the same time, and if someone wants to replace the information, everyone will understand and will not accept this change. There are decentralized blockchain systems – Bitcoin, Ethereum, Litecoin and others.

Unlike a centralized storage system, for example, a bank (central server) stores information about how much money each client has in the account, the rest do not have such information. There are centralized blockchain systems – UST, DAI and others.

  1. Hash (cryptographic hashing)

Cryptography is the science of methods for ensuring confidentiality (the impossibility of reading information to outsiders), data integrity (the impossibility of imperceptibly changing information), authentication (verifying the authenticity of authorship or other properties of an object), encryption (data encoding).

Symmetric encryption – one key is used

Throughout history, mankind has had a problem passing secret information to each other so that it would not be known to third parties.

Initially, symmetric cryptography (encryption) was invented – an encryption method in which the same cryptographic key is used for encryption and decryption (the same secret of how to decrypt a message).

For example, the letters in the message text were rearranged in a certain order. The recipient of the information was informed in advance of the key, how to decrypt the message – the letters need to be written to a table and read the columns, or all the letters have been moved to a certain value in the alphabet (Caesar cipher), etc.

Text – Brutus

Key – all letters are rearranged by 3

Code — FUXWXV

Symmetric encryption, because the recipient and sender must have one secret key, which they must exchange in advance in order to decrypt the message.

Then the telegraph began to develop (optical, electric, photo telegraph, wireless telegraph, Bordeaux apparatus, telex, etc.), information began to be transmitted through open communication channels.

It became necessary, especially for the military, to invent more reliable means of encryption. In 1946, the English mathematician and cryptographer Alan Turing proposed a computational “Turing Machine”, which is a computer model that formed the concept of an algorithm.

During the Second World War, Alan Turing was engaged in cracking the ciphers of the German cipher (see the film “The Imitation Game”). In 1948, the American mathematician and cryptographer Claude Chenon proposed to use the word “bit” to denote the smallest unit of information.

Claude Shannon has formed two basic properties of a good cipher:

  • diffusion — if a single bit in the source text is changed, several or all bits in the ciphertext will also be changed
  • confusion – if a single bit in the key is changed, several or all bits in the ciphertext will also be changed.

That is, with a good cipher, it is almost impossible to calculate the pattern of the cipher in order to understand the source text. Everything depends on each other, with any change of either the key, or the source text, or the cipher, all the data changes immensely.

Hash function ( “turn into mincemeat”) is a function that converts any source data (of any length) into an output bit string of a set length. The transformation produced by the hash function is called hashing. The source data is called a message. The result of the conversion is called a “hash”. Hashing formulas can be different.

For example, when you enter a password on a site, the site itself receives not the password, but its hash. It is extremely difficult to convert a password back through a hash.

You can try to hash any Hash function data — Online Hash Generators- (convertstring.com ), and then try to decrypt them back.

After the advent of the Internet, electronic keys, there was a problem of how to transfer the secret key.

  1. Electronic digital signature (EDS)

Asymmetric encryption – two keys are used

Cryptographers Whitfield Diffie and Martin Hellman proposed a cryptographic protocol that allows two or more parties to obtain a shared secret key using an unsecured communication channel.

The famous example of cryptography is Alice and Bob sending each other information.

Что такое блокчейн простыми словами

Alice tells Bob by an open connection the numbers p (for example, 23) and g (there will be 5, the transformed root modulo p), which can be known to everyone.

Generation of secret and public keys

Alice invents for herself (generates randomly) the number a (for example 6), this number will be her secret key a, known only to her.

Alice calculates her public key A (it turns out 8) using the formula:

A = ga mod p

56 mod 23 = 8

15 625 = 23 х 679 + 8

8 is the remainder of dividing 5^6 by 23. In other words, “if 5^6 is divided by 23, you get 679 and the remainder is 8” is written with the notation “5^6 mod 23 = 8”. The value of 8 is calculated by the computer.

Bob does the same. He randomly generates a secret key b (for example, 15). And by the same formula calculates its public key B (it turns out 19).

B = gb mod p

515 mod 23 = 19

30 517 578 125 mod 23 = 19

30 517 578 125 = 23 x 30 517 578 106 + 19

Public Key Exchange

Alice communicates her public key A (8) to Bob via a public communication channel.

Bob communicates his public key in (19) to Alice – via a public communication channel.

Calculate the shared secret key K:

K = Ba mod p

К = Аb mod p

Alice calculates: K = 19^6 mod 23 = 2 or 47 045 881 = 2,045 473 x 23 + 2

Bob calculates: K = 8^15 mod 23 = 2 or 35 184 372 088 832 = 1 529 755 308 210 x 23 + 2

The shared secret key K = 2 is calculated by the computer.

The complexity of reverse calculations

Knowing a and b (secret keys), it is easy for a computer to calculate A and B (public keys). On the contrary, knowing A and B (public keys), it is tremendously difficult, almost impossible, for a computer to calculate a and b (secret keys). It is believed that such reverse calculations can be carried out by a quantum computer, which is still a hypothetical device.

If Alice wants to get something from Bob, she sends him her public key (A), Bob encrypts the information with her public key. Alice receives the encrypted information and decrypts it with her secret key.

How to sign with an electronic digital signature?

Alice takes any file, converts it to a hash, then encrypts it with her secret key. She sends this encrypted hash and her public key to Bob. Bob decrypts the file with Alice’s public key and gets its hash. Bob creates a hash of the same document himself, compares them, and if they are the same, then Bob is sure that he and Alice have the same file

This is an electronic digital signature. Everyone has a pair of keys: secret and public.

How does the blockchain payment system work?

Blockchain is a continuous sequential chain of blocks containing information built according to certain rules.

Bitcoin is a peer-to-peer (p2p) payment system using the unit of the same name to account for transactions. Transactions in this payment system are recorded in conventional units, which are also called bitcoin (bitcoin is just a number).

There are computers in a decentralized network, everyone has a public and secret key.

The public key is actually the user’s address (as a bank account number) and information about available assets (bitcoins) can be stored at this address. Everyone knows the public key, and everyone knows how many assets someone has at this address.

Network users can make transfers (transactions) to each other, write off assets from their address and transfer to another. The user signs the transaction information with their EDS, so all network participants are sure that it is the user themselves who makes this transaction.

The user sends information about the transaction to any computer on the network, information is distributed over the network. The network has a transaction pool (like a bulletin board), where users send information about transactions being made. The transaction message must contain a number of specific parameters, as well as the amount of the commission for processing this transaction.

There are specialized participants in the network – miners who have computers with high power. Miners create blocks.

Each network has its own protocol (instruction, specification) of which the block should consist. Each block is assigned a hash name. The blocks contain information about transactions, rechecked by manners, and the hash of the previous block.

When a block is created, it is sent to the network, each block follows each other, along the chain. All participants of the network have a new block, from where they receive information about the transactions carried out, and update the data at home. The bitcoin algorithm is built in such a way that a new block appears every 10 minutes so that it has time to spread across the network and everyone has the same information.

The figure shows a simplified composition of the block, the block also includes the time of inclusion of the block in the blockchain and nonce – proof of computational work (searching for a hash starting with zeros) carried out in order for the block to be included in the blockchain.

What is the complexity of mining ( hashing)?

According to the Bitcoin protocol, all block hashes must start with zeros. In the Bitcoin blockchain, miners try to find the required hash amount by hashing random numbers. The search process is like a lottery. When they find a solution to a certain mathematical problem – they find a number whose hash starts with a certain number of zeros (and thereby create a new block), miners receive new bitcoins as a reward for the newly created block.

The required number of zeros at the beginning of the hash is changed by the bitcoin algorithm. If there are a lot of miners in the network, then the number of zeros is added so that the block still appears every 10 minutes.

The reward for creating a block is regulated automatically, so that, ideally, for every four years of the network’s operation, half of the bitcoins created over the previous four years are created. During the first 4 years (from January 2009 to November 2012), (approximately) 10,499,889.80231183 bitcoins were created.

Every four years this amount will be divided in two, it will be equal to 5,250,000 for the next four years, then 2,625,000 and so on and so forth. Thus, the total number of bitcoins will never exceed 20,999,839.77085749.

This is how a peer-to-peer payment system works: all network participants have the same information, constantly exchange it, and send transaction data to the network. Miners collect information about transactions in blocks that form a chain in the network. All of these chains are interconnected.

Leave a comment:

Top
APEXCOM
Legal Information
Apexcom Ltd.
Primary State Registration Number (OGRN) 1217700163746
Taxpayer Identification Number (INN) 7726475790
Tax Registration Reason Code (KPP) 772601001
Contacts

+7 (495) 225-81-62
info@apexcom.net

Address: 117105, Moscow, Novodanilovskaya Embankment 6, building 1, 10th floor

© 2021. All rights reserved. APEXCOM® Powered by Digital Agency GOadvance