Home > Article > Backend Development > javascript - Stuck with this algorithm, how to get a cryptographic function?
The code is at https://jsfiddle.net/9wmy7fs9/
TheKEY
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!
The code is at https://jsfiddle.net/9wmy7fs9/
TheKEY
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.