3 ms·
A while back I looked into building my own hardware two factor key. I wanted to experiment with the technology. I've since backed off the idea due to several se
by dpeckett 9y ago
A while back I looked into building my own hardware two factor key. I wanted to experiment with the technology. I've since backed off the idea due to several serious challenges with designing secure hardware for this purpose.
* By necessity there's a pretty large attack surface, you've likely got a vendor specific bluetooth stack and coprocessor. The same goes for wired solutions with hardware USB peripherals (though atleast significantly less complex). Being sure the hardware peripheral doesn't have any major memory safety issues is a complete bear to test, and that's not even touching on sidechannel analysis.
* Running public key crypto on microcontroller (excluding specific hardware crypto support) is a little more novel than a desktop machine, the leading libraries are no where near as extensively battle tested. And there's architectural concerns about sidechannel attacks and often the lack of any memory protection units (bigger chips solve these issues, but power budget concerns are tricky).
* And given all software has bugs, how do you update the firmware? Signed firmware patches as part of driver update? Who's to say somebody hasn't already owned your bootloader.
I think the solution to all this, is to abandon the idea of additional hardware, what if your smartphone could act as a two factor hardware token over Bluetooth? The big problem is pairing really, and how to make this an easy process for users, I never figured that out. On the other hand I did come up with a scheme that would allow usb based hardware tokens to work without additional drivers / software and on all current major operating systems and browsers. I really ought to work on it, but as above I don't trust embedded hardware (embedded hardware is such an antithesis to, move fast and break things).
- bri3d 9y agoHow'd your scheme work? I suspect HN wants to know ;) A lot of hardware just acts as HID keyboard, but that only works one direction unless you use a side channel like visual (QR code like TOTP and/or camera like the Bloomberg unit). I think the Bloomberg auth units are some of the most advanced examples of this - they're protected against almost any imaginable physical attack, too (freezing memory state, power sidechannels, xray/delidding to dump mask ROM, etc.) But they have a lot of money to spend on it...
- dpeckett 9y agoBroadly based on abusing USB ethernet and browser origin policies. Relies on the fact browsers are used to treating the network layer as a hostile environment.
- tptacek 9y agoThe Yubico and VASCO tokens aren't simply doing RSA on a microcontroller; they're using parts that probably provide hardware RSA.
- dpeckett 9y agoYeh it's a coprocesser arrangement for sure these days. Probably the only way to do it remotely safely, sure doesn't provide a ton of flexibility though and definitely adds to the total BOM cost for the devices.
- jo909 9y ago> I think the solution to all this, is to abandon the idea of additional hardware, what if your smartphone could act as a two factor hardware token over Bluetooth? I'm glad my hardware security token is not running a full smartphone OS updated only with delay and for a few years until the vendor wants me to buy a new one, does not connect to public wifi and mobile networks, won't run games and other third party software, does not break after falling from waist height.