Skip Navigation

Login





Join! | Login troubles?

Online members

Guests:5
Members:0

Poll

What's your favorite scripting language for solving challenges?


python (12.4%)

perl (9.2%)

bash (3.2%)

ruby (1.9%)

php (37.5%)

javascript (13.0%)

I'm not convinced scripting saves time, I use a "proper" language for everything I do. (15.6%)

Scripting? Excel for the winners, man! (7.3%)


Total votes: 315
Date added: 2008-06-14

View text

Info
Author cake
Date added 2006-12-05
Last modified 2006-12-05


XOR encryption (translated by Cake)

....::::This text is written by Senzei and translated by Cake::::....

Lines between [ ] are to be considered out-of-date according to the Admins.

Many crypto-methods make use of the XOR bit-operation. The main idea with XOR is the comparison of a bit from a message with an corresponding bit in the key. When the bits differ, the encrypted text will show a "1" at that position. When the bits are equal, the encoded text will say "0". You can use the same bit-operation to return the originel message.

For example:

ENCRYPTING (XOR)

1101011 clear text
0100001 key                    
--------------------------    
1001010 encrypted text



DECRYPTING (XOR)

1001010 encrypted text
0100001 key
--------------------------
1101011 clear text


Bits who differ:     outcome = 1
Bits who are equal:  outcome = 0


The encryption is the strongest when the key contains at least as much characters as the orginal message does. The key also has to be sufficient random. By choosing a long key, this crypto method becomes less usefull for most users. Also a "random" key is hard generate, this is because computers aren't really random.
[Random password generators still have a some structure which doesn't allow them to be completely random and by this makes it possible to guess for the password.]

If you have any questions, you can send them to Senzei.