The task
As task there was only this source code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
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+|c6t`9M>.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
kY key for you;iTo{AAdCy]s the nsaGcanFdeadtth>s toA
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}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|