### 1, symmetric encryption algorithm

The encryption algorithm that uses the same key for encryption and decryption. Symmetric encryption algorithms are used to encrypt sensitive data and other information, and commonly used algorithms include RC4, DES, 3DES, AES, DESX, Blowfish, ChaCha20, RC5, and RC6. The first three algorithms are considered insecure, and are usually prohibited from use.

Domestic:SM1, SM4, ZUC

International:DES, 3DES, AES

Description:SM1’s 128-bit secrecy strength and performance is comparable to that of AES, and SM4’s 128-bit has been upgraded to the international standard

Block cipher Algorithm:DES,3DES,AES

Stream cipher algorithm:RC4

SM1: symmetric encryption algorithm, encryption strength of 128-bit, hardware implementation; algorithms are not publicly available, and can only be used through related security products.

SM4: symmetric algorithm, published with the WAPI standard, can be implemented using software, encryption strength of 128 bits.

SM4 packet cipher algorithm is a packet symmetric cipher algorithm designed independently by our country, which is used to realize the encryption/decryption operation of the data in order to ensure the confidentiality of data and information. To ensure the security of a symmetric cryptographic algorithm, the basic condition is that it has enough key length, SM4 algorithm and AES algorithm have the same key length packet length of 128 bits, so it is higher than 3DES algorithm in terms of security.

DES (DataEncryptionStandard): data encryption standard, faster, suitable for encrypting large amounts of data occasions.

3DES (TripleDES): is based on DES, encrypts a piece of data three times with three different keys, higher strength.

AES (AdvancedEncryptionStandard): Advanced Encryption Standard, is the next generation of encryption algorithm standard, fast, high security level;

ECB (ElectronicCodebook), features: fast computing, support parallel processing, need to be fill, description: do not recommend the use of

CBC (CipherBlockChaining), features: support for parallel processing, the need to fill, description: recommend the use of

CFB (CipherFeedback), features: support for parallel processing, do not need to fill, description: not recommended.

OFB (OutputFeedback), features: iterative operations using the stream cipher mode, do not need to fill, Description: do not recommend the use of

CTR (Counter), features: iterative operations using the stream cipher mode, support for parallel processing, do not need to fill, Description: recommended

CTR (Counter), features: iterative operations using the stream cipher mode, support for parallel processing, do not need to fill, Description: recommended

CTR (Counter), features: iterative operations using the stream cipher mode, support for parallel processing, do not need to fill, Description: recommended

XTS (XEX-basedtweaked-codebook), features: does not require padding, Description: Used in local hard disk storage solutions

Padding criteria: the length of the plaintext must be a multiple of the length of the packet, such as multiples of the length of the packet , there must be a padding mechanism

PKCS #7 padding. PKCS#7 padding: can handle the length of the packet is 1 to 255 bytes

AES algorithm using the standard, such as: AES-128-CBC-PKCS#7, where the secret key length of 128, packet mode CBC, padding standard PKCS#7, the AES algorithm defaults to packet 128 bits.

### Introduction to RC4

The RC4 encryption algorithm is a cluster of variable key length stream encryption algorithms designed by Ronald Rivest, the head of the famous RSA trio, in 1987. It is called a cluster because the S-box at its core can be any length, but is typically 256 bytes. The algorithm can be about 10 times faster than DES encryption and has a very high level of nonlinearity.RC4 was initially used to protect trade secrets. But in September 1994, its algorithm was released on the Internet and there were no longer any trade secrets.RC4 is also called ARC4 (AllegedRC4 – so-called RC4) because RSA never officially released the algorithm.

### Easy language md5 and rc4 difference

md5 is a message digest algorithm calculated, not reversible (theoretically, but now collision algorithms and forgery algorithms), so it is generally only used for verification and so on.

rc4 is symmetric encryption, reversible, and generally used to encrypt all kinds of messages.