As task there was only this source code:

The solution

So we see how the encryption and decryption works. genTables(seed="..") generates a sbox and its inverse and we got a bunch of encrypted texts.

To decrypt these textes we wrote an analyzer script, which calculates possible pad values for the decryption function to produce only printable charactes for all strings.

dhe difference;b(;weDnCswupidity a&d g}$iustis8thatmgenius hap~itsil3m5tF{b.b2rtpQ/nunkso @o to Heaven f'r~;hevc0i}ate, HellGforFahe Gomaany-mMark Twai9 ) am not a mem_efoofva+yTorganizedGpolMaica% pyrty.mI am a De~Jcra:-mW5lqy43peYs ky definition 'f~@n in*erlectual iC soQ,onetwh6 canmlisten toQ,he Qinl5aZy(k.lzOvOCcuYwZ [7d+|c6t9M>.R9=J5bFC?,guJh!cc@$@| E3\q(YmqcYehxx
8epublicans waRt~5esY Eo"ernment f{r t0, sa/e LeasoN criminalp~wan: ne0s\$NhR-zAn</KmNsH )f there are n' T;upidCq.estions, OhenFohattki[d ofmquestionsQZo s:u)iZ _SNh.ezas&:~DN vy,oF(bc6S=t:eK(p\z_-OFlKp[Ir4,c1!Gm4*qcPh]jfal|.uTY$_Nw}
Knd now, in th0 9tte"eQtTof equal OimevCher< iw a mLssage fro~~theiNIt5o<Yst^n%ti2Scex]'?4_eaHYtS7F4eK%%&)z,9q,wQIb9RiBIG<Ks(zWpRz2-(N_|NGfN%clRa"FY R

The output of the script was more or less readable, but not completely correct. So we added a possibility to define some characters of the plaintext which leads us to the key: MY key for you is {And yes the nsa can read this to}