3DES encryption and decryption

In 400 BC, the ancient Greeks invented the permutation cipher. In 1881 the world's first patent for telephone secrecy appeared. During World War II, the German military used the "Enigma" cipher machine, and cryptography played a very important role in the war.

3DES

  3DES is a mode of the DES encryption algorithm, which uses three 64-bit keys to encrypt data three times. Data Encryption Standard (DES) is a long-standing encryption standard in the United States that uses symmetric key encryption.

  3DES (i.e. Triple DES) is an encryption algorithm transitioning from DES to AES (in 1999, NIST designated 3-DES as a transitional encryption standard) and is a more secure variant of DES. It takes DES as the basic module, and designs the block encryption algorithm by combining the grouping method.

  Let Ek() and Dk() represent the encryption and decryption process of the DES algorithm, K represents the key used by the DES algorithm, P represents the plaintext, and C represents the encrypted table. In this way,

  The 3DES encryption process is: C=Ek3(Dk2(Ek1(P)))

  The 3DES decryption process is: P=Dk1((EK2(Dk3(C)))

  K1, K2, and K3 determine the security of the algorithm. If the three keys are different from each other, it is essentially equivalent to encrypting with a 168-bit key. It has been relatively secure against brute force attacks for many years. If the data does not require so high security, K1 can be equal to K3. In this case, the effective length of the key is 112 bits.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325989714&siteId=291194637