Unregistered
October 29th, 2001, 10:20
I (wrongly, maybe) guess that the Eternal Loser question deserves a deeper answer, because it seems that he/she wants to know more about general, theoretical principles, and not only about the strength of the related algorithms.
Beside, from a theoretical point of view, the XOR-based algorithms are anything but weak; on the contrary, XOR-based algorithms are theoretically inviolable. This principle was stated in 1917 by Gilbert Vernam; he demonstrated that a text ciphered by XORing with a random-generated key (the "worm"

never can be deciphered, provided that the text and the key are the same size.
From a practical point of view, the system (as is, at least) is useless. Sending to the recipient two texts of the same size is equivalent to duplicating the amount of information and simply halving the risks.
So, in practice, more "handy" worms are builded up by multiplying two primes L1 & L2; in this way, the sequence will show a L1xL2 periodicity (allowing the use of the methods described by ArthaXerXes).
A practical implementation can be found inside the InstallShield Package For The Web (in versions 2.xx, at least) where the packed files are crypted (and decrypted) using a worm generated by Xoring the password and another value, then XORing the result with an hardcoded byte sequence; the second operation in order to destroy the generated periodicity