Those who developed this system made sure to cover all these aspects. To do this, they were based on four fundamental pillars: immutability, consensus, cryptography and decentralization.
We are going to see each of them in detail and how they respond to these concerns.
Let's start with immutability. As its word itself describes, immutability is something that cannot be modified. And that rule is followed to the letter, transactions and records cannot be modified. This is possible because every time a transaction is made, a hash is generated. A hash is the result of a function responsible for solving complex mathematical problems.
We can understand it better if we think of it as a grater, which the Spanish translation is to chop, to grate. If we grate a cheese we obtain the same cheese but in such a way that we could not put it together again. We couldn't decrypt it because there was a process that returned the data to us as a limited string of characters. That is to say, we can grate a pinch or a kilo of cheese that will somehow give us back pieces of it always with the same length.
And how is this related to immutability? Well, we will not be able to modify the data entered from the hash as it would be impossible for us to put the cheese back together as it was previously. It is a one-way process. It also allows blocks to be chained, since each block includes the hash of the previous block in its header.
One of the characteristics of web3 is democracy. And when we talk about democracy, we talk about the majority vote. Bringing this concept to the blockchain system, a majority of nodes must agree to the transactions before adding it to the blockchain. This is of utmost importance since this requirement ensures that no illegitimate transaction is accepted. It gives us confidence that if it has been attached to a blockchain it is because it is secure, there was a prior consensus to accept it.
Even more certain is that they are not approved by people if they are not the results of mathematical operations carried out on different machines. This procedure is known as POW (Proof of Work). Once the legitimization of the transaction is approved, it is registered and publicly known.
Cryptography derives from the Greek kryptós (secret) and graphé (writing). We can then understand it as a way to hide a message so that only people who understand the code can access it.
Since the earliest times of humanity, we have looked for ways to secretly send messages to each other. From childhood code games, Morse code to the Enigma code used in World War II.
Taking this concept to the blockchain, we must know that the data is stored under codes, and only those parties that have access can read it.
To encrypt and decrypt information we use keys. If we use the same key for this encryption and decryption process, we then speak of symmetric cryptography. If, on the other hand, we use one key to create the cryptography and another key to decrypt it, we are dealing with asymmetric cryptography.
Of course, let's not forget about our already-named hash. Have you noticed that it is also a secret code that contains a message? It is unidirectional.
All of these features are achieved thanks to the decentralized aspect of web3. Our data is spread across multiple nodes, not just in one place. The information is fragmented and stored throughout the network, in its nodes, in blocks related to each other. Unlike web2 they are saved on a central server. If that server goes down, our information is lost. It has happened with some social networks when the server went down.
So let's go back to our initial questions:
Where is my data saved? Throughout the network like blockchains.
Can they be lost or stolen? Once entered, the information cannot be deleted. Information can be added by creating another block with its identifier. That's why we say it's unidirectional.
How is it that it is public? Since there is no intermediary, the transactions are public knowledge, but only the parties know the information since it is encrypted.
In conclusion, to access our data, many barriers must be crossed. The control is very strong and detectable. We are aware of where our data is and are aware of the process. We are participants. At the same time, only the parties can decipher the message.
Awesome