Understanding of Blockchain Technology for Judicial Review
By ANGUK LAW OFFICES (email@example.com)
*This is an adapted and abridged excerpt from some part of the constitutional appeal statement by Anguk Law Offices to the Constitutional Court of Republic of Korea as to the actions of Korean Financial Supervisory Board to cryptocurrency transactions.
“It is necessary to look into the gist of technological understanding of cryptocurrency to set out for a fair legal review, away from accrued unjust prejudices concerning cryptocurrency.
In that respect, core technological explanations are presented ? though they lie in the field of engineering ? as follows, to the extent that they facilitate the grasp of the true nature of cryptocurrency in terms of property rights and freedom of enterprise.”
Chapter 1 Key Points of Cryptography Technology
1. Private Key / Public Key Pair Technology
If participants in a ‘transaction network’ make deals with one another, their communications of those value exchanges can constitute events of state of changes occurring in unpredictable ways.
It is of significance to prevent information threads at the creation from counterfeiting. One of the robust tools that can settle the problem is private key / public key pair technology using RSA Algorithm below.
1.1. RSA Algorithm
A classic example of private key / public key pair technology is RSA Algorithm named after its developers Ron Rivest, Adi Shamir, and Leonard Adleman. Although Bitcoin and Ethereum implemented other algorithms such as ECDSA(Elliptic Curve Digital Signature Algorithm) as their digital signature algorithms, it is still useful to see how RSA Algorithm works because of similarity in principles.
Given the equations below, C is a ciphertext, P is a plain text, and (E, D, N) is a set of numbers. A plain text is encrypted to a ciphertext through the equation i), whereas a ciphertext is decoded to a plain text through the equation ii).
i) C = (P^E) mod N
ii) P = (C^D) mod N
According to discrete mathematics, unless new technology emerges which enables swift prime factorization of a giant number N such as practical use of quantum computer or proving of Riemann Hypothesis, it turned out to be virtually impossible for us to distract D even if we have E and N.
1.2. Application ? Encrypted Communication
Encrypted communications that permit no eavesdropping is possible by deploying the algorithm above. If A wants to communicate with B free of wiretapping, A picks up a set of (E, D, N) numbers. Then, A lets B send her a message by using public key (E, N). As in the equation i) above, B can transform a plain text into a ciphertext with the public key given. In turn, A decodes the ciphertext received into the original plain text by using private key (D, N) in her possession as in the equation ii) above. Public key is made ‘public’ because A sends it to B, but private key remains ‘private’ because A keeps it to herself. So, no one can tap their communication along the way.
1.3. Application : ‘Transaction Authentication’
Private key / public key pair technology is applied to document authentication called ‘digital signature’. In this case, private key is used to make a ciphertext. Public key, on the other hand, is employed to reveal a plain text. Thus, if the recipient can obtain a plain text using the public key given by decoding the ciphertext made by the sender using the private key, it certifies that the sender has done ‘digital signature’ through encryption by the private key, which leads to document authentication. In ‘transaction network’, a private key / public key pair is allocated to a set of two participants for transaction. A public key holder, who knows the counterpart’s address or ID assigned by the public key, can check with the public key given whether decoding works. If she acquires a plain text by inputting the public key, then ‘transaction authentication’ has been accomplished.
2. SHA 256 Hash Function
2.1. What is SHA 256 Hash Function?
SHA 256 Hash Function (Secure Hash Algorithm ? 256) is developed by National Security Agency of the United States. It is qualified as one of the safest devices and widely used across a variety of fields. Once SHA 256 Hash Function works, any input, regardless of its size(bytes), yields the same size output, that is, 256 bytes, but with a different value in every occasion. We call that output a ‘hash’ value.
This mathematical function has three crucial features. i) It is a mathematical function in that each value X results in a single different value Y. ii) Any input, whether it has a big or small value, converts to an output value with the same scale such as 256 bytes through the function. iii) It is practically impossible to calculate the input value from the output value; we can’t decode the original value from the ‘hash’ value.
2.2. Application : ‘Transaction Verification’ through ‘Digest’
Suppose ‘a block’ of data with the following properties. i) it contains as its contents events of state changes occurring in unpredictable ways, ii) its exact identical copies are ceaselessly broadcast to a group of participants, say, ‘verification network’, and iii) it requires that no retroactive alteration of its contents should happen.
A typical example would be such that ledgers of a bank which records transaction events of customers in chronological order is distributed to a group of customers willing to receive it. This ‘a block’ of data can be transformed to one ‘hash’ value through SHA 256. Then, each participant can compare the hash value of her data with that of others’, checking the ‘digest’ of data, to verify that her data matches others’, instead of scrutinizing all the details of each original ‘big’ data. We can so verify with ease that the data we hold is flawless if its hash value matches others’.
However, we are still not sure of which one is genuine in case of hash value difference without a trusted third party like a government or a bank. Blockchain technology has made a breakthrough for that matter as discussed later.
3. What Cryptography Technology Offers and its Limitations
As we’ve seen, cryptography technology enables us to do two things. i) We can ensure that a certain deal is reached based on true intentions of participants in a ‘transaction network’ by implementing ‘digital signature’ using private key / public key pair technology. That is ‘transaction authentication’. ii) We can know for sure that a data block which records such transactions matches other data block in a highly fast and effective way by comparing hash values through Hash Function. That is ‘transaction verification’.
However, cryptography technology is not enough. It has limitations. First, even if ‘transaction authentication’ is achieved through ‘digital signature’, we can’t know for sure who someone doing ‘digital signature’ is. It is like we know for sure that a person holding coin is holding coin, but we can’t identify who she is without further reference such as checking an identification card. In legal perspective, the issue is converged to the question of effective occupation, i. e. who occupies the allocated address effectively by having a private key, just like who occupies money effectively, when it comes to determine who the owner is. Consequently, though it is a fundamental question, we see no problems for now.
However, the second issue could be a big hurdle unless being overcome.
Suppose a ledger on which past transaction records were piled up. In that ‘block’ of records, since validity of current transaction relies on validity of each past deal, it is absolutely required to keep any record from being counterfeited. By comparing hash values when we have two data, we can easily check whether they match or not. But, the problem is, as mentioned earlier, we are not able to decide which one is true. That is, when we are faced with one data being forged and the other data true, there is no way to decide which one is true even with hash values. As a result, a trusted third party like a government or a bank is indispensable as in a system like conventional electronic cash.
Chapter 2 How Blockchain Works ? Concept
1. Emergence of Blockchain Technology
In 2009, under an assumed name of Satoshi Nakamoto, a cryptologist or a group of cryptologists announced a short research paper of 9 pages long titled ‘Bitcoin: A Peer-to-Peer Electronic Cash System’ in which they proposed a mathematical solution to the double-spending problem using a peer-to-peer network of online payment that doesn’t require a trusted third party. In other words, a mathematical solution was presented to decide without a trusted third party which one is authentic among data.
2. Blockchain in a Verification Network
In a ‘verification network’, each participant ? we call it a ‘node’ ? receives data. Data means something like a ledger in which transactions are recorded. Data is being renewed reflecting events of state changes, that is, continuous transactions. Data becomes bigger and harder to see if two or more separate data are identical or not. But, using hash value of data, we can easily match two or more separate data and find out that they are identical or not. By putting hash value of certain data into a component of new data, we can create a ‘block of data’ and make ‘blockchain’ of data which in turn yields different hash value one after another. As such, latest blockchain contains in it all accumulated state of changes, i. e., stacked up transactions and can with ease be checked out with other blockchains so that they are identical or not. And blockchain and its copies are ceaselessly broadcast to nodes.
3. Sealing or Closing of a Block
As to integrity of blockchain data, we are still not sure of its authenticity even though we contracted data using hash value and make blockchain. But, using another method of ‘sealing’ or ‘closing’ of block, we can at last discern genuine data among two or more data without a trusted third party. In case of ‘Bitcoin’, ‘Proof of Work; PoW’ is adopted for sealing a block. Sealing of block can be done with other methods such as ‘Proof of Stake; PoS’ and ‘Proof of Importance; PoI’.
Looking into how PoW works, a certain block has to have a specific value input to give the block’s hash the required zero bits. We call that input a ‘nonce’ and that required zero bits a ‘target’ value. Once the right nonce value is inputted, ‘timestamp’ is recorded in the block and the block cannot be changed without redoing the work. To get the right nonce value, only trial and error is possible mathematically and thus considerable CPU effort is required. After the block is timestamped as a result of sealing or closing, it is broadcast to nodes for verification.
Then, why does PoW ensure integrity of blockchain?
First, we need to observe from the aspect of creating a new block. On the presumption that the majority of CPU power is not involved in forgery of blockchain data, since majority nodes will not try to do other work other than calculating a nonce value, they will put more computing power to get a nonce value than the group of attempting forgery as well as they already have majority of CPU powers. So, the majority of computing power will succeed in finding out the right nonce value faster than the group of attempting forgery. In addition, time for doing PoW is given approximately 10 minutes, which makes even harder for the group of attempting forgery to win. Besides, as pointed out in Satoshi’s paper, even if a greedy attacker is able to gather more computing power than all the honest nodes, she would have to choose between using it to deceive people by retreating her payments or using it to generate new coins. She will find out that it is more profitable to play by the rules, because she will get more new coins, which adds up to her profits more than crashing the system and the validity of her wealth connected to the system.
Second, we need to observe from the aspect of already sealed blocks. If an attacker attempts to forge the already sealed block, she has to redo the work of the already sealed block and the blocks following it as well as do the work as to the current block on the creation. The probability of an attacker’s winning honest nodes is very low and it drops exponentially as the number of blocks an attacker has to catch up with increases. Thus, it gets harder to accomplish even with much more than the majority of CPU power.
Consequently, forgery efforts become virtually impossible because of the features PoW provides and nodes can with ease differentiate the authentic copy of blockchain which will always be the longest chain. Furthermore, this peer-to-peer system is free from hacking in terms of system, because peer-to-peer system or DApp doesn’t collapse even if one node is hacked.
4. Incentives to Do Sealing or Closing
So far, we have understanding of how blockchain works in a way that reliable data is effectively created and distributed using hash function and PoW. However, we don’t know yet what drives nodes to participate in PoW. Without incentives to enable nodes to work in a verification network, the network can’t be sustained. In this sense, the core of blockchain technology is to set up algorithm in which nodes are provided with incentives to keep up the verification network and make the system more reliable over time.
There are several types of such algorithm. In Bitcoin, invisible units of bitcoin are transferred among participants in the transaction network and nodes in the verification network check integrity of those transactions. In return for the verification work through PoW, the node coming up with the right nonce value and thus doing the verification work for transaction integrity acquires bitcoin generated according to algorithm and the node doing verification work for transaction authentication obtains bitcoin fees from participants. Those invisible units are cryptocurrency or crypto-property, which means equity interest of the reliable network thus created, sustained, and developed. And, since Bitcoin is like a prototype of manifestation of blockchain technology, other types of algorithm are also envisaged adopting different standards of incentives such as Proof of Share and Proof of Importance other than Proof of Work. Moreover, transaction method could be more sophisticated than simple transfer of cryptocurrency as in Bitcoin. We call it ‘Smart Contract’ in which transactions are carried out according to elaborately designed contract program. We’ve taken it as improved blockchain technology, dubbed it ‘blockchain 2.0’, and ‘Ethereum’ is its prime example.
Successful blockchain network has intrinsic economic value of being a reliable network. So, Crypto-property can be assessed as share interest of reliable networks in which innumerable and infallible transactions have been piled up from the past until now. Furthermore, owners of crypto-property have incentives to increase the credibility of the network because they have stakes on the increase of the value of the network as equity owners. On top of those, a variety of applied blockchain networks are able to retain other intrinsic economic value besides the credibility of the network itself.
In conclusion, it is essential to create intangible property for blockchain networks to work in a decentralized and distributed way by willing participants and without a trusted third party in the networks. That property is cryptocurrency or crypto-property. Blockchain technology is based on cryptography technology, but it can’t work just by mechanics. As we’ve seen, without incentives by cryptocurrency or crypto-property, blockchain network can’t be sustained and developed. Thus, cryptocurrency or crypto-property is placed at the core of blockchain technology.
Chapter 3 How Blockchain Works : Example of Bitcoin
1. Basics of Bitcoin Transaction
In order to participate in the verification network of Bitcoin, you need set up your own node, or a computer connected to the Internet with a special software installed. This software is downloadable at https://bitcoin.org/ko/download which is sponsored by the Bitcoin Foundation based in the District of Columbia. The software is licensed under the MIT License as an open source project. Even though the mining efficiency of a node depends on its computing power in general, any decent personal computer for daily household use is capable of being used as a node in principle.
Once the ‘mining software’ is installed and started in an internet-connected computer, it constantly takes part in the transaction verification work and the block sealing mission of the worldwide Bitcoin network as far as its electricity supply is maintained properly. You could expect your node sometimes succeeds in figuring out the nonce value of a Bitcoin data block and getting or mining some bitcoins by ‘coinbase’ transactions.
If you are only interested in ‘transfer’ transactions rather than in mining, you can install a reliable ‘wallet software’ on your computer or smartphone and sign up. This wallet software provides you with your private/public key pair necessary for Bitcoin transfer. When you order a transfer of Bitcoins using your wallet software, the software connected to the Bitcoin verification network makes the network keep track of your transaction. If you hold some Bitcoins in your public key based Bitcoin address in the form of UTXO(‘Unspent Transaction Output’) and want to secure them off-line, you can print out your private/public key pair information or put it on other off-line storage devices and uninstall the wallet program from your computer or smartphone.
As mentioned earlier, the Bitcoin system motivates all the participant nodes to spend their computing resources voluntarily by allocating fairly newly issued Bitcoins to them.
2. Explanations of Data Structure of Bitcoin Ledger Unit
Every mining node comprising the Bitcoin network stores the chain of blocks and add new verified and sealed blocks to the chain and the chain becomes longer and longer over time. This chain is truly a chain in that all the elements or blocks in the chain are bonded sequentially by means of inclusion of the hash value of the previous block header in each block header.
As mentioned earlier, this chain structure is not enough for securing data from counterfeit or forgery because there are no standards by which people can decide which chain is genuine in case of discrepancy between two or more different chains.
To overcome the problem, a person or a group of persons who designed the Bitcoin system introduced a concept of block sealing or closing and named it ‘Proof of Work.’ The bottom-left box in the Diagram represents any block comprising the Bitcoin blockchain except the Genesis Block or the first block. You can see the box contains other boxes in it and the uppermost box represents the header section of any block. Every header has 6 items, one of which is the very nonce value that makes the hash value of the header data less than a certain value if calculated with the header’s ‘nBits’ value.
At the starting point of a block formation, the ‘nBits’ value is fixed by the Bitcoin node software, and at the time of completion of the block sealing which is the last step of any block formation, the ‘nonce’ value is calculated by one lucky node computer.
We need focus on the process performed by a Bitcoin node at the time of block sealing very carefully to catch a sound understanding of the Bitcoin system. It is because this process determines the way the node is compensated properly for the work to maintain the system. This compensation process is finalized by recording the first transaction or the coinbase transaction as the first entry of the next Bitcoin block’s transaction record section, located right below its header section. All new Bitcoins are mined through coinbase transactions.
Next, when we look at the overall data structure of a pile of transactions Bitcoin ledgers included in the transaction record section in each Bitcoin block, we should keep in mind that every such data contains plural transactions and each transaction is always made up of two elements: INPUT and OUPUT as illustrated in the bottom-right box in the Diagram.
We can also note that though one transfer transaction is composed of at least one input and one output, all the inputs and outputs are separated from their pair and placed together as shown in the bottom-right box in the Diagram.
If you scrutinize the structure of that box closely, you could easily find out that there is another type of chains in the Bitcoin system. Every input or remittance of Bitcoins contains the information of the output where the input withdraws Bitcoins for its remittance. If you remind yourself that every output or receipt of Bitcoins is the result of the input, you could realize that there are many sequences or chains in a structure like ‘output’ -> ‘input’ -> ‘output’ -> … -> ‘input’ -> ‘output’ in the Bitcoin system and all the ends of such chains should be an output. We generally call that terminal output ‘UTXO(Unspent Transaction Output)’ . According to https://blockchain.info/charts, as of 9:00 am April 9, 2018, the total amount of Bitcoins in all the UTXOs is 16,968,113. The issuance limit of Bitcoins is 21,000,000 and future coinbase transactions can occur within that range.
The third or last part of each input contains two data; i) a private key paired to the previous output’s public key and ii) a targeted public key matched to the recipient’s Bitcoin address. In some cases, more than just a private key to the previous output’s public key like some scripting code might be necessary to unlock the Bitcoins in that previous output if the output contains some verifying script besides the public key.
3. Insight into Future Opportunity Seekers in Blockchain Technology
There is no doubt that the current Bitcoin system has seen huge success in spite of many restrictions. And there are so many competent developers and software engineers all over the world claiming that the designs, algorithms and ideas in their prospectus, so called ‘whitepapers’ have good business prospects and are good for investment. However, in reality, without providing substantial technological concepts, many developers and engineers just distribute to investors extremely simple ERC 2.0 tokens based on one page solidity code.
Under the climate of the industry as above, we believe that entrepreneurs planning a successful ICO will be closer to success if they show to investors their sound business models with integrated technological backbones such as development of the test core and simulations whether they are based on ERC 2.0 or not.