Shared secrets and secure message exchanges on blockchain networks.
The main reason why blockchains can help people take control of their data is that the contents of the information on the blockchain can be encrypted.
Bitcoin and most other cryptocurrencies have unencrypted blockchains, meaning that anyone can access the blockchains at any time and see all the information about all the transactions that the blockchains contain. However, even with cryptocurrency blockchains being public, on the Bitcoin network it is possible to leave encrypted messages in the comments.
With encrypted blockchains, it would be possible for individuals and organizations to store all kinds of information on blockchain, including identity verification documents, results of medical tests and medical history, academic and employment records and certificates, and more.
The difference between storing this information on a blockchain and storing it in a centralized way is that with centralized storage hackers can get access to it and typically once they do get access, they get access to all the records. With blockchain and encryption, it would only be possible to get access if someone has an encryption key from the party that owns the information.
At the systems level, such storage is extremely secure because it is simply impossible to hack the database as a whole. Each individual record would require individual hacking and because the records are independent, hacking one would not help with hacking others.
Later in this article, you will learn about how sharing works on the Neo blockchain and will encounter the term “shared secret” several times.
“Shared secret” is not just a combination of words. It is a very specific term that is a part of the science about secure messages called cryptography. In cryptography, a “shared secret” means information that is known only to certain parties. A shared secret is a part of secure communication, creation and implementation of which is one of the goals of cryptography. Typically, a shared secret is a password similar to a password that a person would use to access a secure website. On blockchain network, a shared secret can also be a numeric key that consists of a long string of numbers and letters. Parties can share a shared secret before exchanging the information, which is a scenario in which cryptography also describes a shared secret as a pre-shared secret or pre-shared key, and parties can also share a shared secret in the beginning of their communication by using a special protocol. Elliptic-curve Diffie Hellman is an example of such a protocol.
Example of sharing secure messages on the Neo blockchain
To share an encrypted message on a blockchain like Neo, a user needs to do four things. First, the user needs to create a secure password. Second, the user needs to share a secret with a friend.
Third, the user need to encrypt a message from the password in step one. During the fourth step, the user sends the message to the friend.
Whenever a user creates a new wallet on the Neo blockchain, the network creates four unique elements. These elements are a public key, a private key, a Neo address, and a WIF, which is another private attribute of a wallet on the Neo blockchain.
With a WIF or with a private key it is possible to create the remaining three elements, but it does not work the other way: having one or all of the three elements will not help to re-create a private key. It is simply not possible. This impossibility is one of the important properties of secure hashing algorithms and one of the reasons why blockchains are so secure.
Now let’s say that Anna wants to send John an encrypted message so that only John can have access to the message. The creation of a shared secret completes steps one and two out of four from the process described above. Then, Anna and John tell their public keys to each other. After this exchange, they can use a secure protocol such as Elliptic-curve Diffie Hellman, which is a protocol that allows exchanging messages in a secure way even on an unsecure network.