LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

What is the XOR operation and why is it fundamental to symmetric cryptography?

XOR (exclusive OR) outputs 1 when the two input bits differ, and 0 when they are the same.

XOR is self-inverse: the same operation encrypts and decrypts

* The same XOR with the key both encrypts and decrypts — (A⊕B)⊕B = A. *

Truth table:

A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0

Why it matters for cryptography:

  • XOR is its own inverse: (A XOR B) XOR B = A — this means the same operation encrypts and decrypts
  • It's extremely fast in hardware (single gate)
  • It perfectly mixes bits without losing information (bijective for a fixed key)

Tip: Think of XOR as a "toggle switch" — applying the same key toggles between plaintext and ciphertext.

Go deeper:

From Quiz: KRYPTOG / Symmetric Cryptography | Updated: Jul 14, 2026