Codename Hardpass: A Password Manager on the Raspberry Pi Zero...suffering featuritis.
octetstream - 42.17 kB - 02/21/2016 at 17:25
Zip Archive - 4.05 kB - 02/15/2016 at 20:06
mockup in 1:1 scale, for component placement and shows gpio-pins in use
Zip Archive - 8.96 MB - 02/08/2016 at 07:23
So I might add proper ISO7816 smart card support to this thing now.
My reasoning is that if you were to lose your hardpass, the attacker won't be able to get hold of the (encrypted) private key. And since GnuPG Cards are supported by gpg (duh) and therefore pass, I don't have to implement my own crypto (which is basically the motto for this whole project).
There is a relatively old chip, the Philips/NXP TDA8029, that should be well suited to translate between the card's protocol and serial data. Someone has also written a driver for a reader based on that chip, and I hope I can adapt that one.
The SIM holder can easily obtained from AliExpress by searching for "samsung i9000 sim", and is originally from linkconn.
I managed to not use the backside of that PCB (which shouldn't really be an achievement to more professional designers), so I might fill that up with logos and text :D
The Smartcard I plan on using is the GNUPG card, and kernelconcepts.de sells one that has standard SIM size breakout tabs. (ordered already, but still in shipping **EDIT**: they came! man, a SIM card is huge compared to a Pi 0)
The board is already in the master branch of the github project.
**EDIT**: Now with primitive 3D model (FreeCAD). Yes, a standard SIM card is really that big compared to a Pi Zero.
Once I'll get my old boards from @oshpark and getting comfortable with smart cards in general, I'll continue working on this board.
Thanks to the ZeroPhone I was motivated to take some time and solder a board together.
It works! Now, I should take some more of my time to write some more software...
(please excuse the awful soldering job - I was out of flux and couldn't be bothered to order some)
The front. I managed to squeze the ESP completely under the PCB in the `30pin` branch of the git repository.
Since I don't want to sacrifice a Pi for each generation of the hardware, I opted to a header. The height is still tolerable even with the header and makes it about the size and thickness of a typical car keyfob.
Without said header, the thickness can be reduced to roughly 8mm board-to-board. Then, the case of the ESP12 touches the SD card slot. I guess, one could remove that, but I haven't tried. (and yes, my shitty caliper broke and I fixed it with duct tape)
The board from the bottom. I bridged the OLED module over like this, because I couldn't remember the pinout of my module, and a search on AliExpress revealed, that they all have a different one.
As you can see, there isn't much space between the header and the ESP. This is the order of soldering I recommend: start with the header, then solder the ESP and its resistors, continue with the OLED and bridge it over, and finally solder the buttons (put it in a vice or in a Pi).
Hello world! this is the (already working) menu. use `*` as the up arrow, `#` as the down arrow, and `0` to select. I want to make the numbers jump directly to the `n`th item in the list, but that's on the todo list (as well as button debounce :S)
So...I couldn't help myself and completely redid the PCB from scratch. The header should be aligned now (had to modify my footprint with the anchor in the center). For the 30 pin variant of the oled i had to remove one of the unused pins; we'll see if that works out. Something else that needs to be seen to be tested out is the slot for the oled's flat flex. It should be large enough to get one "wing" in at a time, but no promises :s
I shelfed the project for some time, but recently I have been working on it again. The 20-pin OLEDs aren't available on AliExpress any more (the last seller who claimed to have them didn't have them).
So I modified the PCB to take the premade assemblies / modules. (I do plan on modifying the PCB to take 30 pin OLEDs)
I also finally ordered some prototype boards from OSHPark (really streamlined ordering process, just upload the pcbnew-file)
On the top of the back side you see those solder pads under the screen header: While many OLED modules have 4 pins, all of them have different pinouts. I plan on soldering jumper wires to set the correct connections.
On this picture you can see all the components involved (except the .1" header and some resistors, which hvaen't arrived yet)
The one and only [Brian Benchoff] published an article on this project. I took this opportunity to update the GitHub repository, as I have completely neglected that one for way too long (will push later today/tomorrow).
This week I also did work on the PCB again: rerouted some tracks, repositioned the (previously misaligned) header, and added a footprint for an ESP-12 module. You can clearly tell that that is just bodged in by the way all the traces had to be routed. But I managed to stay on two layers, which reduces the price of PCBs massively.
(that should say ESP12E, not ESP12F - sorry)
UPDATE: Code and PCB files are now on a new GitHub repository: https://github.com/girst/hardpass-passwordmanager
The old one is there: https://github.com/girst/hardpass-sendHID
Last week I had some time to work on the OLED. All the resistors, capacitors and the breakout board finally arrived (they arrived about 4 weeks earlier, but to a different address) and I originally planned on directly soldering the flat flex onto the breakout board (and later the elongated pads on the PCB.
What I didn' notice in the Aliexpress seller's images was, that the flex is meant to be inserted into a connector, and has a thickend end. I tried to scrape it flat, but soldering it directly to the board was still impossible: the remaining height difference in combination with the solder resist was still to high. So I ripped an IDE HDD cable apart and tried to bridging this gap with bare copper wire. Which worked, but the .5mm pitch, in combination with a .5mm² wire made this procedure very short-circuit-inducing. So I finally gave up and bought the slimmest FPC connectors i could find. No datasheet though - so again it will be trial and error getting those to fit. I'll probably leave the (extremely) elongated pads there, so I can freely position the connector on the first PCB prototype. (the strain relief pads wont be soldered; maybe I'll glue them)
(i had to write something down - otherrwise this project would become completely dead. it isn't that I don't want to work on it - but i have most of my stuff 300km away, and when i am there, friends and family also cant be neglected)
I have made the PCB files! For now, I have removed the ESP8266, because I want to get this thing up and running. Before I send them off, I want to wait for the passives for the OLED, so I can test things out on my spare screen.
The routing is probably awful, but this is the first PCB I designed.Also, the pads for the 6mm tact buttons extend to the edge of the board - let's see if they come out working :S
When I tried the fit of the components I have already on a paper printout, I noticed the header pins were a little off in respect to the Pi.
Soldering the 5mm pitch of the OLED will be a challenge, but this 20 pin version of the screen is the only one that can be centered on the board (the pads of the header connector are in the way with the 30 pin version).
i started working on the pcb. i still haven't decided if i want to do the rf-signaling myself or use an esp-module, but here it is:
the screen i ordered is an .96" 20-pin ssd1306 from alibaba and should only need those two passives (we'll see about that one)
the crystal is also not finalized, and i will have to move the esp closer to the antenna.
i plan on "surface-mounting" regular through-hole headers on the bottom side and trimming them short before soldering them through the raspberry.
so....I want to use this project to learn about PCB design, as I have never done this before.
The question now is, should I use an off-the-shelf ESP-XX module or burn myself trying to make my own RF circuits? If so, what antenna should I use (ceramic, pcb)?
questions over questions that revolve un my head...
If you know anything about this stuff, please let me know!