Improved XOR key guessing algorithm