Close
0%
0%

Hardware TOTP Token

A hardware token that can store multiple codes and has a replaceable battery

Similar projects worth following
0 followers
I don't like the current offerings of TOTP apps on iOS, and hardware tokens don't have removable batteries. Between wanting to move away from my phone for certain things, existing disposable hardware on the market, and organizations starting to track people based on wireless device signature, I want to create my own bespoke, no wireless communications, device. However flawed it may be.

This project is based on Mycropython running on a RP2040. The navigation will be a d-pad with select in the center. Time will be kept by a DS3231 RTC chip. As this is a project with no wireless connectivity, and this is a protocol that relies heavily on time being correct between the client and server, I want the time to be stable.

For storing the TOTP tokens, I'm thinking of using the file format that KeePass2 uses. That way, you can transfer them to devices easily with whatever derivative of KeePass that you like. My concerns are the length of time it'll take to decrypt the vault files (especially at the highest level you can set), and an ergonomic way to enter passwords if one desires something more complicated than a pin. I want to figure out encrypted storage in the future as an extra layer, but for right now I want to utilize the microSD slot on the ST7789 TFT breakout Adafruit offers.

In regards to protecting the code on the RP2040, I found out the boot.py file has the ability to lock the local storage. I'm thinking of allowing the user to set a pin to unlock the local storage. I also have an idea of compiling the program akin to a library and then having that run the show as an extra layer of obfuscation. Don't know if that's possible yet.

The (hopeful) final form will be a compact card that you can slide in your wallet. I know that is super ambitious, so for now I want to get my PoC on a breadboard working, then figure out the best way to smush the breakout boards together onto one PCB for a true device.

I'd like to use a lower level language at some point, but I'm the most familiar with Python at this point.

A lot of my knowledge on how TOTP works comes from a very helpful blog by [Hendrik Erz].

  • 1 × Adafruit Feather RP2040
  • 1 × Adafruit DS3231 Precision RTC breakout (You don't need the STEMMA version)
  • 1 × Some kind of display. I'm using a 2" 320x240 TFT Display with ST7789 from Adafruit
  • 1 × Lithium battery of some kind that works with the Feather
  • 1 × 5 buttons

  • The beginings

    Jacob Han hour ago 0 comments

    Welcome to the start of my project. It's still really early days with large issues to figure out. For now, I want to give some details. As of posting this, here's what the breadboard layout looks like using Fritzing: (Display is using the EYESPI ribbon cable)


    There's definitely better ways to connect some of these parts together. My biggest one that I'd like to do is connect the STEMMA port of the DS3231 with the RP2040. It would remove some of the wire mess, and would free up two digital pins. The keen eyed might've also noticed that the backlight is just being powered with straight 3.3V. That is because I haven't looked too far into how to make a PWM signal for the backlight. My priority right now is getting the software working.

    On the UI side, the adafruit_buttons library is only for touchscreens, and it also makes searching for an alternative/guides for a non-touchscreen UI annoying. GUIs are something I haven't delved into creating from scratch before, so I've been working on my own idea while searching.

View project log

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates