eli5 How exactly is the source code of an app/software being “locked”? What is protecting it from being seen?

1.01K views

eli5 How exactly is the source code of an app/software being “locked”? What is protecting it from being seen?

In: 26

12 Answers

Anonymous 0 Comments

Others on this thread have covered the main point of compilation, which is converting your human-readable source code to a binary executable or byte code, so I won’t repeat.

However, there is also a process called ‘obfuscation’ which can be used too.

In most cases, it is absolutely possible to decompile compiled code and return it to source code. In most cases, you’ll never fully decompile back to the *exact* original source code as most compilers will do things like disregard comments, and also apply a number of optimisations which can essentially reorder and reorganise the code in its compiled form to make it more efficient.

However, good decompilers will still produce pretty readable code.

So, this is where obfuscation comes in. Obfuscation tools will take your original source code and essentially make it unreadable (by humans) – or at least *incredibly difficult to read* – by changing labels, variable names, constants, function names, class names, etc to seemingly random strings, rearranging the organisation of the code, removing unnecessary white space and empty lines and various other techniques.

However, importantly, obfuscation does not affect the execution of the code. As far as the computer is concerned, the code works *exactly* as originally intended. It just makes decompiling to an (easily) readable form much more difficult.

This is more of an example of ‘security through obscurity than a case of ‘locking’ it though.

You are viewing 1 out of 12 answers, click here to view all answers.