Ciphers were common long before the information age (e.g., substitution ciphers, transposition ciphers, and permutation ciphers), but none of them were cryptographically secure except for the one-time pad.
Modern ciphers are designed to withstand attacks discovered by a cryptanalyst. There is no guarantee that all attack methods have been discovered, but each algorithm is judged against known classes of attacks.
They also are classified according to how their keys are handled:
- symmetric key algorithms use the same key to encode and decode a message. The key also must be sent securely if the message is to stay confidential.
- asymmetric key algorithms use a different key for encryption and decryption.