What is symmetric key encryption

Symmetric key cryptography (or symmetric encryption) is a type of encryption scheme in which the same key is used both to encrypt and decrypt messages. Such a method of encoding information has been largely used in the past decades to facilitate secret communication between governments and militaries. Nowadays, symmetric key algorithms are widely applied in various types of computer systems to enhance data security.

How does symmetric encryption work?

Symmetric encryption schemes rely on a single key that is shared between two or more users. The same key is used to encrypt and decrypt the so-called plaintext (which represents the message or piece of data that is being encoded). The process of encryption consists of running a plaintext (input) through an encryption algorithm called a cipher, which in turn generates a ciphertext (output).

If the encryption scheme is strong enough, the only way for a person to read or access the information contained in the ciphertext is by using the corresponding key to decrypt it. The process of decryption is basically converting the ciphertext back to plaintext.

The security of symmetric encryption systems is based on how difficult it randomly guess the corresponding key to brute force them. A 128-bit key, for example, would take billions of years to guess using common computer hardware. The longer the encryption key is, the harder it becomes to crack it. Keys that are 256-bits length are generally regarded as highly secure and theoretically resistant to quantum computer brute force attacks.

Two of the most common symmetric encryption schemes used today are based on block and stream ciphers. Block ciphers group data into blocks of predetermined size and each block is encrypted using the corresponding key and encryption algorithm (e.g., 128-bit plaintext is encrypted into 128-bit ciphertext). On the other hand, stream ciphers do not encrypt plaintext data by blocks, but rather by 1-bit increments (1-bit plaintext is encrypted into 1-bit ciphertext at a time).

Symmetric vs. asymmetric encryption

Symmetric encryption is one of the two major methods of encrypting data in modern computer systems. The other is asymmetric encryption, which is the major application of public key cryptography. The main difference between these methods is the fact that asymmetric systems use two keys rather than the one employed by the symmetric schemes. One of the keys can be publicly shared (public key), while the other must be kept in private (private key).

The use of two keys instead of one also produces a variety of functional differences between symmetric and asymmetric encryption. Asymmetric algorithms are more complex and slower than the symmetric ones. Because the public and private keys employed in asymmetric encryption are to some degree mathematically related, the keys themselves must also be considerably longer to provide a similar level of security offered by shorter symmetric keys.

Uses in modern computer systems

Symmetric encryption algorithms are employed in many modern computer systems to enhance data security and user privacy. The Advanced Encryption Standard (AES) that is widely used in both secure messaging applications and cloud storage is one prominent example of a symmetric cipher.

In addition to software implementations, AES can also be implemented directly in computer hardware. Hardware-based symmetric encryption schemes usually leverage the AES 256, which is a specific variant of the Advanced Encryption Standard that has a key size of 256 bits.

It is worth noting that Bitcoin’s blockchain does not make use of encryption like many tend to believe. Instead, it uses a specific kind of digital signatures algorithm (DSA) known as Elliptic Curve Digital Signature Algorithm (ECDSA) that generates digital signatures without using encryption.

A common point of confusion is that the ECDSA is based on elliptic-curve cryptography (ECC), which in turn may be applied for multiple tasks, including encryption, digital signatures, and pseudo-random generators. However, the ECDSA itself cannot be used for encryption at all.