js-confuser icon indicating copy to clipboard operation
js-confuser copied to clipboard

String encryption based on source code as a key

Open MichaelXF opened this issue 11 months ago • 0 comments

          We can use source itself to decrypt strings
function decrypt(str, password) {
    // ...
}

const encryptedString = "ABC...";

decrypt(encryptedString, decrypt.toString());

the only thing which is required is that decrypting source shouldn't be inside of the "password" structure, basically because it is impossible

I love the idea of code unreversability rooted in such way so the code is structure dependend, so if you will break the structure - whole code will fall apart, so obfuscation will became not just messing code around, but a part of the code itself

Originally posted by @doctor8296 in https://github.com/MichaelXF/js-confuser/issues/132#issuecomment-2464503505

Using the source code of a function as an encryption key could potentially be a very secure way to ensure obfuscators and reserve-engineers struggle to alter the program structure without problems arising (Deobfuscations applied => String Encryption key is wrong => Strings decrypt wrong => Program crashes or is unusable)

MichaelXF avatar Nov 09 '24 04:11 MichaelXF