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

Didn't the Unix version have some interesting encryption going on w/ the saved game file circa 1984 +/- 1y?

IIRC it folded in: - the players uid and - the files inode

To prevent the file from being usable by other players, and preventing the user from making a usable copy of it...






Right, the point of being able to save a game was to pick up later where you had left off. However, the game attempted to prevent you from restarting from a saved game if you made a mistake or got killed or something.

I think the scheme was fairly clever but it wasn't terribly sophisticated; nothing like public-key crypto for instance. It did have a number of countermeasures that attempted to prevent cheating, such as restarting from a modified save file. For example, I believe it hashed all the bytes of the file, plus a bunch of metadata -- possibly including the uid and the file's i-number, as you suggest -- and also things like the file modification time and maybe even the i-node change time. Then it would write this hash back into the file. I seem to recall a bit of cleverness to avoid problems because writing the hash could potentially modify things like the file modification time. Maybe it just retried until the modtime didn't change. Not too difficult since the granularity was one second.

In principle this is easy to defeat if you know the hash algorithm, and if you knew how to use the Unix system calls to change a file's modification time. Since the original rogue program was closed source, the hash algorithm was secret. But eventually somebody reverse-engineered it, and programs emerged that were able to successfully copy save files.




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

Search: