Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your approach is quite correct. If we assume that it is a 16 byte block encryption and that it indeed is a xor code you can proceed as follows (note all calculations are done modulo 2):</p> <ul> <li>The input block is 128 bits and output block also</li> <li>Encryption can be done described by a 128x128 binary matrix E: out = e(in) = E*in + e(0)</li> <li>Each row in E basically tells you which bits will be flipped in output if you change the corresponding bit in the input.</li> <li>You can get E and e(0) using your approach and set one bit each and calculate the output. Thus you get matrix E row by row, i.e. you need 128 input values to gather the complete matrix. e(0) is simply encoding of the zero-string.</li> <li>The decryption is then defined by d(out) = D*(out-e(0)) with a matrix D.</li> <li>If we plug together both we get in = d(out) = D*(E*in+e(0)-e(0)) = D*E*in. </li> <li>Thus we have to calculate the binary inverse of the encryption matrix E. There are known algorithms for this problem (see e.g. <a href="http://en.literateprograms.org/Binary_matrix_%28Java%29" rel="nofollow">http://en.literateprograms.org/Binary_matrix_%28Java%29</a>).</li> </ul> <p><strong>Edit:</strong> I checked whether the example you gave fits into the assumptions. If it was a plain XOR code we would have XOR[1st line, 2nd line, 3rd line, 4th line] = 0 on input and output. Same for XOR[1st line, 5th line, 6th line, 7th line] = 0. In the limited data provided it holds true for all bits but the first 8 in the output (which does not tell much since only few bits are affected anyway). Unfortunately I cannot tell you more at the moment with such limited data available.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload