Home  >  Article  >  Backend Development  >  javascript - Stuck with this algorithm, how to get a cryptographic function?

javascript - Stuck with this algorithm, how to get a cryptographic function?

WBOY
WBOYOriginal
2016-08-22 11:45:381031browse

The code is at https://jsfiddle.net/9wmy7fs9/

The

KEY constant is fixed, and the encrypted text can be decoded using the decrypt function to obtain the plain text

Is it possible to write a function encrypt(plain_text, KEY) function through this decrypt function?
That is, the encrypted text can be deduced from the plain text

Thank you!

Reply content:

The code is at https://jsfiddle.net/9wmy7fs9/

The

KEY constant is fixed, and the encrypted text can be decoded using the decrypt function to obtain the plain text

Is it possible to write a function encrypt(plain_text, KEY) function through this decrypt function?
That is, the encrypted text can be deduced from the plain text

Thank you!

In 1972, the DES algorithm developed by IBM for the US government became the first encryption system with a public algorithm in human history. That is to say, even if I tell you what my encryption algorithm is, you still cannot know how to decrypt it. . In the same way, even if you get a decryption algorithm, it is impossible to deduce its original encryption algorithm. Of course, I'm talking about DES here.

I mean that it is technically possible to keep the encryption and decryption algorithms confidential to prevent others from reverse engineering. If the decryption algorithm here is DES, it is impossible to derive the encryption algorithm. However, if the decryption algorithm used here is not a more advanced algorithm such as DES or AES256, it may be possible to reverse engineer the encryption algorithm.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn