Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

preface

A small step every day, a big step to success. Hello everyone, I'm GW_gw, and I'm happy to learn daily trivia with you.Copy the code

The following content is from the network, if there is any infringement, please contact me to delete, this article is only used for learning exchange, not for any commercial purposes.

Abstract

This paper mainly introduces the common symmetric encryption algorithms and the advantages and disadvantages of each algorithm.Copy the code

Symmetric encryption

Symmetric encryption means that the sender and receiver of a file use the same key for encryption and decryption.

It’s like a passbook in a spy movie, where both sides are fighting for it. Each message in the telegram is converted according to the cipher book, so that once the cipher book is obtained, the message in the telegram can be known. This is the classic symmetric encryption.

Of course, symmetric encryption is not only these small means, we can perform the same operation on each character of the file, such as adding a key at the same time, then decryption only need to subtract the key for each character. Each character can also be xor, multiply, divide, and so on. This is just for fun. To transfer files more securely, we need better algorithms.

Common symmetric encryption algorithms are:

DES

DES although the key is 64 bits, but the actual application in the algorithm is only 56 bits.

  • Advantages: Fast encryption speed, suitable for a large amount of encrypted data.
  • Disadvantages: the encryption strength is not high.

3DES

3DES is an enhanced version of DES. Key bit 128 bits.

  • Advantages are: high encryption intensity.
  • Disadvantages: slightly slower speed.

AES

AES is the encryption algorithm proposed after DES is cracked. There are 128-bit, 192-bit and 256-bit keys.

  • The advantages are: high encryption security, fast speed.

IDEA

International data encryption algorithm. Key length bit 128 bits.

  • The advantages are: high encryption security, fast speed.

conclusion

The above is my shallow view of symmetric encryption algorithms, mainly for readers to understand these symmetric encryption algorithms. Readers are welcome to criticize and correct any errors.