The cryptographic algorithms can be divided into three categories: symmetric cryptographic algorithm, asymmetric cryptographic algorithm and abstract algorithm.

I. Symmetric Key Algorithm

Symmetric algorithm refers to the cipher algorithm that the secret key is the same as the secret key and the secret key is the same, also known as the secret key algorithm or single key algorithm.

The algorithm is divided into Block cipher algorithm and Stream cipher algorithm.

  • Block cipher algorithm
    • Also known as block encryption algorithm
    • Encryption Step 1: Divide the plaintext into N plaintext blocks of fixed length
    • Encryption step 2: Use the same secret key and algorithm to encrypt each plaintext block to obtain N ciphertext blocks of equal length
    • Encryption Step 3: Combine N ciphertext blocks in sequence to obtain the ciphertext
  • Stream cryptography
    • Also known as sequential cryptography algorithm
    • Encryption: Only one bit or one byte of plaintext is encrypted at a time
    • Decryption: Decrypts one bit or one byte of ciphertext at a time

Common block cipher algorithms include AES, SM1, SM4, DES, 3DES, IDEA, and RC2. Common stream cryptography algorithms include RC4.

  • AES: a symmetric encryption algorithm with high security and wide application range
  • SM1: National secret, implemented by hardware
  • SM4: State secret, can use software to achieve
  • DES/3DES: a common symmetric encryption algorithm that has been eliminated or phased out

2. Asymmetric Key Algorithm

Asymmetric algorithm refers to the encryption algorithm with different secret keys and different secret keys. It is also called public cryptography algorithm or public key algorithm. This algorithm uses one secret key for encryption and another secret key for decryption.

  • Encryption A secret key can be made public, also known as a public key
  • The decryption key must be kept secret, also known as the private key

Common asymmetric algorithms include RSA, SM2 (National secret), DH, DSA, ECDSA and ECC.

Digest Algorithm

Algorithm is a cryptographic algorithm that converts the input data of arbitrary length into the output data of fixed length, also known as hash function, hash function, hash function, one-way function and so on.

The output data of fixed length produced by the digest algorithm is called digest value, hash value or hash value. The digest algorithm has no secret key.

Abstract algorithm is usually used to judge the integrity of data, that is, hash the data and compare whether the abstract values are consistent.

Abstract: There are three main types of algorithms: Message Digest (MD), Secure Hash Algorithm (SHA-1) and Message Authentication Code (MAC). Another country secret standard SM3 also belongs to summary algorithm.

  • MD series mainly includes MD2, MD4 and MD5
  • The SHA series includes THE SHA-1 and SHA-2 series (derived algorithms of SHA-1 include SHA-224, SHA-256, SHA-384, and SHA-512).
  • MAC algorithms include HmacMD5, HmacSHA1, HmacSHA256, HmacSHA384, and HmacSHA512