encryption - Find the value used for XOR -
i have initial address , output .. need find out used xor
129.94.5.93:46 xor ????? == 10.165.7.201:14512
xor has interesting property if apply 1 of operands , result, other operand back. in other words, if
r = ^ b then
b = r ^ where a , b operands, , r result.
hence, info original has been xor-ed is
139.251.2.148:14494 here short programme in c# produce result data:
var = new[] {129,94,5,93,46}; var b = new[] {10,165,7,201,14512}; var c = new int[a.length]; (int = 0 ; != a.length ; i++) { c[i] = a[i] ^ b[i]; console.writeline("a={0} b={1} c={2} back={3}", a[i], b[i], c[i], c[i] ^ a[i]); } here link ideone showing programme in action.
encryption xor
No comments:
Post a Comment