Back to Content

Cipher

files/en-us/glossary/cipher/index.md

latest2.6 KB
Original Source

In {{glossary("cryptography")}}, a cipher is an algorithm that can {{glossary("encryption", "encrypt")}} {{glossary("plaintext")}} to make it unreadable, and to {{glossary("decryption", "decrypt")}} the encoded data back to plaintext again.

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.

In the modern age, ciphers have evolved dramatically. AES, RSA and Blowfish are examples of ciphers that are integral part of contemporary encryption standards and systems.

Modern ciphers are designed to withstand attacks discovered through {{glossary("cryptanalysis")}}. There is no guarantee that all attack methods have been discovered, so each algorithm is recommended for different purposes based on known classes of attacks.

Ciphers operate either as block ciphers on successive blocks (or buffers) of data, or as stream ciphers on a continuous data flow (often of sound or video).

Ciphers are also classified according to how their {{glossary("key", "keys")}} are handled:

  • {{Glossary("Symmetric-key cryptography", "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.
  • {{Glossary("Public-key cryptography", "asymmetric key")}} algorithms use one key for encryption and the other for decryption.

See also

  • Web Crypto API
  • SubtleCrypto supported algorithms
  • Related glossary terms:
    • {{Glossary("Block cipher mode of operation")}}
    • {{Glossary("Ciphertext")}}
    • {{Glossary("Cipher suite")}}
    • {{Glossary("Cryptanalysis")}}
    • {{Glossary("Cryptography")}}
    • {{Glossary("Decryption")}}
    • {{Glossary("Encryption")}}
    • {{Glossary("Key")}}
    • {{Glossary("Plaintext")}}
    • {{Glossary("Public-key cryptography")}}
    • {{Glossary("Symmetric-key cryptography")}}
  • Cipher on Wikipedia