Page 1 of 1

Didactic XOR Cipher

Posted: Sun Jan 24, 2010 6:52 pm
by zero0cripton
is there any chance that the site is not working well? i think that i have figured out the answer and still it won't let me go through. Can anyone send me the answer on a PM or just give me some tips on this?

Posted: Sun Apr 11, 2010 9:43 pm
by yushun
remember the base format

Posted: Sat May 15, 2010 3:40 pm
by Masti6
I don't get this one.
XOR is something between AND and OR, right? Then how do I XOR something. I can't just OR / AND something into something else can I?
I'm so damn confused.
Someone explain the basic trick for XOR'ing(?) so I could figure it out myself. Thanks in advance.

Posted: Sat May 15, 2010 4:02 pm
by CodeX
If you don't understand something you really should resarch

Posted: Sat May 15, 2010 4:45 pm
by Masti6
Oh I've done my Researches. I just can't figure out how to use it in this example.

Some enlightening tips are appreciated. But thanks for the additional link to a page of what kind of I've seen too many so far. (<-- If that made any sense...)

Posted: Sat May 15, 2010 5:29 pm
by CodeX
If you get both AND & OR then here's a breakdown with truth tables:
AND
0 0 → 0
0 1 → 0
1 0 → 0
1 1 → 1

OR
0 0 → 0
0 1 → 1
1 0 → 1
1 1 → 1

NOT
0 → 1
1 → 0

XOR
0 0 → 0
0 1 → 1
1 0 → 1
1 1 → 0

so in terms of AND, OR & NOT you'll find XOR can be expressed as (a OR b) AND (NOT(a AND b)) which is (a | b) & (~(a & b)) in C like languages, in these you're better off just using ^ though as that's the XOR operator. These operations are usually applied to strings of bits which turns out like:

Code: Select all

 a  = 10100
 b  = 01110
a^b = 11010
Was that something more like that you wanted?

Posted: Sat May 15, 2010 6:52 pm
by Masti6
I'm still working on the challenge, but thanks for an excellent and simplified tip (The Wikipedia article was horribly confusing).
I shall try bringing everything down to the binary level and trying to Decipher the code with that.
Thanks again!

Posted: Tue Apr 12, 2011 5:08 pm
by erry
i did it, but it gave me a answer that isn't correct.
I took the number in HEX and turned into binary, than i XORed 79 (converted in binary too) at every number, then i put them together, but it's wrong...

Posted: Wed Apr 13, 2011 9:22 am
by M4xZ3r0
erry wrote:i did it, but it gave me a answer that isn't correct.
I took the number in HEX and turned into binary, than i XORed 79 (converted in binary too) at every number, then i put them together, but it's wrong...
79 (decimal)
means it is decimal already.

Posted: Wed Apr 13, 2011 12:19 pm
by erry
I know it's decimal, but i need to make him binary to XOR it

Posted: Wed Apr 13, 2011 1:03 pm
by Karian
For me, it is not really clear what you tried exactly.

What do you mean exactly with the every number and the put them together parts of your sentence? It is unclear what you have done exactly, and that makes it difficult to pinpoint the problem.

Posted: Wed Apr 13, 2011 1:15 pm
by erry
Well, i took the number given in HEX and i copied it in MS.Word.
After every number (or letter, because it's hexadecimal) i clicked Enter.
Then i changed every number (or letter blabla) to his value in binary. After that a XORed every binary number with 79.
I do an example hoping to not spoiler too much.
the number started with 3, so i XORed 0000011 with 1001111 (it's 79, in binary), and i obtained 1001100. I did it with every number but now i don't know how to proceed

Posted: Wed Apr 13, 2011 3:18 pm
by M4xZ3r0
erry wrote:Well, i took the number given in HEX and i copied it in MS.Word.
After every number (or letter, because it's hexadecimal) i clicked Enter.
Then i changed every number (or letter blabla) to his value in binary. After that a XORed every binary number with 79.
I do an example hoping to not spoiler too much.
the number started with 3, so i XORed 0000011 with 1001111 (it's 79, in binary), and i obtained 1001100. I did it with every number but now i don't know how to proceed
In Decimal one Byte is one Character (or 2 or 3 ^^), in Hex one Character isn't one Byte.

Posted: Fri Apr 15, 2011 4:42 am
by thewino
am i on the right track? hex to bin bytes xor backwards with 79 bin back to hex. this is not working for me. unless my calculations were wrong somewhere. ascii table needed perhaps?

Posted: Fri Apr 15, 2011 8:02 pm
by M4xZ3r0
thewino wrote:am i on the right track? hex to bin bytes xor backwards with 79 bin back to hex. this is not working for me. unless my calculations were wrong somewhere. ascii table needed perhaps?
I don't exactly know what you mean with "xor backwards" but it sounds like you're very close