Cryptocurrency 101 (Part 3)

Photo Credit: markethive Flickr via Compfight cc

Click here for Part 1

Click here for Part 2

What is blockchain technology and how does it work to provide decentralized transactions?

Blockchain technology is built on 3 key ideas:

  1. Private-Public Key Cryptography
  2. Distributed Networks
  3. Incentivized Computing

Cryptography is the process of writing and reading coded messages. The process of writing it is called encrypting and the process of reading it is called decrypting. In order to properly read and write a message, one needs a key which is the formula to unlock the message.

One of the simplest methods of encryption is direct substitution. An example of this is for you to take a sheet of paper and write the letters A to Z in one long column downwards. On the next column, beside the letter A, start with another letter, for example M, then continue downwards. So you would write N beside B, O beside C, and so on until you get to Z and then you start again at A.

This now is your key.

That means the when you want to write the letter A, you should instead write M. And when you want to write the letter B, you should write N, and so on.

Using this method, the word “apple” will be written as “mbbxq” and the word “balloon” will be written as “nmxxaaz” and so if we write an entire message this way, it will appear as gibberish to someone who does not have the proper key to decode it. Of course, a simple code like this can be broken very easily even by a ten-year old, which is about the age I got interested in this sort of thing.

So one can make a more complex formula, for example a=”45w”, p=”x3e”, l=”ch”, e=”6a” so now the word “apple” will read as “45wx3ex3ech6a” and this will be a more difficult code to break. Modern encryption takes advantage of the power of computers to do very complex calculations and so are many orders of magnitude harder to break than these simple encryption methods.

One of the most popular modern encryption technologies is called the private-public keypair. These keys are typically very long numbers which may look like this: “3048024100C918FACF8DEB2DEFD5FD3789B9E069EA97FC20.” Your private key is yours alone while your public key is the one you give to people you want to transact with. For someone to send you an encoded message, he only needs to know your public key. Once he encodes the message, even he will not be able to decode it, as you will need the private key to do that.

Blockchains use this method to ensure that your transaction is authentic, authorized and secure. In fact, this method is more secure than simply typing a password on a web browser.

Next, the blockchain uses the idea of a distributed network. Most of our transactions use the client-server model wherein the data resides in a central repository. For example, if we are doing online banking, all the data resides in the bank’s servers (and nowhere else). Therefore, if someone would be able to hack that server and modify certain transactions, it would be possible for that person to make a cash transfer of P1,000 to his account appear to be P1,000,000. If he were then able to withdraw that amount before the hack was discovered, then he would have gotten away with free money.

The same thing happened to a local bank several weeks ago where there was an IT glitch which caused some people to see their bank balances suddenly go to zero or negative, while others were surprised to see more money than they should have in their accounts. In fact, some were able to withdraw this excess cash before the glitch was discovered and all machines were taken offline to prevent further damage.

This happened because the transaction records were centralized and any alterations (whether authorized or malicious) to those records will immediately affect the clients accessing those records.

In contrast, cryptocurrency uses a distributed system which essentially has multiple transaction ledgers. Anyone can download and secure a copy of these ledgers. Transactions are recorded in segments called blocks, and these blocks are produced regularly and sequentially — that is why it is called a blockchain.

The software to record transactions and secure the blockchain network is called a “miner” or a “node,” and it is typically open-source and free for anyone to download and run. So anyone who does this will have a complete record of the entire blockchain since the beginning. It’s like having a complete record of all your bank’s transactions on your computer.

So now, there is no central repository of the data, and the integrity of the data can be quickly compared with all the other miners or nodes in the network. For example, if someone were able to hack my computer and change the transactions there, once the program verifies that data with the rest of the network, it will discover that my records are different from the vast majority of other miners and thus will automatically reject those hacks. For a hack to be successful, the hacker must be able to manipulate the records of 51% of all the miners in existence — a feat which is near-impossible for popular cryptocurrencies like bitcoin or ethereum which has thousands and thousands of miners all over the world.

But why would someone want to download and run a miner or node on his computer? We’ll tackle the next key idea, incentivized computing, next week.

 

Originally published in Sunstar Davao.

Email me at andy@freethinking.me. View previous articles at www.freethinking.me.

Cryptocurrency 101 (Part 2)

Photo Credit: Diari La Veu – http://diarilaveu.com Flickr via Compfight cc

Click here to read Part 1.

Last week, I said that a key concept in cryptocurrency is the idea of a trustless transaction. Let me now expand on that idea.

A lot of things we do with our money involves trusting an entity other than the one with whom we are transacting. That means if Jose wants to buy a watch from Maria, he has to trust another person or entity other than Maria, and likewise for Maria.

Let’s go with the clearest example first. Jose sees a watch on the internet and wants to buy it. He sees that the merchant is Maria and after doing some background research, he decides that Maria is trustworthy and is not a scammer. So he transacts and buys the watch using his credit card. Aside from trusting Maria, he is also TRUSTING:

  1. The owner of the website to handle his transactions securely. But this can also be checked visually by looking at the address and making sure the transaction is sent over a secure layer (https instead of http).
  2. The owner of the website not to use his credit card information maliciously. Since Jose has entered all the pertinent details of his card, the website owner can theoretically store this information and use it for ill intentions.
  3. The credit card issuer to settle the payment for him, and then bill him correctly afterwards.

These are some reasons why people are still uncomfortable with online transactions using credit cards, although that number is growing smaller.

But from Maria’s point-of-view, there is also some trust involved. She is also trusting the credit card company to pay her.

But what about if Jose uses physical cash to transact? If he goes to Maria’s store and buys the watch and hands over his money, does he still need to trust a third party? Well, yes, he is effectively trusting the Philippine government which is backing up the value of the pieces of paper he is handing over to Maria, and Maria is also trusting the government for the same thing — that the pieces of paper she is receiving has value. If Maria received that money now and 5 minutes later, she hears on the news that the government has just declared bankruptcy, that money will be worthless.

Now what if Jose simply keeps his money in the bank? There is still trust involved. Jose trusts that his money is “safe” in the bank and that when the time comes when he needs to withdraw it, the money will be readily available. But what happens when there is bank run or when the bank declares bankruptcy? Jose will be unable to recover his money beyond the maximum amount he can claim via insurance.

This issue of trust could be felt quite recently when a local bank had some problems with its systems that caused some depositors to have negative balances, double transactions, and other such errors. This caused some people to lose their trust in that bank and transfer to another bank — but what they don’t realize is that the very same thing could also happen to whatever bank they run to. Human error, carelessness and negligence is unfortunately universal.

What I hope you see here is that the power of our money system today still derives from central authorities from banks to central banks to governments. These central authorities are prone to security failures such as hacking, or even simple mistakes in programming, or manipulation by those in power within that authority.

Cryptocurrencies, by their very nature and programming, try to move away from the idea of a central authority to being truly decentralized. That does not mean that there are no rules, but that the rules, once set, will be virtually impossible to hack or to manipulate, even by the program authors themselves.

To understand that, we have to understand a key architecture of cryptocurrency called the blockchain, which I will explain next week.

Originally published in Sunstar Davao.

Email me at andy@freethinking.me. View previous articles at www.freethinking.me.

Cryptocurrency 101 (Part 1)

Photo Credit: btckeychain Flickr via Compfight cc

 

If you had 100,000 pesos in around February of 2011 and decided to buy bitcoin then (which was priced at around $1 each), and then just left it alone, you would be richer today by around 300 million pesos.

Now, before you get that urge to hit your head on the wall again and again (like me), you have to realize that you would have had to fight off the urge to cash in after its value had risen and fallen again and again. You would have had to fight off the urge to get rid of it after some major setbacks like the fall of famed bitcoin exchange Mt Gox, or China prohibiting its financial institutions from dealing in bitcoin in 2013, or the multiple times “experts” had pronounced that bitcoin was dead or dying.

Bitcoin prices have swung wildly from $1 in February, 2011 to $31 a mere 6 months later in July, and then back to $2 in December of that same year. By December 2012, it was back up to $13. By December 2013, it peaked at at $1000. In March 2014, it went down to around $600 and slowly decreased until March 2015 when it reached a low of $200. Then it began picking up again to around $500 by the end of 2015. By December of 2016, it was around $800. Since then, it has reached an all-time high of $2,800 as of this writing.

I learned about bitcoin in 2013 but didn’t really take it seriously because I couldn’t understand it and the few articles I found about it then connected it to the black market website, The Silk Road, where one could use bitcoin to buy all sorts of things including illegal items like fake driver’s licenses and illegal drugs which comprised roughly 70% of its offerings, and it could do this because bitcoin provided a certain amount of anonymity. Anyway, The Silk Road was shut down shortly after by the FBI. I decided then that I didn’t want anything to do with bitcoin because I thought it was only useful for buying illegal stuff.

It was 2 years later in 2015 when I had a chance to reconnect with the acquaintance (and now my good friend) who had introduced me to bitcoin and our conversation revolved around that and I learned more about it that shattered my previous misconceptions.

So what is bitcoin and why is it such a hot item today?

The short answer is that bitcoin is a form of digital currency (the generic term for it is cryptocurrency) that uses computer networks and high-level cryptography to secure its transactions and records. It was released as open source software in 2009. Interestingly, the inventor(s) of bitcoin remains anonymous until today as the technology was released under a pseudonym, Satoshi Nakamoto.

Over the years, despite numerous controversies surrounding it, it has slowly gained acceptance as more and more people understood what it was and what it can do. To put it simply, it allows two people to exchange value (the coin) across borders without any need to trust an intermediary or 3rd party. At first glance, this may not seem to be a big deal because some of us have gotten so used to internet transactions with credit cards and online banking.

Let me illustrate the difference. In the traditional way, in order to buy an item from another country, I have to go through a bank or use my credit card (which still boils down to a bank). In the process, I pay transaction fees for the transmission, as well as conversion fees (from PHP to USD, for example). And then, I have to implicitly trust the bank to successfully transmit my money to the seller. The seller also has to trust the bank to send my money to their account.

This need to trust a third party is removed in bitcoin as it is the protocol itself which ensures that the money is sent and received by whoever is supposed to receive it. The result is that we can transact anywhere in the world (that has internet) for a much lower transaction fee than banks or other financial institutions may charge.

So this idea of trustless transactions is a key concept in cryptocurrency, which removes the need for a central authority. Most cryptocurrency is designed around this concept and is said to be decentralized.

More on this next week.

Originally published in Sunstar Davao.

Email me at andy@freethinking.me. View previous articles at www.freethinking.me.

Holdap (Part 2)

Photo Credit: °]° Flickr via Compfight cc

Click here to read Part 1.

I had a deep, 2-inch gash on my arm and a 1-inch wound on my abdomen. The pain in my gut throbbed a little but the arm hurt like hell.

There was a commotion at the entrance of the emergency room and the nurse attending to me suddenly rushed away. They brought in a young boy who was kicking and screaming. From my angle on the bed, I couldn’t see clearly what had happened to him. I asked a passing orderly what was up and he said, “Oh, he got stabbed in the back,” and he said it in such a way that made it sound like I was just asking about the weather and him replying that it was raining outside.

It certainly put my own troubles into perspective so instead of complaining about the lack of attention, I just waited for someone to come back to me a little later.

The taxi driver then came back towing along my girlfriend and her mother (later to be known as my wife and mother-in-law) and they were understandably worried as they saw me. They arranged to have me transferred to a private hospital where I was confined for a few days because the doctors there wanted to confirm that I had not suffered any internal damage from the wound on my stomach, and it turned out that there was none. The knife happened to just nick the fat but didn’t slam into anything important.

After I was discharged, I went back to my dormitory where I was greeted by some pretty amazing stories:

“Hey, we heard you got attacked and that you were in near-death condition.” Ummm, not really.

“Hey, we heard that someone stabbed you and left you for dead and got all your belongings.” Nope, they didn’t get anything at all except that one guy who who probably got a big bump on his left temple.

“Hey, we heard you got attacked by 10 men and that you used kung-fu to defeat all of them.” This was the best one ever.

So what are a few things I learned from this encounter?

  1. Fats are useful, people. Don’t lose too much of it. They may come in handy some day.
  2. Sometimes, it’s useful to trust your gut. I still cannot explain why I felt the way I did a few minutes before the attack happened. There was just this imminent sense of danger that my body somehow knew before my brain could understand what it was.
  3. There are good people all around. That taxi driver, for instance, who broke the stereotype of Manila taxi drivers by being helpful and going beyond the call of duty. I learned that he not only called my girlfriend, but went to their house and offered to lead them to me as well.
  4. People can and will make up stories about you and there’s very little you can do about it. Live with it. Laugh at it. But you can only do that if you know who you really are inside.

Originally published in Sunstar Davao.

Email me at andy@freethinking.me. View previous articles at www.freethinking.me.

Marshmallow

Photo Credit: thepeachpeddler Flickr via Compfight cc

 

I woke up to the news that the president had just declared martial law in Mindanao because of a band of ISIS sympathizers who had apparently seized control of Marawi City.

Social media was abuzz with different reactions from different friends I had. Since I’ve made it a personal policy not to unfriend real-life friends over differences in religion and politics, I saw all sorts of reactions from left and right and everything in between.

The anti-crowd said  they already saw this coming, that it was staged to pave the way for martial law and authoritarian rule, or that it was not the correct solution.

The pro-crowd said they trusted the president, that it was the right move, and that there is nothing to fear, and that this was different from the Marcos years.

The in-betweeners tended to chastise the bashers on either side and saying why don’t you just find a way to help the victims or pray for them instead.

And then there were the grammar and spelling nazis laughing or mocking those who said “marshall law,” “marshall arts,” and even “marshmallow.”

I honestly don’t know how to express what I am feeling or thinking about this. There is a part of me that sides with those who are thinking that there are better solutions than martial law. Yet, there is also a part of me that accepts the president’s prerogative and decisiveness in this action. Only time will really tell if he was right or wrong.

I am neither a political nor history expert, and I rarely make long commentaries on politics, so whatever I say here I speak for myself only and impose upon no one these beliefs.  I have decided in this matter to simply trust the president I elected. It is not a trust based on empty promises, but a trust based on witnessing how he has led my city for almost 3 decades — a city that has grown to love him.

In my line of work, results matter — not motivations, nor opinions, nor ideologies, but results. And Duterte’s results over the years have compounded to such a degree that I have a huge amount of trust in him — just as that kidnapped businesswoman from Luzon had a few years back when she told her kidnappers to go to Davao, trusting that she would be saved because the city was under Duterte’s care.

It is funny how this trust is bordering on faith — that most freethinkers like me shun.

Although it goes beyond logic, but I’m going with my gut on this one. I hope that the trust I and many other Filipinos have in him is not in vain.

Oh, and don’t just pray for Marawi. Find a way to help. Like I said, results matter.

 

Originally published in Sunstar Davao.

Email me at andy@freethinking.me. View previous articles at www.freethinking.me.

Related Posts with Thumbnails