Monday, January 28, 2019

Blockchain: What is a 51% Attack?

Earlier this month, Ethereum Classic suffered a 51% attack.

Although it was not the first cryptocurrency to get attacked, it did have the moniker of one of the big brand names of the crypto-world. That being said, Ethereum Classic is not the main branch of the Ethereum but rather the branch who decided not to go with the decision of the foundation to undo the damage caused by the DAO Hack.

Everything gets hacked, so what makes such an attack so special?

When promoting the bitcoin blockchain, many blockchainthusiasts have touted its tamper-resistance properties as something that users can hang their hats on. Don Tapscott, as one example, notes that since the bitcoin is"transparent, peer-to-peer, and administered by everyone who uses it, it's all but impossible to corrupt"; implying that such an attack is not something that a bitcoin user should worry about.

So what is exactly a 51% attack?

As noted in my process flow post, the idea here is that the segregation of duties concept is breached because the miner has effectively the ability to write to the ledger on their own.

Did a few searches but Ivan Liljeqvist does the best job in terms of breaking it down:



In summary, the hacker will use their hashing power to build a “secret” chain that is longer than the active chain that contains the transactions submitted by the attacker. This secret chain will not contain those transactions. Then at the right time, the attacker will publish their secret chain. Since it is the longer chain (i.e. as the attacker has 51% of the hashing power), it will be accepted by the protocol and displace the public chain, thereby allowing the attacker to spend those bitcoins again, as the official record (which has now propagated across the network) does not record those transactions as spent but as retained by the attacker.

The key to his explanation is the following:

  • The longest chain principle: the network essentially is able to maintain integrity as long as 51% of the hashing power is distributed as it is only the network that is capable of generating this chain; not a single person. The bitcoin blockchain protocol uses this control to resolve to the situation where two chains are being created simultaneously. For example, let's says miner in Canada has identified the nonce for a block of transactions. However, a miner in Japan has also arrived at a nonce for the same block of transactions. Which chain should take precedence? The protocol will declare the longest chain the winner, where length is a function of the difficulty to create that chain. Therefore, as long as the majority of the hashing power is distributed across the network, the control will function as intended. 
  • Specific transactions will be compromised: The attack allows to double spend on their transactions or transactions they are paid to attack. The rest of the records on the blockchain are not impacted by the attack.
  • The attacker can win each competition: What's interesting is whether the attacker would bother double spending their transactions when they can simply win each mining competition. 
That being said, the system will lose trust if such attacks became rampant. If that were to happen, miners have the most to lose if such a thing. were to occur. 

The bottom line is that all blockchain is like any piece of technology. The bitcoin blockchain network, which has numerous miners is very different than a newer blockchain that is unproven. Consequently, we can't simply assume because something is a blockchain it will be "auto-magically" invincible. 

Author: Malik Datardina, CPA, CA, CISA. Malik works at Auvenir as a GRC Strategist that is working to transform the engagement experience for accounting firms and their clients. The opinions expressed here do not necessarily represent UWCISA, UW, Auvenir (or its affiliates), CPA Canada or anyone else

No comments: