26.07.2018 Views

hacking-the-art-of-exploitation

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

19 2 | 51 0 | 83 0 | 115 0 | 147 1 | 179 0 | 211 1 | 243 0 |<br />

20 3 | 52 0 | 84 3 | 116 1 | 148 2 | 180 2 | 212 2 | 244 3 |<br />

21 0 | 53 0 | 85 1 | 117 2 | 149 2 | 181 1 | 213 0 | 245 1 |<br />

22 0 | 54 3 | 86 3 | 118 0 | 150 2 | 182 2 | 214 0 | 246 3 |<br />

23 2 | 55 0 | 87 0 | 119 2 | 151 2 | 183 1 | 215 1 | 247 2 |<br />

24 1 | 56 2 | 88 3 | 120 1 | 152 2 | 184 1 | 216 0 | 248 2 |<br />

25 2 | 57 2 | 89 0 | 121 1 | 153 2 | 185 0 | 217 1 | 249 3 |<br />

26 0 | 58 0 | 90 0 | 122 0 | 154 1 | 186 1 | 218 0 | 250 1 |<br />

27 0 | 59 2 | 91 1 | 123 3 | 155 2 | 187 1 | 219 1 | 251 1 |<br />

28 2 | 60 1 | 92 1 | 124 0 | 156 0 | 188 0 | 220 0 | 252 3 |<br />

29 1 | 61 1 | 93 1 | 125 0 | 157 0 | 189 0 | 221 0 | 253 1 |<br />

30 0 | 62 1 | 94 0 | 126 1 | 158 1 | 190 0 | 222 1 | 254 0 |<br />

31 0 | 63 0 | 95 1 | 127 0 | 159 0 | 191 0 | 223 0 | 255 0 |<br />

[Actual Key] = (1, 2, 3, 4, 5, 66, 75, 123, 99, 100, 123, 43, 213)<br />

key[0] is probably 1<br />

reader@<strong>hacking</strong>:~/booksrc $<br />

reader@<strong>hacking</strong>:~/booksrc $ ./fms 12<br />

Using IV: (15, 255, 0), first keystream byte is 81<br />

Doing <strong>the</strong> first 15 steps <strong>of</strong> KSA.. at KSA iteration #15, j=251 and S[15]=1<br />

key[12] prediction = 81 - 251 - 1 = 85<br />

Using IV: (15, 255, 1), first keystream byte is 80<br />

Doing <strong>the</strong> first 15 steps <strong>of</strong> KSA.. at KSA iteration #15, j=252 and S[15]=1<br />

key[12] prediction = 80 - 252 - 1 = 83<br />

Using IV: (15, 255, 2), first keystream byte is 159<br />

Doing <strong>the</strong> first 15 steps <strong>of</strong> KSA.. at KSA iteration #15, j=253 and S[15]=1<br />

key[12] prediction = 159 - 253 - 1 = 161<br />

.:[ output trimmed ]:.<br />

Using IV: (15, 255, 252), first keystream byte is 238<br />

Doing <strong>the</strong> first 15 steps <strong>of</strong> KSA.. at KSA iteration #15, j=236 and S[15]=1<br />

key[12] prediction = 238 - 236 - 1 = 1<br />

Using IV: (15, 255, 253), first keystream byte is 197<br />

Doing <strong>the</strong> first 15 steps <strong>of</strong> KSA.. at KSA iteration #15, j=236 and S[15]=1<br />

key[12] prediction = 197 - 236 - 1 = 216<br />

Using IV: (15, 255, 254), first keystream byte is 238<br />

Doing <strong>the</strong> first 15 steps <strong>of</strong> KSA.. at KSA iteration #15, j=249 and S[15]=2<br />

key[12] prediction = 238 - 249 - 2 = 243<br />

Using IV: (15, 255, 255), first keystream byte is 176<br />

Doing <strong>the</strong> first 15 steps <strong>of</strong> KSA.. at KSA iteration #15, j=250 and S[15]=1<br />

key[12] prediction = 176 - 250 - 1 = 181<br />

Frequency table for key[12] (* = most frequent)<br />

0 1 | 32 0 | 64 2 | 96 0 | 128 1 | 160 1 | 192 0 | 224 2 |<br />

1 2 | 33 1 | 65 0 | 97 2 | 129 1 | 161 1 | 193 0 | 225 0 |<br />

2 0 | 34 2 | 66 2 | 98 0 | 130 2 | 162 3 | 194 2 | 226 0 |<br />

3 2 | 35 0 | 67 2 | 99 2 | 131 0 | 163 1 | 195 0 | 227 5 |<br />

4 0 | 36 0 | 68 0 | 100 1 | 132 0 | 164 0 | 196 1 | 228 1 |<br />

5 3 | 37 0 | 69 3 | 101 2 | 133 0 | 165 2 | 197 0 | 229 3 |<br />

6 1 | 38 2 | 70 2 | 102 0 | 134 0 | 166 2 | 198 0 | 230 2 |<br />

7 2 | 39 0 | 71 1 | 103 0 | 135 0 | 167 3 | 199 1 | 231 1 |<br />

8 1 | 40 0 | 72 0 | 104 1 | 136 1 | 168 2 | 200 0 | 232 0 |<br />

Cryptology 447

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!