Integrating physical devices with IOTA — The IOTA debit card, Part 3

The full article was originally published by Coinmonks on Medium. Read the full article here.


This is the 8th part in a series of beginner tutorials where we explore integrating physical devices with the IOTA protocol. This tutorial is the third part in a sequence of tutorials where we will try to replicate a traditional fiat based debit card payment solution with an IOTA based solution. In this third tutorial we will be implementing i PIN code protection mechanism for our IOTA debit card.

The Use Case

If you followed the previous tutorial in this series you probably noticed that you are not asked for any authorization or credentials when paying with your IOTA debit card. While this might be fine in some use cases, there may be other use cases where this is not acceptable. Imagine if you lost your IOTA debit card and it was picked up by a bad actor. Without any protection mechanism there would be nothing preventing him from using your card. In this tutorial we will be addressing this issue by implementing a PIN code protection mechanism for our IOTA debit card.

This tutorial will be a little shorter than the previous tutorials in this series as we will not be introducing any new hardware or PyOTA functions.

The Python code — Part 1

The python code used in this tutorial will be split into two parts where the first part is the code used when assigning a new PIN code to your IOTA debit card. The second part is a modified version of the script from the previous tutorial. Only difference is that the new version will ask you for a PIN code before scanning your IOTA debit card.

So lets start with the first Python script that will allow you to assign your own four digit PIN code to your IOTA debit card. Notice that the new PIN code will be written to the first four bytes of both block 11 and 15. The reason we need to write the PIN code to two different blocks is that each block functions as an the authentication block for the two individual sectors where the IOTA seed is stored. Check out the 6th tutorial in this series for more information on reading and writing data from the Mifare RFID tag.

Read the full Article

The full article was originally published by Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.

Get real time updates directly on you device, subscribe now.

You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More