jckarter

everyone already knows i'm a dog

the swift programming language is my fault to some degree. mostly here to see dogs, shitpost, fix old computers, and/or talk about math and weird computer programming things. for effortposts check the #longpost pinned tag. asks are open.


email
mailto:joe@duriansoftware.com
discord
jckarter

One of the fundamental security issues with USB is that any device can be anything; pretty much any device can hide a keyboard or other HID node to covertly take control of a computer it’s attached to. OSes these days take the brute force approach of throwing up a dialog every time you attach a device, but that’s annoying and we all just click through those dialogs anyway.

But what if the connector itself had to have some visible-to-the-naked-eye encoding, like color bands or a QR code, declaring what kind of device it’s allowed to be? Connectors could then have photo sensors that scan the marking and only allow USB nodes to attach corresponding to the marking. So you could look at a connector with your own human eyes and know what it's allowed to be. Then just put a little fiber optic line in the cable so the connector on the computer end can validate the codes and allow-list which devices are allowed to actually attach


You must log in to comment.

in reply to @jckarter's post:

I think they should have done this with 4 bits of mechanical keying: one for power delivery, one for USB2/3 data, one for AV altmodes (HDMI, DP, analog audio, etc.), and one for PCIe/thunderbolt. Devices capable of any of the later three categories would then have microswitches to detect an appropriate keying before enabling that mode, cables missing the wires for those modes would be impossible to plug in, and double-ended C-to-C cables would have 4 little Bowden cables to transmit the keying. My experience with USB mechanical tolerances suggests this would completely fine with no issues