1.5. A New Concept in Blockchains! Adding Data to the Blockchain
Generally used areas in today's blockchains are crypto assets. But limiting it only in this area does not reflect the true power of blockchains. The platform-independent presence of the user in blockchains is one of the most important components of this technology. Figure 1.8 describes the data processing and authorization control flow diagram in Piri Blockchain.
As seen in Figure 1.7, there are 2 different encryption options.
Figure 1.7: Diagram of private data storage and encryption
The first level (enc=1) is only encryption of data. In other words, it is the encryption of only the value field from the Key-Value pair. The second level is the encryption of both the "Key" and the "Value". The user can decide for himself/herself which level to encrypt.
Another situation is that the opposite address (Receipt Address) is a commercial wallet, in which case the public key of the commercial address is stored in Pirichain. Thus, when the data is desired to be decoded, this information can be easily retrieved by the system. It is not possible for 7 private wallets to generate a shared key with a receipt address. They can only add data to the block network by encrypting it with their private key. Therefore, data encrypted by private wallets can only be decrypted by that wallet. In commercial wallets, the shared key created by ECDSA Diffe Helman is used. Since this shared key creates the same value on both its side and the other side, the data can be decrypted on both sides. Detailed explanation for data analysis processes in the system is shown in Figure 1.8.
Figure 1.8: Data analysis operations
As seen in Figure 1.8, SHARED_KEY, which is determined as the public key in the analysis operations, is subjected to AES while generating. If there is a problem in the creation, decryption is tried over AES with the user's private key.