Work out xor cipher output instantly with clear inputs, formula shown and shareable results.
XOR is its own inverse, so the same operation encrypts and decrypts. With a random key as long as the message used once, it is a one-time pad and unbreakable; with a short repeating key it is trivially broken, because splitting the ciphertext by key position turns it into several single-byte XOR problems solvable by frequency analysis. XOR is a building block of real ciphers, not a cipher.
Repeating-key XOR
c_i = p_i XOR k_(i mod m); decryption is the identical operation because XOR is self-inverse
Bytes at positions congruent modulo the key length share a key byte. Guessing the key length and applying English letter frequency recovers each byte independently.
Everywhere inside real cryptography — stream ciphers XOR a keystream with the plaintext, and block cipher modes such as CTR and GCM do the same. The security comes from the keystream generator, not the XOR.