notes.org 1.8 KB

Algorithm

The following is a description of the decryption algorithm by A-Man:

1-Open the file for reading and store what's inside into a variable (or stream it, whatever you prefer/have available). The content of the file is gibberish (because it's encrypted).

2-Skip over the first one hundred and twenty three characters and start going through all characters in the file. Since counting in computers starts from 0, this means you will start from the 124rd letter character (index 123).

3-For every character you go through, convert it to its ASCII code, subtract from it the ASCII code of the Nth character in the key "odBearBecauseHeIsVeryGoodSiuHungIsAGo" (yes, the letters are shifted because there is a caeser cipher step we can skip with using this shifted key).

4- N is an index in the key which keeps increasing for every character and restarts back to 0 when it reaches the end of the key.

-- https://lf-empire.de/forum/showthread.php?pid=198669#pid198669

To do [0/4]

  • [ ] manage to parse the whole stage.dat
  • [ ] write tests for things in the grammar
  • [ ] create useful accessor functions for parts of the parse tree of stage.dat
  • [ ] create procedures for writing data files