Didactic XOR Cipher

Post Reply
zero0cripton
Posts: 6
Joined: Thu Jan 21, 2010 11:22 pm
Location: Portugal

Didactic XOR Cipher

Post 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?
Sex is like hacking, you get in, you get out and you hope you didn't leave anything behind that can be traced back to you.
yushun
Posts: 1
Joined: Thu Apr 08, 2010 5:05 am

Post by yushun »

remember the base format
Masti6
Posts: 55
Joined: Sat May 15, 2010 12:04 pm
Location: Finland, Nurmes

Post 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.
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

If you don't understand something you really should resarch
Masti6
Posts: 55
Joined: Sat May 15, 2010 12:04 pm
Location: Finland, Nurmes

Post 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...)
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post 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?
Masti6
Posts: 55
Joined: Sat May 15, 2010 12:04 pm
Location: Finland, Nurmes

Post 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!
erry
Posts: 13
Joined: Sat Dec 11, 2010 2:23 pm

Post 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...
M4xZ3r0
Posts: 5
Joined: Thu Mar 31, 2011 11:23 am

Post 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.
erry
Posts: 13
Joined: Sat Dec 11, 2010 2:23 pm

Post by erry »

I know it's decimal, but i need to make him binary to XOR it
Karian
Posts: 75
Joined: Wed Jan 09, 2008 10:21 am

Post 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.
erry
Posts: 13
Joined: Sat Dec 11, 2010 2:23 pm

Post 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
M4xZ3r0
Posts: 5
Joined: Thu Mar 31, 2011 11:23 am

Post 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.
thewino
Posts: 5
Joined: Wed Apr 06, 2011 6:27 am

Post 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?
M4xZ3r0
Posts: 5
Joined: Thu Mar 31, 2011 11:23 am

Post 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
Post Reply