Encryption protects sensitive data by transforming readable input into ciphertext with a cryptographic key. Decryption uses a known function and the appropriate key to recover the input. Applications use it for persisted data and for data exchanged between system components, keeping encoded data accessible only to privileged entities. section 1.2 section 1.1
Distinguish encryption from related transformations:
- Encoding transforms input generally; encryption is encoding that requires a key and supports later reversal through decryption. section 4.1.4
- Symmetric encryption uses the same key for encryption and decryption. section 4.1.4
- Asymmetric encryption uses a public key for encryption and a private key for decryption; together they form a key pair. section 4.1.4
- Hashing is one-way encoding: applications can match an input against an output but cannot recover the input from the output. section 4.1.4
Keyed transformation
Represent encryption as (x, k) -> y, where x is the readable input, k is the key, and y is the ciphertext. Decryption applies the known reverse function to (y, k) and recovers x. section 4.1.4
(x, k) -> y
Use the compact function notation to track the input, key, and encrypted result before considering decryption. section 4.1.4















