Final Project: Secret Sharing USBs

Joel Gustafson


For networking week I made a chain of secret sharing serial nodes that stored strings securely. It was fun, but not quite satisfying: I only had 512 bytes of storage, and needed a hacky terminal script to interact with them.

After first planning on making a projector flashlight, and then pivoting to a magic chess board, I switched courses again to make a better secret sharing device - one that worked over USB, and without any special software.


I got ten male and female USB-A connectors from Digikey, and picked the ATmega32U4 as my microcontroller (due to its native USB support), with an 8MHz external crystal, two LEDs, and a slide switch on the side.


The plan was to use LUFA to write a USB Mass Storage driver that writes to the 32Kb flash memory of the ATmega32U4 (via self-programming routines in the bootloader). That way the first node in the chain would impersonate a mass storage device to the host computer, and talk to all the downstream nodes over serial or I2C. The internet told me that it was technically possible, even though I'd only be left with few kilobytes of usable space after the FAT partition tables.

Nothing worked :-(

I spent 20 hours debugging the LUFA code and poking at similar examples, but couldn't get the host computer to recognize the node as a mass storage device. I think the next step is to back up, add a normal IC flash chip, and get the demo LUFA example working with that board.