Hi everyone.
I use CRYPTO-JS to encrypt the client:
function Encrypt (str) { var key = $.cookie (' key '); var encrypted = CryptoJS.TripleDES.encrypt (str, key, {Mode:CryptoJS.mode.ECB, padding:CryptoJS.pad.ZeroPadding}); return encrypted;}
Service side:
$decrypt = Mcrypt_decrypt (mcrypt_3des, $_session[' key '), $encrypted _str_from_client, MCRYPT_MODE_ECB); Print ($decrypt);
It can't be decrypted like this.
Do you have any way to do in the client with 3DES ECB mode encryption, the backend can be decrypted?
Reply content:
Hi everyone.
I use CRYPTO-JS to encrypt the client:
function Encrypt (str) { var key = $.cookie (' key '); var encrypted = CryptoJS.TripleDES.encrypt (str, key, {Mode:CryptoJS.mode.ECB, padding:CryptoJS.pad.ZeroPadding}); return encrypted;}
Service side:
$decrypt = Mcrypt_decrypt (mcrypt_3des, $_session[' key '), $encrypted _str_from_client, MCRYPT_MODE_ECB); Print ($decrypt);
It can't be decrypted like this.
Do you have any way to do in the client with 3DES ECB mode encryption, the backend can be decrypted?