Cipher Definition

KZero Staff
Mar 20, 2024

What is a Cipher?

A cipher is an algorithm used to encrypt information to make it unreadable to unauthorized devices or individuals. In other words, the plaintext – or original, readable data – is transformed into ciphertext – or encrypted data – using mathematical formulas and security keys.

Ciphers are commonly used in cryptography to protect the confidentiality of sensitive information whether it’s being sent or stored. To decrypt the ciphertext and recover the original, readable text or data, the recipient simply needs to have the right decryption algorithm and key.

Types of Ciphers

Cryptographic ciphers are commonly classified based on the type of encryption key that they use. The two types of ciphers include symmetric and asymmetric encryption algorithms.

Symmetric Key

Symmetric key cryptography uses the same key for encryption and decryption. Often, symmetric ciphers are more efficient than asymmetric ones, making them a good choice for bulk data encryption. However, the communicating parties need to establish a shared secret key before they can encrypt data.

Symmetric encryption algorithms can be divided into block and stream ciphers. Block ciphers – like the Advanced Encryption Standard (AES) – encrypt and decrypt data in fixed-sized blocks. Stream ciphers, like RC4, generate a stream of pseudo-random bits that are individually exclusive-ored (XORed) with each bit of plaintext to produce a ciphertext the same length as the plaintext.

Asymmetric Key

Asymmetric or public key cryptography uses two different, related keys for encryption and decryption. The private key is randomly generated and used to decrypt messages. The public key is derived from the private key and is used to encrypt messages to a particular recipient.

Asymmetric encryption algorithms are based on mathematical functions that are easy to compute but much harder to reverse. For example, multiplying two large numbers is easy, but factoring the result is much harder.

The security of asymmetric cryptography depends on these inverse operations remaining hard. For example, with a large enough quantum computer, an algorithm named Shor’s algorithm makes factoring roughly as efficient as multiplication. When these computers become available, any asymmetric cryptography based on the factoring problem becomes insecure.

Post-quantum encryption algorithms are asymmetric ciphers that are based on mathematical problems that are still hard for quantum computers to solve. Since research in quantum computing is moving quickly, development and testing of post-quantum algorithms is an active area of research in the cryptographic community.

Cipher Security

The security of cryptographic algorithms is based on three main assumptions. One is that the private key is properly protected. Another is that the cipher is implemented and used correctly. Most of the time when cryptographic algorithms are broken, it’s because of one of these.

The final assumption is that a cipher is secure against attack. Cryptographic algorithms are designed so that a brute force search for the encryption key is infeasible to perform. When this is no longer the case – either due to improved computers or vulnerabilities in the algorithm – the cipher is no longer trusted.


Ciphers fulfill a fundamental role in the modern world, ensuring confidential communications over the Internet and secure data storage. When using encryption, it’s always important to generate a strong, random encryption key and keep it secret.

KZero Staff

Explore more insightful content from the knowledgeable KZero staff on our blog and guides section.

Glossary Terms

Stay up to date with the most recent #infosec topics

Trending Topics

Interested In
Next-Gen MFA?

Discover Multi-Pass enterprise passwordless authentication

Share the page: