Journal · Building in the open

The USB-C had the wrong number of pins

The PHYLAX prototype in its white case, connected over USB-C and asking for a PIN on a scrambled keypad
Plugged in either way up, and asking for a PIN. The keypad order is scrambled on purpose.

In Update 13 we reported that the device would talk over USB with the cable one way up and not the other, and guessed the connector was at fault. It was. The part we had chosen simply does not have enough pins.

A wired-only hardware wallet has exactly one interface to the outside world. There is no Bluetooth to fall back on, no Wi-Fi, no card slot — so the USB-C port is not one feature among several, it is the whole surface through which the device can be reached at all.

Nine pins is not enough pins

A USB-C plug is reversible because the receptacle is symmetrical: the important signals appear twice, once on each side, so whichever way round the plug goes in, the board still finds them. That includes the data pair. A full receptacle carries two D+/D− pairs, and a board is meant to join them together so it does not care which one the cable lands on.

Cut-down USB-C receptacles are sold with fewer contacts, and the ones they leave out are the duplicates. The 9-pin part we had fitted brings out power, ground, the two configuration pins and only one data pair. Plug the cable in the way that lands on that pair and everything works. Flip it over and the data lines arrive at contacts that were never fitted. That is the whole bug — not signal integrity, not firmware, not the controller we moved in Update 12. Missing metal.

So we changed the connector

The board now uses a 16-pin USB-C receptacle, which brings out both data pairs, and the two are joined on the PCB. Either orientation now lands on a connected pair. It is a slightly larger footprint and a slightly more expensive part, and neither of those is worth arguing about for a device whose only port has to work every time.

It asks for a PIN now

With the link working in both orientations, the device gets far enough into its own firmware to run a real screen: the photo above is a prototype in its case asking for a PIN. Look at the keypad — the digits are not in their usual order. They are shuffled every time you are asked. Somebody watching your fingers, or reading the wear on the buttons later, learns the shape of your movement and nothing about your PIN.

Why one port has to be perfect

Choosing wired-only removes a lot of attack surface, and we would make the same choice again. What it does not remove is the consequence: when the single connector is wrong, the device is not partly degraded, it is unreachable. A nine-pin part that works in one orientation is exactly the kind of fault that survives a quick bench test, because the first person to plug it in has a fifty per cent chance of never seeing it. That is the argument for the more expensive sixteen-pin receptacle in a sentence — on a hardware wallet with one door, the door has to work every time, both ways up, for years.

Three updates ago the honest headline was that USB did not work. It works now, both ways up, all the way to a screen that wants a PIN — and the cause turned out to be the least glamorous thing on the bill of materials. That is usually how it goes.

← All updates Subscribe for updates