Page 1 of 1

Universal Second Factor (U2F) USB Key Device

Posted: Wed Mar 18, 2026 8:42 pm
by BenLunt
I recently came across QEMU's U2F emulation and decided to give it a try. I haven't seen anything about U2F here in this forum and a quick search doesn't bring anything up either, so I thought I might just point you to a brief article I wrote.

If you already have a working USB HID driver, it actually is quite simple once you know how it works. I started out with the older specification, not knowing there was a newer one, and couldn't figure out why I couldn't get it to work. Once I went through the emulation source code, which didn't match the specification I was reading, I figured there had to be a newer version, and so there was.

It uses the USB HID Interrupt pipe to transfer data using 64-byte frames. Each frame has a 5- or 7-byte header while the Message Command then has another 7-byte header.

It was quite interesting to work with. I have a working driver, but will need to read up on ECDSA to figure out exactly what data is returned.

There is also notes in the specification about "cheap devices". I think I might look for a "cheap device" and see if I can get it to work on physical hardware.

Anyway, just thought I would comment since I didn't see anything about U2F here. (If I am wrong, please point me to the post)

Thanks,
Ben