• Neverclear@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    XOR cleartext once with a key you get ciphertext. XOR the ciphertext with the same key you get the original cleartext. At its core this is the way the old DES cipher works.

    A bit of useful trivia: If you XOR any number with itself, you get all zeros. You can see this in practice when an assembly programmer XOR’s a register with itself to clear it out.