SolvedXOR excryption

Posts 15 of 5 · Page 1 of 1
XOR excryption
well im trying to crypt some text.

what is the password? or can someone dirrect me to a online crypter i can use
There's a lovely .html file that encrypts words to xor for users. However, i recommend ciphering your strings. Much less likely to get detected in my opinion.
If you understand how XOR works, you will be able to do it yourself quite simply.
First you have a set of data, say an array of chars representing the string "lol". ['l','o','l']
Then you have a key which is a number, possibly 17. Since Exclusive Or (XOR, ^) is a bitwise operator, you must look at the data in a binary sense. Exclusive or looks at 2 bits. If ONE of them is true, it is true, and if neither OR both are true, it is false. Here is a truth table to demonstrate:

Now you need to convert each character in the array of strings to binary. To do so, you probably want to use an ASCII table to get the decimal, and then proceed to do a simple base-10 to base-2 conversion.
"l" in binary is - 01101100
"o" in binary is - 01101111
17 in binary is - 00010001
Now we want to use XOR between each bit of the character and each bit of the key for each character in the array.
Code:
01101100
00010001
XOR together  =  01111101
So the crypted 'l' is now that binary value and its character equivalent.
If you were to XOR that new value against the key again, it would return the original 'l'.
Hope this helps a bit
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?