Script started on Thu May 09 21:42:40 2002 [kirbysdl@dagwood hwk6]$ ./main hw6ci2002pico 2test./main hw6ci2002 Public knapsack: a=[638 2108 1914 472 1277 2138 505 1039] Sum(a[i])=10091 mu (number of bits needed to represent the above sum)=14 There are 22 blocks of ciphertext Ciphertext (these blocks are called B below): 2149 4320 5667 4718 4392 8176 8309 3147 3459 5834 7034 4023 4702 8309 6428 5597 6873 6306 6810 4806 8075 8414 *** Intervals Determined by 2 Public Knapsack Lengths *** [0.0360531 , 0.0360605] [0.0721063 , 0.0721126] [0.108159 , 0.108163] [0.144213 , 0.144213] [0.195925 , 0.195928] [0.231975 , 0.231981] [0.268027 , 0.268034] [0.30408 , 0.304087] [0.340133 , 0.340138] [0.376186 , 0.376188] [0.4279 , 0.427901] [0.46395 , 0.463954] [0.5 , 0.500007] [0.536053 , 0.536061] [0.572106 , 0.572113] [0.608159 , 0.608163] [0.644213 , 0.644213] [0.695925 , 0.695928] [0.731975 , 0.731981] [0.768027 , 0.768034] [0.80408 , 0.804087] [0.840133 , 0.840138] [0.876186 , 0.876188] [0.9279 , 0.927901] [0.96395 , 0.963954] *** Intervals Determined by 3 Public Knapsack Lengths *** [0.0360531 , 0.0360605] [0.0721063 , 0.0721126] [0.108159 , 0.108163] [0.144213 , 0.144213] [0.195925 , 0.195928] [0.231975 , 0.231981] [0.268027 , 0.268034] [0.30408 , 0.304087] [0.340133 , 0.340138] [0.376186 , 0.376188] [0.4279 , 0.427901] [0.46395 , 0.463954] [0.5 , 0.500007] [0.536053 , 0.536061] [0.572106 , 0.572113] [0.608159 , 0.608163] [0.644213 , 0.644213] [0.695925 , 0.695928] [0.731975 , 0.731981] [0.768027 , 0.768034] [0.80408 , 0.804087] [0.840133 , 0.840138] [0.876186 , 0.876188] [0.9279 , 0.927901] [0.96395 , 0.963954] *** Intervals Determined by 4 Public Knapsack Lengths *** [0.0360531 , 0.0360605] [0.0721063 , 0.0721126] [0.108159 , 0.108163] [0.5 , 0.500007] [0.536053 , 0.536061] [0.572106 , 0.572113] [0.608159 , 0.608163] *** Intervals Determined by 5 Public Knapsack Lengths *** [0.0360531 , 0.0360605] [0.0721063 , 0.0721126] [0.108159 , 0.108163] Max_A is: 2138 Our interval: (0.0360531, 0.0360605) M w w^-1 s ----- ----- ----- ---------------------------------- 2413 87 1470 7 8 21 43 101 205 501 1112 3356 121 2413 10 12 30 60 141 286 697 1547 3883 140 1470 11 12 33 69 162 329 806 1789 4299 155 3356 13 16 39 77 181 367 893 1982 5131 185 943 17 24 51 93 219 443 1067 2368 5242 189 4299 16 20 48 94 221 448 1089 2417 5353 193 1470 15 16 45 95 223 453 1111 2466 5769 208 2413 17 20 51 103 242 491 1198 2659 6074 219 943 20 28 60 110 259 524 1263 2803 6185 223 5242 19 24 57 111 261 529 1285 2852 6296 227 3883 18 20 54 112 263 534 1307 2901 6823 246 1470 19 20 57 121 284 577 1416 3143 7017 253 943 23 32 69 127 299 605 1459 3238 7128 257 6185 22 28 66 128 301 610 1481 3287 7655 276 3356 23 28 69 137 322 653 1590 3529 7960 287 943 26 36 78 144 339 686 1655 3673 8071 291 7128 25 32 75 145 341 691 1677 3722 8182 295 2413 24 28 72 146 343 696 1699 3771 8293 299 1470 23 24 69 147 345 701 1721 3820 Using this secret knapsack to decrypt: 7 8 21 43 101 205 501 1112 omega:87 m:2413 Values of t, where t=(Bw)mod m: 1162 1825 777 256 850 1890 1396 1120 1721 828 1469 116 1277 1396 1833 1926 1940 871 1285 673 342 879 Plaintext bitstream 10010001100001111011011001010100000111100111011111110101010000011000101100101110010111011100100000111001111101011100011110001111001011110011111001111001101110101110110001111110 Plaintext: Have you been successful? [kirbysdl@dagwood hwk6]$ exit script done on Thu May 09 21:42:45 2002