Cipher

An algorithm that turns plaintext into ciphertext under the control of a key, and back again. AES and RSA encryption are ciphers; a hash function has no key and is not.

A cipher is a defined procedure for encryption and decryption: given plaintext and a key it produces ciphertext, and given that ciphertext and the right key it recovers the plaintext. Under Kerckhoffs’s principle, a cipher’s security should rest on the secrecy of the key, not the algorithm, so the algorithm can be published, reviewed and standardised. Modern ciphers are grouped by key arrangement, symmetric or asymmetric, and symmetric ciphers further into block and stream ciphers.

Neighbouring words are used loosely. Cryptographic algorithm is the broader term: hash functions and signature schemes are algorithms, but a hash has no key and nothing is decrypted, so it is not a cipher. A cipher also differs from a code, which swaps whole words or phrases using a codebook, whereas a cipher works on letters, bits or blocks regardless of meaning. Classical ciphers show the two basic operations, substitution and transposition, which modern designs combine over many rounds. A cipher suite is not one cipher but a named set of algorithms for key exchange, encryption and integrity.

Exam relevance: questions in this area tend to rely on precise vocabulary. Candidates are expected to tell a cipher from a code, a hash and a cipher suite, and to know that keeping an algorithm secret is no substitute for keeping the key secret.