Thursday, May 29, 2008

SolderNPlay technology...

My PC was becoming more and more crashy lately (I use Linux, normally once its up and running, it never crashes by itself), and was getting progressively worse, to the point that i had to disable all power saving features (apm, acpi, and hlt) as temporary remedy. When it crashed today, it was one crash too many, so i took pc apart and inspected motherboard more closely...
Not surprisingly, I found 5 suspicious-looking electrolytic capacitors near CPU.

3300uF 6.3v , 10mm diameter, slightly swelled tops (only visible when you take motherboard out from case, and look from side), manufactured by "OST ".
Same crapacitors removed from board:
(timeline: i bought replacement first, then removed bad caps)

Thats a common problem. Good article on the issue. With little googling i found OST="Taiwan Ostor Corporation", known crapacitor manufacturer.
Rule of thumb: if you have a chance to look at motherboard before buying, don't buy one with capacitors manufactured by unknown brands. Big Japanese-brand capacitors are good.

With more googling, i found this immensely useful page with list of suppliers:
, found closest shop (I am in Lithuania by the way, and that was . Very nice shop in Vilnius, with nice people). Bought replacement capacitors (with big manufacturer, Matsushita), unsoldered old ones, and soldered in replacements. Solder-n-play technology.

Took about two and half hours from crash to end of repair, including finding local shop and walking there. Sorry, no photos of finished board yet. My camera ran out of charge and I simply couldn't wait to check my fix :-). I can photo it later.

BTW. Interestingly, bad caps also feel very lightweight for their size. I think all the electrolyte have evaporated. I shall do autopsy...

Some guidelines on repair, for those who came here from google search:

Before you start:
Check your skills. I used to build various nice devices back in school days, and repaired relatively low tech things like radio and tv.
I wouldn't recommend capacitor repair to someone holding soldering iron for first time, unless its "repair or toss away" situation... Also, if you have some hi-tech device that you don't mind breaking irreparably, you can practice soldering and unsoldering capacitors on it.

Finding what to replace: Look for any capacitors whose tops look even a tiniest big swollen or a tiniest bit leaky. If one capacitor is bad, its good idea to replace all capacitors with same specs. Those are very likely to be bad too but not visibly so.
The problem with testing electronics by looks is that, often, failed capacitors look same as good ones.

Buying replacement: Replacement must have same or higher max voltage, same or higher capacitance (if higher, by reasonable amount of course, say, 2x should be allright. Higher values will increase charging time on startup), same or lower ESR (effective serial resistance), must fit in available space. At least 105 degrees Celsius max temperature (you will overheat leads while soldering; also higher max temperature translates into longer lifetime at your pc's temperature).
Choose big, known Japanese brand manufacturer. Even though they too make it in China, they usually use proper chemistry, unlike small companies.

What you need:
Steady hand.
Replacement capacitors. (get them before unsoldering anything)
Small wire cutter.
Soldering wire, alloy (the one i used is 70% tin 30% lead , if i recall correctly).
Soldering resin (or use soldering wire with resin core).
Soldering iron, any reasonable sized one will do. Something to keep iron on.
Optionally, solder sucker aka desoldering pump.
When you remove bad capacitor, the hole fills with soldering alloy, and you cant insert new one. You have to heat up the hole while trying to push through capacitor from other side. Which is difficult with thick multi-layer boards. I did that without soldering pump, but it was pain in the ass. I did heat up the hole from one side with tip of soldering iron, while pushing capacitor leads into hole from other side.

It really doesn't matter if you use properly grounded equipment or not, all that matters is that everything is at same potential (otherwise motherboard may be ruined).
Connect the soldering iron to common "ground" on the motherboard, using wire. You can unscrew a little screws on any port (parallel port, or serial, for instance) and use it to attach wire. Actually you can see that on photo above. After you connect, check with multimeter that tip of soldering iron got small or zero resistance to "ground" pins in power connector on motherboard, and that resistance between soldering iron tip and soldering iron mains is infinite.
This will save motherboard from being ruined by things like tiny leakage current from mains to the soldering iron. Connect yourself to that common ground. Ideally through resistor (in case your soldering iron begins to leak mains onto tip as you work).

If you are not familiar with basics of soldering, read tutorials and practice first, dont try to replace capacitors as your first soldering experience. Its not easy.
Don't forget about polarity(!). It is very important. If you wire polarized capacitor backwards, it will blow very soon. Theoretical physics types forget it all the time.
Avoid pushing soldering iron hard and at all cost avoid slipping soldering iron over board. Computer boards typically have hundreds of hair-thin tracks everywhere, and if you accidentally cut one, it'll be very difficult to fix.

Tuesday, May 27, 2008

A comment on so called "quantum cryptography"

I've been reading a lot about cryptography lately, and naturally, came across many "quantum cryptography" related discussions. Both proponents and opponents miss something really obvious. "Quantum cryptography" is a kind of *physical security*, not really a kind of cryptography.
Lets simply compare quantum cryptography(QC) hardware & maintenance of said hardware with one time pads (OTP) that you buy from someone. You can see that all the risks of one time pads apply to quantum cryptography. Attacker can copy pads, you say?* Attacker can modify quantum hardware on the way to you just as well, with modifications ranging from smart changes like removal of filters and other protection so that attacker could send pulses along the cable and deduce state from reflection, to trivial replacement of firmware with one that doesn't care about quantum stuff and just uses some stream cipher with key that attacker knows. Bad crypto looks exactly like good crypto.
(*which requires opening hard drive in the cleanroom if its single-read hard drive.)

In both cases security boils down to physical security and trust in potentially malicious third party. Physical objects have to be physically produced and delivered (QC hardware or those hard disks with one time pads) which you need to physically protect from attacker (there's really a lot of ways how QC hardware could be modified to make it insecure). In both cases you need to trust manufacturer that it isn't complete snake oil. In both cases you rely on armored truck delivery. 
With quantum cryptography theres far more extra risks though. Man in the middle for instance. Or flawed implementations. Working with single photons is hard, naturally you can expect that almost all working solutions use many-photon pulses that can be trivially eavesdropped on. Keep in mind that the crypto hardware manufacturer is not just some neutral third party. Its a company which would any time choose to use cheap fake stuff over real if they can get away with it. So far, crypto hardware manufacturers can get away with anything.

The crucial difference: quantum crypto is thousands times more expensive to deploy and maintain than one time pads. 

Quantum cryptography is indeed just fiction now. It does not solve any existing real problems, and it could not improve security comparing to normal one time pads. It is really interesting academic thing, but not a solution to any existing problems.

Standard, mathematical cryptography, with (for example) Diffie-Hellman key exchange, public/private keys,  and things like that is far more secure than either QC or OTP. Source code is not a black box with high precision optics (or snake oil) inside, it can be reviewed. You can even do key exchange entirely "by hand" using email and Mathematica or similar package, if you don't trust cryptographic libraries. You can use really bigass exponent sizes if you worry about new methods. 
(And if one is worried that general math functions in Mathematica have backdoors, well, better to put on tinfoil hat, disconnect from internet, and make computer starting from sand, with own software).

Snail photos

Not really technology related in any way... photos of a tiny snail i found on groceries. Its sitting on glass. To get the exposure right i had to put several layers of paper over camera's flash, and take a lot of photos to get few good ones. After photographing i released snail in park. No gastropoda has been harmed during production of this blog post :-)