The function of vector in C DES encryption algorithm is analyzed in detail

  • 2020-05-19 05:30:56
  • OfStack

DES1 has four parameters in total: plaintext, ciphertext, key and vector. For beginners to understand, we can write the relation of the four parameters as follows: ciphertext = plaintext + key + vector; Plaintext = ciphertext - key - vector.

Why do I need the vector? Because if there is an article, a few words repeat, then the word plus the key to form the ciphertext, will still repeat, this gives the crack can take advantage of, the crack can guess according to the repeated content, what is the word, but once 1 guess the word, then, he can calculate the key, the whole article was cracked! After adding the vector parameter, each text segment will be added one value in turn. In this way, even if the same text is encrypted, the ciphertext will be different, and the security of the algorithm will be greatly improved!


Related articles: