Hacker News new | ask | show | jobs
by philpem 2676 days ago
I was just wondering about that as I read it... though the source code wasn't for SMP, it was for the program he'd used to encrypt the SMP source.

Apparently it's "a version of crypt(1) with some parameters changed"... the question of course is which parameters... and of course, what the key is...

With the algorithm and key unknown, it'd be a pretty hard problem to solve.

EDIT: Looks like there are three crypt(1) variants.

- An exact implementation of the M-209 from V6 UNIX: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/source/...

- A single-rotor Enigma-style machine from V7 UNIX: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd...

- A slight variation on the Enigma implementation: https://sourceforge.net/p/schillix-on/schillix-on/ci/default...

The M209 seems to be alphanumeric-only, and as the "source code" is binary, that'd rule it out.

Chances are, it's a butchered version of the Enigma algorithm.

Practically you'd need some known plaintext to recover the keystream. Even so, that wouldn't translate to the SMP source code unless you could find a weakness in the keystream generator.

The incoming password is hashed-and-salted by crypt(3) - so however long the password is, the "real" key will be 13 printable ASCII characters long (and the first two will be the salt).