Cipher
A cipher is an algorithm that transforms data according to a key, typically between plaintext and ciphertext.
Definition
A cipher is a defined algorithm for transforming plaintext into ciphertext and, with the required key, reversing that transformation. A secure design assumes the algorithm can be known publicly; secrecy resides in the key rather than in hiding the procedure.
Types of cipher
Classical ciphers include substitution and transposition systems. Modern symmetric ciphers process data as blocks or streams, while public-key ciphers use related public and private keys. A cipher is only one component: a complete scheme also specifies modes, nonces, padding, authentication, and message formatting.
Cipher, code, and encoding
A traditional code replaces meaningful units such as words with code groups from a codebook. A cipher applies a systematic transformation to symbols or bits. Encoding such as Base64 or Morse changes representation for compatibility or communication and does not provide cryptographic secrecy.
A cipher is the algorithm; encryption is the act of applying it with a key and parameters to data.
No. Modern cryptography expects public algorithms and bases security on protected keys and well-studied designs.
No. Classical and obsolete ciphers are educational but easily broken today. Security also depends on mode, key size, implementation, and correct use.