At twenty to four on a Tuesday afternoon, the signal bars on Shafiq's phone vanish. He shrugs; the network is always patchy near the river in Khulna. By evening the bars are back, and so is a message from his mobile wallet: Tk 48,000 sent. He sent nothing. Someone reset his wallet PIN with a code that arrived by SMS, confirmed the transfer with another code that arrived by SMS, and emptied the wallet in minutes. Neither text ever reached Shafiq's phone. For two hours his number had been living inside a different SIM card, in a stranger's pocket.
Now a second story, from a different world. On a Thursday in February 2016, a computer inside a bank in Dhaka starts sending payment orders to the Federal Reserve Bank of New York. Thirty-five of them, asking for about US$951 million. Each order is valid in form, each carries the bank's real credentials, and the Bangladeshi weekend has just begun, so nobody is at the desks.
One story moves a few taka, the other hundreds of millions of dollars. But look at what they share. In both, money is just a message that tells a machine to change two numbers, and the thief did not have to break any clever mathematics. He only had to make a message look as if it came from the right person. This chapter is about the ideas that stop that: who is allowed to give the order, how the order is checked before it is believed, and what limits the damage when a check fails.
By the end you will be able to draw an electronic payment system, name its types and trace a card payment through cardholder, merchant, gateway, acquirer, network and issuer, saying when the money moves. You will build the layered answer to "how do you make online banking safer without biometrics?", say what the chip, the CVV, the PIN, 3-D Secure and a token each stop, compute the Luhn check by hand and name the attacks on ATMs with the defence against each.