9 ms·
While we're on the subject of Japanese vending machines, how do they implement the IC card scanning feature? Does it need to be connected to a special network o
by bschwindHN 9y ago
While we're on the subject of Japanese vending machines, how do they implement the IC card scanning feature? Does it need to be connected to a special network or is the logic all done on the card? I'm specifically talking about the payment verification and logic. I have one in my office that accepts IC card payment and I'm not quite sure what is required for that to work.
- shidoshi 9y agoSuica, Pasmo and the like are all contactless SCs. The Wikipedia page is a good start, and you can go deeper from there: https://en.wikipedia.org/wiki/Suica https://en.wikipedia.org/wiki/Suica
- bschwindHN 9y agoAh sorry, I mean how the machine verifies the validity of the card.
- sly010 9y agoIt's asymmetric key cryptography. Every vending machine can verify signatures using a CA certificate. Charging stations and a vending machines also have a signing key signed by that central certificate. Whatever is written on the card is signed by whoever wrote it. Charging a card goes like this: - Read everything from the card (data + signature) - Verify signature + expiration dates, etc - Extract amount on card - Decrement said amount - Write new amount to card - Sign data on card using local signing key It's a bit more complicated than that, but you get the idea. In some systems the logs of all transactions are reconciled asynchronously (if and when internet connection is available) so if a card is cloned it can eventually be detected and blocked.
- bschwindHN 9y agoThe "local signing key" is the interesting part to me. I guess only vending machines in certain areas can get IC card support. I wonder how often those local keys need to be rotated. That's a great answer though, thanks for writing it up!
- eaeertae 9y agoadsfg afaf asdf asdf dsf f fas df
- iand675 9y agoI'm not entirely sure, but yesterday I observed some vending machines at a local university that worked with student IDs. The machines had a small antenna encased in the drink display, so presumably that model broadcast payment and/or inventory updates to some nearby receiver or via stock WiFi networks. I'd expect that there would be a strong incentive to have the cards require network access to verify balances or else some enterprising hackers could potentially reverse engineer the process to add additional funds to the card.