Cryptocurrency, Blockchain, and Security

Cryptocurrency provides a means of trading assets on the Blockchain. Blockchain is a distributed, irrefutable, digital, public ledger. It attracts many people due to the fact of being peer 2 peer, allowing an individual to trade assets directly with another person across the globe.

Why is this valuable? Everyday we hear of a new hack on a centralized entity, or we hear of malicious actors within these systems. Think of; Equifax, Wells Fargo, Target, TJX Companies.

Equifax compromised 143 million Americans. Wells Fargo had a malicious practice where they created as many as 3.5 million bogus financial accounts. The Target hack compromised 40 million consumer credit/debit cards while TJX Companies, 94 million cards.

Security and the economy are changing rapidly, people are unsure whether they can continue to trust these banks and large corporations.

Security and Encryption

When you create a cryptocurrency wallet, you are given a corresponding private and public key. This is asymmetric encryption and is the foundation in securing your assets. We will use the cryptocurrency Ethereum as an example.

If someone wants to send you some Ethereum, they will send it to your public key. After receiving the funds, you can now interact with your new found wealth by unlocking your wallet using your private key.

Every transaction is a hash, whether you are sending tokens to an individual, or interacting with a smart contract on the blockchain. Your private key signs a transaction request and creates a hash to publish to the blockchain.

Hardware Wallets

If you lose your private key, your funds are gone forever. Using 256 bit encryption, the odds of generating a wallet with funds, is virtually impossible. If someone knows your private key, or steals your private key, they can now steal all your funds.

A hardware wallet contains a secure element chip. An RNG, random number generator gives you a public/private key. It keeps the private keys stored on the device and does not allow it to be seen from outside of that device. Using a hardware wallet, it signs transactions on the device before sending the encrypted hash through your computer, then to the blockchain using your internet connection. This increases security substantially, as you could theoretically plug in your hardware wallet into a malware laden computer and securely make a transaction. Some people feel generating a wallet on any computer is a security risk, as your private key is exposed and prone to compromises of said computer.

Nodes, Storage, Mining, and Redundancy

Nodes are devices that store part or all of the blockchain. Anyone can host a node, this allows direct access to the blockchain without using other peoples nodes to process your transactions. Mining Ethereum or Bitcoin is proof-of-work, computers are set up to calculate hashes extremely fast, they submit their solutions, and get paid in return. Their payment comes from fees paid by other users, and new blocks that generate new tokens. Anyone can start mining, it is decentralized and can be set up relatively easily.

There are nodes and miners all over the globe, this provides redundancy. The network will still continue if people decide to take down their node or mining operations.

The blockchain is massive. If you wanted to host a full archived Ethereum node, you could expect to use over 700GB of storage. There are other options that only require anywhere from 100MB to 240GB. This is an issue, as the size gets larger it will dissuade users from hosting nodes, this leads to less decentralization and more centralization.

Attacks and Hacks

51% Attack

Signed transactions are put in to a pool of unconfirmed transactions. They await their mining savior to provide the computational power to find a solution hash and publish to the blockchain. It is possible for these miners to provide false, malicious solutions. This forks the network and now you have two different blockchains. If the malicious blockchain gains traction, it can potentially be the new ‘correct’ blockchain. All transactions that were processed on the old blockchain are reversed to a previous state, people will lose tokens and some will be able to double spend tokens they had sent previously.

Luckily, this is extremely hard to do. This requires 51% of the computation power of all miners. The amount of power required to do this attack is enormous. There is also a deterrent, if you have this much power, why not just mine like everyone else? You would receive rewards for your work. This is still a very serious issue and many smaller blockchains have been victims of 51% attacks.

Code is Law

Smart contracts are pieces of code, dApps (decentralized applications) published on the Ethereum blockchain. These can be interacted with by anyone in the world who has an internet connection. Anything published to the blockchain cannot be changed.

Parity has a multi sig wallet contract that was killed by an individual calling a ‘kill’ function on the contract. This was a fundamental flaw in the code that allowed one individual to freeze $300 million worth of Ethereum.

Similar to other applications, if your code is flawed, it has a vulnerability. Unlike other applications, on the blockchain, you can’t edit or update your code. This has put focus on developers to publish thoroughly tested, and proven code.

Conclusion

Cryptocurrency and blockchain has captured the minds of a generation. Developers all over the world are red eyeing projects that apply blockchain in numerous ways. Individuals imagine a world where we no longer need to depend on the corporations to handle our currencies and assets. We’ve seen what centralization provides and diminishes. Decentralized, it’s your choice.

REFERENCES

https://www.investopedia.com/news/5-biggest-credit-card-data-hacks-history/

https://www.usatoday.com/story/money/2017/09/14/equifax-identity-theft-hackers-apache-struts/665100001/

https://www.bloomberg.com/news/articles/2018-05-04/wells-fargo-reaches-480-million-settlement-in-class-action-suit

https://support.ledgerwallet.com/hc/en-us/articles/115005198485-About-hardware-wallets

https://ethereum.stackexchange.com/questions/143/what-are-the-ethereum-disk-space-needs

https://medium.com/coinmonks/what-is-a-51-attack-or-double-spend-attack-aa108db63474

https://medium.com/chain-cloud-company-blog/parity-multisig-hack-again-b46771eaa838