Use Obfuscation to Improve the Size, Performance, and Security of Your J2ME Applications

Are you working too hard to improve the footprint and performance of your J2ME application? Perhaps you have overlooked a readily available Java tool. Obfuscation may not only help you improve the size and performance of your application, it also gives you security over your intellectual property.

by Jim White

Aug 17, 2005

Page 1 of 3

WEBINAR:

On-Demand

Full Text Search: The Key to Better Natural Language Queries for NoSQL in Node.js

In J2ME, obfuscation can help protect applications that are deployed to millions of devices. Importantly, but often forgotten, obfuscation can also help developers with some other equally important issuesnamely application size and performance.

These two issues are especially sticky when you're developing for small mobile devices. However, though this article deals strictly with Micro Edition apps, most Java applications could stand to take advantage of the better security, smaller footprint, and improved performance obfuscation provides. You'll find out what obfuscation does to J2ME code and why more developers should use obfuscation when delivering applications. You'll also look at how tools and IDE's provide obfuscation and see that not all obfuscators are created equal (there are various obfuscation methods of which you may not have been aware).

Why Obfuscate?
There are three reasons why you should consider obfuscation:

Protection of intellectual property

Footprint reduction

Improve runtime performance

Protection of Intellectual Property
You've just created that killer J2ME application. You made a deal with a device manufacturer to put your application on millions of cell phones. With your application literally in the hands of so many people, how do you protect your intellectual property? If you think it takes special tools and training to reverse engineer your application, think again. Look inside your Java SDK bin directory. That javap.exe tool in the bin directory is a Java class file dissassemblerprovided with the freely available SDK download. Getting a hold of your intellectual property is as easy as getting a hold of your class files and running:

javap com.mycompany.KillerAppMidlet

Obfuscators help protect your property and make it harder to decompile code. The key and operative words in protection are "make it harder." Obfuscation is not encrypting your intellectual property with crypto. It only makes the code that comes out of a decompiler like javap.exe harder&3151;often much harderto understand and reverse engineer. Most of the obfuscator vendors will use the term "nearly impossible" when referring to the ability to reverse engineer code that has been obfuscated with their tool. While nearly impossible is good enough for most applications, it shouldn't be confused with completely secure.