A cryptographic key is a value that controls encryption and decryption. In symmetric encryption, authorized participants share the same secret key, while eavesdroppers see only ciphertext. section 1.2.1
Keep the key secret, not the algorithm. Kerckhoff’s principle requires security to survive disclosure of the algorithm, source code, and design; hiding implementation details is not a substitute for protecting the key. section 1.2.1
Treat key generation and recovery as security-critical:
- Generate keys with uniformly distributed cryptographic randomness; bias shrinks the effective guess space and makes attacks easier. section 2.1.1
- Understand the reversible relationship between plaintext, key, and ciphertext: XORing with the same key encrypts and decrypts. section 4.1.1
- Distinguish recovering a keystream from recovering the original key; the latter can restore access to a protected network. section 4.3
XOR as a key-controlled transformation
Let x be plaintext, y the key, and z = x XOR y the ciphertext. XORing z with y returns x. Without y, a ciphertext bit alone does not identify the corresponding plaintext bit. section 4.1.1
Figure 1.2 Using symmetric keys for encryption and decryption
Use the symmetric-key diagram to trace the same secret key through encryption and decryption. section 1.2.1




