Viginere Cipher
Well I have been studying cryptology for a few days, and it took me a while, but I realized the XOR cipher is nothing but a Vignere cipher except in this case we already know what XORs with what to equal what.
Now I finally understand how to apply a frequency analysis to capture the key.
I'll explain:
Plaint text: THE SUN AND THE MAN IN THE MOON
I will remove the spaces for purposes I'll explain later...
Plaintext:THESUNANDTHEMANINTHEMOON
Cipher text: DPRYEVNTNBUKWIAOXBUKWWBT
Key: KING
NOTE: The ciphertext is not XORed as I wanted you all to see the characters.
Anyway the key is reused which means it is possible to count the coincidences of any repeated characters.... I will demonstrate.
KINGKINGKINGKINGKINGKINGKING - that's the repeated key
THESUNANDTHEMANINTHEMOON
DPRYEVNTNBUKWIAOXBUKWWBT - the sequence BUK comes up twice.
So now we know that the distance between the two BUK's must be a multiple of the key length. We start at the first B and count... BUKWIAOX.. before we get to the next B and we find that the length of this space is 8 which means that the key length is a multiple of 8.
So the key can either 1,2,4,or 8 which drastically narrows down our search. Now we know that the key can only be 8 chars long at most. Now if we had the table of substitution it would be possible to try different combinations of letters till we found one that made sense.
Now I finally understand how to apply a frequency analysis to capture the key.
I'll explain:
Plaint text: THE SUN AND THE MAN IN THE MOON
I will remove the spaces for purposes I'll explain later...
Plaintext:THESUNANDTHEMANINTHEMOON
Cipher text: DPRYEVNTNBUKWIAOXBUKWWBT
Key: KING
NOTE: The ciphertext is not XORed as I wanted you all to see the characters.
Anyway the key is reused which means it is possible to count the coincidences of any repeated characters.... I will demonstrate.
KINGKINGKINGKINGKINGKINGKING - that's the repeated key
THESUNANDTHEMANINTHEMOON
DPRYEVNTNBUKWIAOXBUKWWBT - the sequence BUK comes up twice.
So now we know that the distance between the two BUK's must be a multiple of the key length. We start at the first B and count... BUKWIAOX.. before we get to the next B and we find that the length of this space is 8 which means that the key length is a multiple of 8.
So the key can either 1,2,4,or 8 which drastically narrows down our search. Now we know that the key can only be 8 chars long at most. Now if we had the table of substitution it would be possible to try different combinations of letters till we found one that made sense.



Lol coz there are endless possibilities of applications in gamehacking