Cryptocurrency All-in-One For Dummies. Peter Kent
Чтение книги онлайн.

Читать онлайн книгу Cryptocurrency All-in-One For Dummies - Peter Kent страница 20

Название: Cryptocurrency All-in-One For Dummies

Автор: Peter Kent

Издательство: John Wiley & Sons Limited

Жанр: Личные финансы

Серия:

isbn: 9781119855828

isbn:

СКАЧАТЬ money in your bank account to buy the book.

      3 The bank checks its records to confirm whether you do.

      4 If you do have enough, the bank gives a thumbs-up to the bookstore.

      5 The bank then updates its records to show the movement of the money from your account to the bookstore’s account.

      6 The bank gets a little cut for the trouble of being the middleman.

      Now if you wanted to remove the bank from this entire process, who else would you trust to keep all these records without altering them or cheating in any way? Your best friend? Your dog walker? In fact, you may not trust any single person. But how about trusting everyone in the network?

      

Blockchain technology works to remove the middleman. When applied to cryptocurrencies, blockchain eliminates a central record of transactions. Instead, you distribute many copies of your transaction ledger around the world. Each owner of each copy records your transaction of buying the book.

      Here’s what happens if you want to buy this book using a cryptocurrency:

      1 You give your crypto details to the cashier.

      2 The shop asks everyone in the network to see whether you have enough coins to buy the book.

      3 All the record holders in the network check their records to see whether you do. (These record holders are called nodes, and are explained later in this chapter.)

      4 If you do have enough, each node gives the thumbs-up to the cashier.

      5 The nodes all update their records to show the transfer.

      6 At random, a node gets a reward for the work.

      Cryptography

      Shhh. Don’t tell anyone. That’s the crypto in cryptography and cryptocurrency. It means “secret.” In the cryptocurrency world, it mainly refers to being “anonymous.”

      Historically, cryptography was an ancient art for sending hidden messages. (The term comes from the Greek word krypto logos, which means secret writing.) The sender encrypted the message by using some sort of key. The receiver then had to decrypt it. For example, 19th-century scholars decrypted ancient Egyptian hieroglyphics when Napoleon’s soldiers found the Rosetta Stone in 1799 near Rosetta, Egypt. In the 21st-century era of information networks, the sender can digitally encrypt messages, and the receiver can use cryptographic services and algorithms to decrypt them.

      What does Napoleon have to do with cryptocurrencies? Cryptocurrencies use cryptography to maintain security and anonymity. That’s how digital coins, even though they’re not monetized by any central authority or regulatory body, can help with security and protection from double-spending, which is the risk of your digital cash being used more than once.

      

Cryptography uses three main encryption methods.

       Hashing: Hashing is something like a fingerprint or signature. A hash function first takes your input data (which can be of any size). The function then performs an operation on the original data and returns an output that represents the original data but has a fixed (and generally smaller) size. In cryptocurrencies such as Bitcoin, it’s used to guess the combination of the lock of a block. Hashing maintains the structure of blockchain data, encodes people’s account addresses, and makes block mining possible. You can find more on mining later in this chapter, and in much more detail in Book 6.

       Symmetric encryption cryptography: Symmetric encryption is the simplest method used in cryptography. It involves only one secret key for both the sender and the receiver. The main disadvantage of symmetric encryption is that all parties involved have to exchange the key used to encrypt the data before they can decrypt it.

       Asymmetric encryption cryptography: Asymmetric encryption uses two keys — a public key and a private key. You can encrypt a message by using the receiver’s public key, but the receiver can decrypt it only with their private key.

      Nodes

      A node is an electronic device that does the bookkeeping job in the blockchain network, making the whole decentralized thing possible. The device can be a computer, a cellphone, or even a printer, as long as it’s connected to the Internet and has access to the blockchain network.

      Mining

      As the owners of nodes (see the preceding section) willingly contribute their computing resources to store and validate transactions, they have the chance to collect the transaction fees and earn a reward in the underlying cryptocurrency for doing so. This process is known as mining, and the owners who do it are miners.

      

Let me make something clear: Not all cryptocurrencies can be mined. Bitcoin and some other famous ones can. Others, such as Ripple (XRP), avoid mining altogether because they want a platform that doesn’t consume a huge amount of electricity in the process of mining; power usage is one of the issues with blockchain that are discussed in Book 6, Chapters 7 and 8. Regardless, for the most part, mining remains a huge part of many cryptocurrencies to date.

      Here’s how mining works: Cryptocurrency miners solve cryptographic puzzles (via software) to add transactions to the ledger (the blockchain) in the hope of getting coins as a reward. It’s called mining because of the fact that this process helps extract new cryptocurrencies from the system. Anyone, including you, can join this group. Your computer needs to “guess” a random number that solves an equation that the blockchain system generates. In fact, your computer has to calculate many 64-character strings or 256-bit hashes and check with the challenge equation to see whether the answer is right. That’s why it’s so important that you have a powerful computer. The more powerful your computer is, the more guesses it can make in a second, increasing your chances of winning this game. If you manage to guess right, you earn Bitcoins and you get to write the “next page” of Bitcoin transactions on the blockchain. Head to Book 6 if you’re interested to learn more.

      Because mining is based on a form of guessing, for each block, a different miner guesses the number and is granted the right to update the blockchain. Whoever has the biggest computing power combined, controlling 51 percent of the votes, controls the chain and wins every time. Thanks to the law of statistical probability, the same miner is unlikely to succeed every time. On the other hand, this game can sometimes be unfair because the biggest computer power will be the first to solve the challenge equation and “win” more СКАЧАТЬ