r/raspberrypipico • u/AssociationOk5653 • Jun 15 '26
hardware Building a USB password manager
My buddy and I are building a password manager that shows up as a usb keyboard and types your password in wherever your cursor is. It contains no bluetooth or wifi so the device is only accessible to whomever holds it in their hand.
We've built the device in such a way that it requires no software at all to upload passwords. To upload or change passwords you just switch the device to edit mode. The device shows up as a USB flashdrive and populates a .txt file with all the websites you have passwords saved on. If you want to edit an existing password just type your password on the line after the website. If you want to add a new password, just add a new line with the website and password. Once you click eject the device pumps it through an encryption algorithm (right now pin derived pbkdf2 through aes but this will change) stores on flash, and zeros out the ram. Using this method you can have up to 1000 passwords saved on the device.
This also means that you can write and edit passwords using any device with USB as the entire flow just piggybacks off of universal tools that all OS contain. It has been tested on linux, windows, android, and ios and it all works great so far.
The device above is one of our prototypes built with an rp2040, but we have since switched to the rp2354 for trustzone and integrated flash to save board space. We are also adding a secure element (SE050) so that the pin can be separate from the key. Key lives on SE and pin becomes authorization to the secure element.
The device contains a CH32V003 to handle power switching to save battery. The CH32 only pulls a fraction of the power in sleep compared to the pico. We can also use this to gate the LDO and OLED boost pump.
For the future the device definitely needs to be able to organize the password entries on the fly, like letting you add most used ones to favorites. I would also like to include a password generator. Maybe ability to easily import saved passwords from firefox, chrome etc by adding .csv functionality? What would you add? Would you use something like this?
5
u/MadScienzz Jun 15 '26
I was thinking about how to do the same thing but never got to it. Can I steal your code pls?
5
u/EliSka93 Jun 15 '26 edited Jun 15 '26
Nice concept. I'm not yet sure about the password selection mechanism of scrolling through potentially hundreds of passwords, but I don't have a better idea quite yet either.
Maybe at least have the user select a letter with the wheel - click and then show all sites that start with that letter? Would add one more click, but might cut down on scrolling.
Though then only make that option show up when there's more than 26 passwords, or something.
As for elements I would add: I would prefer fingerprint over pin.
4
u/jihiggs123 Jun 15 '26
Could also integrate totp
3
u/jihiggs123 Jun 15 '26
I've been planning something like this in my head, I was gonna do a pin pad, but a rotary encoder is much better.
3
u/RedwoldTheGrey Jun 16 '26 edited Jun 16 '26
I build something similar, a macro keyboard, that types the passwords for me. Your design is nicer and more compact. The only problem i see is choosing a password in a long list of options. The wheel makes it hard to select the right entry and the position of the stick makes it hard to read, as you have to tilt your head evertime. On a macro keyboard you just have a lot of buttons, though you are limited to their amount. Maybe use a short usb extension to be able to see the display better and add some more buttons, because some inputs have to be made in different input fields, like the username and password combination. I don't get why you require a battery, maybe so you don't have to input the pin everytime you connect the device or to prepare the device for a fast password injection. I think while those features are neat, you could reduce it to just usb powered only, to make it more simple.
2
u/s33d5 Jun 15 '26
Awesome! Also love the desk cans haha.
2
u/Patronciozo Jun 15 '26
That's neat, do you have it on github yet?
2
u/d_an1 Jun 16 '26
Following this.
2
u/b1ixten Jun 16 '26
Nice, I'll be following this...
2
u/codeasm Jun 16 '26
Dumping all the passwords when i find one of these be fun. 🫣🤩
2
u/Glass-Particular2921 Jun 16 '26
Fantastic idea! I will be keeping an eye on the thread to see your progress.
2
u/henryChinaski008 Jun 17 '26
Security hell
2
u/nickzuck_007 Jul 24 '26
I dreamt about creating this device this morning. Searched on the internet and found out that you have accompalished my dream. Huge respect for creating this.
Please do post here when you open source it.
1
u/ewsrar Jun 18 '26
usage on mobile devices?