UFC-crypt or how my code ended up in your Linux box

Back in the dark ages, I read the papers analyzing the Morris Internet Worm. In order to protect my employers systems, I wanted to do proactive password cracking.

This, however, was painfully slow. A SUN 3/50 could do some 5 password checks a second. This was because the Crypt(3) function does 25 slightly modified DES encryptions using the supplied password as the encryption key.

The number 25 had been chosen to make things slow on the machines available back then. The designers did the mistake of choosing a very slow DES implementation. They should have used an optimized one, doing 1000 iterations.

Optimized Crypt implementations had been made but they were only available in closed security research/hackers circles. So I set out to write my own one. Continue reading