Thursday, November 27, 2014

FMod - Cryptographic Signature

I'm on Thanksgiving break now, and in my breaks between being thankful, I made a serious push toward the release of Abiathar v2.2. The really hard parts - the actual manipulation of music and sound - have been done for a few weeks. Today, I finished up the smooth-upgrade routine for this version, which copies the new portions of the dependency file from defaults.aconf. (It was a lot easier than I expected.)

So, I did something kind of unusual. I decided to add a means of crypto-signing the levels, which writes an encrypted hash of the main level data to the no-op zone of the gamemaps file. That way, the game can load the file without getting confused and Abiathar can do whatever it wants. The certificates for level signing will be distributed to noteworthy people in the community. Matching public keys will be placed in my public Dropbox so that the hashes can be verified.

The purpose of this setup is to let people know who modified a level set last - whether it has been modified from its original version, say, by a mirror host. It is not copy protection or edit protection; anybody is free to open a signed dependency file and save it. If they modify it, however, the signature will become invalid - or the signature of the modifier, which is easy to detect. Therefore, it can't be used to see whether somebody had the original idea for a level, just who modified it last, which can prove that it was not modified from the state intended by the last author.

I call it VeriMaps, and it's nicely integrated into Abiathar now. It looks for a VeriMaps private key file in the current directory and will use it to sign saved levels once a menu option is checked. (Hashing and signing are somewhat expensive operations.) The signature state is always displayed in the status bar. It indicates whether signing is in use, who the signature purports to be from, and whether it is authentic. (Authenticity is checked by downloading the appropriate public key from my Dropbox, all automatically.)

Finally, I thoroughly tested the audio management on all three supported episodes. It worked great on Keen 4 and 5, but I got a patch offset wrong for Keen 6. After fixing that, everything seems good! v2.2 will hopefully come out tomorrow.

No comments:

Post a Comment