Recently someone got a hold of my debit card number. While the card itself remained in my wallet, and I thought everything was fine, someone was using my money to take lyft rides all over San Francisco. Two weeks later, it took me an hour on the phone with Wells Fargo to tell them that I don’t use lyft (nothing against it, I just have a car). The whole thing was a massive headache. I’m pretty sure I’m down a couple hundred dollars and I’m not getting that money back. I’m embarrassed to say it took this happening for me to realize that debit cards are stupid.

Before you start telling me “Oh, you mean we should all switch to credit cards then?” NO! It’s the same fuckin’ thing! Just because the bank is willing to assume the risk of the transaction in the hopes that they can fleece you on interest at the end of each month doesn’t stop the cards from being comically insecure.

Here’s the thing, in order to spend money with your credit or debit card, you have to give the establishment you’re buying from all the information they need to spend your money. That means every waiter/waitress that you hand your card to in a restaurant, has the power to rob you for all they can get. Even if they’re trustworthy, the electronic system they’re entering it into could be compromised, maybe a tech-savvy manager (or one of his nephews) is using their payment processing equipment for less than honest ends.

Unless you use paypal, every website you spend your card on gets your full credit card #, the card’s security code and it’s expiration date. The people running that website are complete strangers, and they now have your credit card information. They might as well ask for your social security number, the password to your email account, and the list of any porn sites you may be subscribed to while they’re at it. This is 2019. We have  technology now. Let’s talk about encryption.


Encryption simply refers to the science of sending a message to a someone in such a way as anyone else who sees the message can’t make heads or tails of it, only the intended recipient can understand it. A simple example: let’s say a friend of mine who speaks Esperanto just got a girlfriend. If we’re the only ones who speak that language, then I can say things like “Vi amikino estas ĉiesulino” without tipping off the lady friend that I think she’s a harlot. (Fun fact, “ĉiesulino” is the only profane word i know in Esperanto — it literally translates to “everybody’s woman” and refers to prostitutes).

In all encryption you need a key or cipher to decode the message. In the above example the ability to speak Esperanto was key. In a caesar cipher, which is just moving the letters over a certain number of n places, knowing the number “n” is the “key” to the message. Caesar ciphers are also incredibly easy to guess. Don’t use them unless you’re playing a game. In any case, I can encrypt a message with “X” and if the recipient also has “X” then he can decrypt the message. Modern cryptography is way cooler: enter the world of Public Key Cryptography.

In previous cryptographic systems, the key to encrypt the data was the same as the key to decrypt it, so that if you had to send someone a secret message, you essentially had to give them your password (this sounds very much like the world of the plastic debit card). Public key cryptography managed to separate encryption and decryption into two keys, or a special key pair. Here’s how it works:

  • You generate a key pair: ‘A‘ and ‘B‘. That way anything encrypted with ‘A‘ can be decrypted with ‘B‘, and vice-versa.
  • Your buddy John generates a key pair: ‘X‘ and ‘Y‘.
  • You have four keys between you, so you decide to tell John ‘A‘ and keep ‘B‘ secret.
  • John tells you ‘X‘ and keeps ‘Y‘ secret.
  • You send a secret message to John saying that he is the best friend you have, and encrypt ‘X‘, which he made public. Now, only his secret ‘Y‘ can open it. This ensures John is the only one able to read the message.
  • John, being a braggart, decides to make it a public statement. So he writes down that hes is the best friend you have and encrypts it with his secret ‘Y’ key. This can only be decrypted with the key ‘X‘, which John made public. This acts as proof that John sent that message, and is called “signing”.
  • You then decide to playfully call John an asshole for bragging about your relationship, but you only want him to see it. What do you do? Well, first you can sign it by encrypting it with your private key (B), and then encrypt it again using John’s public key (X). This way only John can see it, and he knows that you are the one who chastised him.



So imagine this, you sign up for a bank account with “Smart Bank”. You download their phone app which includes your own unique key pair (these can be created for free). When the waitress comes with the bill, you give her the account # that points to your “Smart Bank” account. Within two minutes, you receive an alert on your phone asking to confirm a transaction. It contains the details of your receipt. You then spend the money by “Approving” the transaction on your phone.

What’s happening behind the scenes is, the bank sends the transaction details to your phone encrypted for you using your public key, so that not everyone and their mother can see what you had to eat at Arby’s. When you “Approve” the transaction, your phone takes a copy of the transaction, adds a little message like “approved” or whatever, encrypts it with your private key and sends it back. The bank receives a signed document from you detailing that you definitely spent $40 on I-hate-my-life special at Arby’s.

Notice, the waitress never has to see your private key. The bank doesn’t have to see your private key. You can approve the transaction without any sensitive data leaving the “Smart Bank” app. Now you don’t need to trust every stranger on the internet, you only need to trust your “Smart Bank” and the makers of their app. I would assume you trust them already, since you made a bank account with them in the first place.

One vulnerability is that someone who steals or hacks your phone could spend your money, but that is already true for someone who steals your credit card. A strong password on your phone could help prevent this, and, like a credit card, you could have an additional pin required by the “Smart Bank” app, just to double check it’s you, before you spend any money. Unlike the credit card, spending using the app could universally require the pin, as opposed to some gas stations where no matter what you enter they still accept the card, or some restaurants where they take your card and spend your money automatically.


All that’s needed to build such an app is the internet and knowledge of public key cryptography, both of which have existed since the mid 1990’s. Most of the internet already runs on public key cryptography, and in fact, that is exactly what the online web sites are using to ensure that when you give them the magic info needed to spend your money, they are the only ones to see it.

This exists now: modern cryptocurrency is the embodiment of this idea. A bitcoin “wallet” is just a cryptographic key pair. You spend with the private key and receive with public key. A bitcoin “wallet” application on your phone is just an app that allows you to spend money in the way I described above. Hell, back in 2017 I helped Ryan Whitney build an electronic bitcoin wallet using special hardware, that allows you to approve a transaction without the chip holding your private key ever coming into direct contact with the internet, thus making it even more difficult for hackers to get a hold of your banking information.

Long story short, cryptography is awesome. Maybe credit card companies should invest in cryptocurrency.