Hacker News new | past | comments | ask | show | jobs | submit login

You should use a data blocker when using an unknown USB cable to charge your phone. Occasionally described as a USB condom.

Simply a Male to Female USB adaptor with the data wires not passed through.




Is that USB-PD compatible?


The "USB condoms" I know are USB2/3 only which means there isn't any form of PD negotiation anyway, and the oldschool Qualcomm Quickcharge and Apple's negotiation won't work either as these depend on D+/D-.

A decent USB-C condom would also have to cut not just the USB2 D+/D- line, but also the USB3 SS and SBU lines... the really interesting thing is the CC wires, since without these you can't have reversible connectors, but not cutting them leaves an avenue for attackers (e.g. putting an USB-C port into JTAG mode). And on top of that USB-C PD 1 used the Vbus line with an overlaid HF signal.

That means a decent USB-C condom will need:

- a low-pass on the Vbus line to block PD1

- cut D+/D-, SS, SBU

- cut CC1/CC2 and insert an as-dumb-as-possible controller chip to handle plug orientation


What I hear from you is that a decent USB-C-condom needs to be a smart "MITM" device that has sufficient internal logic to proxy the power negotiation between devices at both ends.


You don't need orientation handling if you've cut all the other signals, so...

Power negotiation is also not a big problem. Just use a correct resistor on the CC pin and you can make the phone use up to 5V/3A, which is plenty for any smartphone. You'd have to make sure to use a 5V/15W capable power source, though.


> You'd have to make sure to use a 5V/15W capable power source, though.

... which precisely is something I cannot make sure on a device where I'm tempted to use a USB condom, and it won't be useful at all for laptops.


I actually learnt a lot from these comments, so my thanks - USB-C is still just a mirrage on the horizion for me, so not something I have considered deeply.


So use Sink.Default instead, and live with 5W, that all USB power sources support.

Security is inconvenient.


I have not seen one that is. You can block data access and revert to USB 2-level power "negotiation" with a couple of passives and that is all I've seen anyone do.

I did look into designing one a few years ago. The PD negotiation is quite complicated (and is done through the signaling lines, so you have to manipulate them yet block all other uses).

That was early days for USB C -- there may be better chip support for doing that today.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: