Discussion:
Obfuscate code
(too old to reply)
Aaron
2005-05-28 22:41:37 UTC
Permalink
How would code obfuscation affect performance? in .net C#
Michael C#
2005-05-28 23:42:19 UTC
Permalink
Post by Aaron
How would code obfuscation affect performance? in .net C#
According to "Preemptive Solutions"
(http://www.preemptive.com/obfuscation-faq/), Obfuscation has the following
effect on performance:

"Software obfuscation tools need not slow performance. In fact, a
sophisticated Java or .NET obfuscation tool can improve performance by
compacting applications. Optimal application of overload induction
techniques will reuse identifier names, and other functions will prune
unused classes, methods, instance variables, and design time metadata. The
size reduction can range from 20-40% or more of an application's size.

Compacted programs often load faster and run in less memory. Moreover,
networked distribution of components is more efficient because application
size is reduced."

However, it's a sure bet that they did not consider encryption of strings in
this. Encryption would slow down your application, as might changing the
flow of the program logic, but that would need to be balanced against your
security requirements.
Aaron
2005-05-28 23:59:56 UTC
Permalink
If it improves peformance then.
I'm just curious to why microsoft doesn't make obfuscation a standard
feature in .net framework.
I know VS comes with an obfuscate tool. They should make it much simpler,
like a option in the solution property menu
to obfuscate the output.
Im sure most commercial application writer would not want their program to
be decompiled.


Aaron
Post by Michael C#
Post by Aaron
How would code obfuscation affect performance? in .net C#
According to "Preemptive Solutions"
(http://www.preemptive.com/obfuscation-faq/), Obfuscation has the
"Software obfuscation tools need not slow performance. In fact, a
sophisticated Java or .NET obfuscation tool can improve performance by
compacting applications. Optimal application of overload induction
techniques will reuse identifier names, and other functions will prune
unused classes, methods, instance variables, and design time metadata. The
size reduction can range from 20-40% or more of an application's size.
Compacted programs often load faster and run in less memory. Moreover,
networked distribution of components is more efficient because application
size is reduced."
However, it's a sure bet that they did not consider encryption of strings
in this. Encryption would slow down your application, as might changing
the flow of the program logic, but that would need to be balanced against
your security requirements.
Jon Skeet [C# MVP]
2005-05-29 05:15:53 UTC
Permalink
Post by Aaron
If it improves peformance then.
I'm just curious to why microsoft doesn't make obfuscation a standard
feature in .net framework.
I know VS comes with an obfuscate tool. They should make it much simpler,
like a option in the solution property menu to obfuscate the output.
I agree that it would make sense to have a properly integrated
obfuscator - and one which the debugger understands, and is able to
understand any generated mapping files, so that stack traces are still
legible in the debugger, etc.
Post by Aaron
Im sure most commercial application writer would not want their program to
be decompiled.
I believe that most application writers shouldn't really care. I
believe the threat posed by decompilation is vastly overstated. See
http://www.pobox.com/~skeet/csharp/obfuscation.html
--
Jon Skeet - <***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Loading...