Log in Sign up
Back to Discover
💻

Symmetric-key algorithm

technology Maturity 11-13

We use a secret code to hide things.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
You and a friend use the same key. This key locks the message. Then the same key unlocks it. It keeps your secrets safe. Can you keep a secret?

40 words

A secret key hides a message.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
You and a friend use the same key. This key locks the message. Then the same key unlocks it.

This way is very fast. It is good for sending big files. People use it to keep things private.

Some ways work one bit at a time. Other ways work in big groups. These are called blocks.

One famous way is called AES. It uses small groups of bits. This helps it work well.

It is a smart way to share secrets. It keeps our digital world safe.

96 words

A secret key hides a message.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
In this way, you use the same key to lock and unlock data. This key is a shared secret. Both people must have the same key to read the message. This can be hard to do safely.

Symmetric-key algorithms are very fast. They are great for big files. Because they are fast, they use less storage space. Many people use them to protect large amounts of data.

There are two main ways these work. The first is a stream cipher. This works on one letter or bit at a time. One example is ChaCha20. The second way uses block ciphers. These work on groups of bits called blocks. AES is a famous block cipher. It uses blocks that are 128 bits big.

Some ciphers are reciprocal. This means the same machine can lock and unlock a message. You just put the code in the same place. This makes the machines easy to use. Modern systems often use other ways to share the secret key first. Then, they use symmetric keys to do the heavy work.

184 words

Symmetric-key algorithms are special tools for keeping information private.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
They use a single secret key to hide a message. This key is used for both encryption and decryption. Encryption turns a readable message into a secret code. Decryption turns that code back into a readable message. Both people in a conversation must have the same key. This shared secret helps keep a private link between them. Using the same key is a very fast way to work.
Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg

There are two main ways these tools work. One way is called a stream cipher. A stream cipher encrypts a message one bit or letter at a time. An example of this is the ChaCha20 algorithm. The other way is called a block cipher. A block cipher takes a group of bits and encrypts them as one unit. It may add extra bits to make the message fit the block size. The Advanced Encryption Standard, or AES, is a famous block cipher.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
AES uses blocks that are 128 bits big.

Many of these tools are built using special designs. Some modern block ciphers use a design from Horst Feistel. This design helps build functions that can be reversed. This is important so the receiver can unlock the message. Other tools are called reciprocal ciphers. These are very clever because the same process locks and unlocks the data. You can put the secret code into the same system to get your message back.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
The Enigma machine is a famous example of a reciprocal machine.

Many different names appear in the world of secret codes. Popular examples include Twofish, Serpent, and Camellia. Other names you might see are Blowfish, CAST5, and Salsa20. NIST approved the AES algorithm in December 2001. Some older systems include DES and 3DES. There are also many other types like RC4 and IDEA.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
Each one has its own way of handling the math. These names represent different ways to protect our digital lives.

These tools connect to how we use computers every day. Most modern systems use a two-step process to stay safe. First, they use a different method to share the secret key. This might be a protocol like Diffie–Hellman key exchange. Once the key is shared, the symmetric cipher does the heavy work. This is because symmetric keys are great for bulk encryption.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
They are faster and use less storage space than other methods. This makes them perfect for protecting large amounts of data quickly.

424 words

Symmetric-key algorithms are essential tools used in cryptography to protect private information. These algorithms use a single cryptographic key for both encryption and decryption processes. Encryption transforms readable plaintext into unreadable ciphertext. Decryption then reverses this process to restore the original message. The key acts as a shared secret between two or more parties. This shared secret allows them to maintain a private information link. While these algorithms are highly efficient, they require both parties to have access to the same key. This requirement is a primary drawback compared to asymmetric-key encryption, which uses different keys.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg

There are two main types of symmetric-key encryption: stream ciphers and block ciphers. A stream cipher encrypts a message one unit at a time, such as individual letters or bytes. ChaCha20 is a well-known example of a stream cipher. Another type is the substitution cipher, though these can be broken using frequency tables. Block ciphers work differently by processing data in larger units. They take a specific number of bits and encrypt them as a single block. If the plaintext is not the right size, padding is added to reach a multiple of the block size. The Advanced Encryption Standard, or AES, is a prominent block cipher. NIST approved the AES algorithm in December 2001, and it utilizes 128-bit blocks.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg

Many modern block ciphers rely on a specific mathematical design. This construction was proposed by Horst Feistel. Feistel's construction is significant because it allows for the creation of invertible functions. It can turn functions that are not naturally reversible into ones that are. This allows the decryption process to work correctly. Some symmetric ciphers are also classified as reciprocal ciphers. In a reciprocal cipher, the same process is used for both locking and unlocking. You can enter ciphertext into the same system to retrieve the original plaintext. This is also known as a self-reciprocal cipher. Mechanical machines, such as the Enigma machine, often implement this type of cipher.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg

Symmetric ciphers are used for more than just hiding messages. They are often used as cryptographic primitives to achieve other goals. For example, they can be used to build hash functions through one-way compression functions. They can also help ensure a message has not been changed. To do this, a message authentication code is often added to the ciphertext. This ensures the receiver will notice if the data was altered. Some modern systems use an AEAD cipher, like AES-GCM, to handle this. However, symmetric ciphers cannot be used for non-repudiation without involving extra parties. This is a technical limitation defined in standards like ISO/IEC 13888-2.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg

Security is a constant concern for these algorithms. Historically, they have been vulnerable to attacks like differential and linear cryptanalysis. They have also faced known-plaintext and chosen-plaintext attacks. Developers can reduce these risks by carefully constructing the functions used in each round. Increasing the key length or the number of rounds can also improve protection. However, this comes with a cost in performance. More operations require more processing power and decrease the speed of the system. This creates a balance between high security and efficient operation.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg

The rise of quantum computing introduces new challenges for security. Quantum computers could exponentially increase the speed of decoding these ciphers. Specifically, Grover's algorithm could reduce the time needed for a brute-force attack to its square root. For instance, a 128-bit AES cipher could be broken in about six months instead of over 10 quintillion years. To combat this, users can double the key length. An AES-256 cipher is considered "quantum resistant." This is because a quantum computer would take the same amount of time to decode AES-256 as a conventional computer takes to decode AES-128.

Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg

Key management is the final piece of the puzzle. In the past, parties had to exchange keys through physically secure channels. Today, most systems use public-key protocols like Diffie–Hellman key exchange. This allows parties to agree on a new secret key for every session. This method provides forward secrecy and eliminates the need for physical transport. When these session keys are created, pseudorandom key generators are often used. It is vital that these generators use high entropy to remain unpredictable. A lack of randomness in these generators has caused major security breaks in the past. Popular algorithms used in these processes include Twofish, Serpent, Camellia, and Blowfish.

736 words
🖼️ Images & Media (1)
File:Simple symmetric encryption-en.svg
Simple symmetric encryption-en.svg
Up Next
💻
Key (cryptography)
Technology
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.