Jump to content
  • Advertisement
Sign in to follow this  
Thoover

[java] encryption of class

This topic is 3904 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Wondering is there a way to encrypt the class files easily (or at least free) i really only need the string(s) encrypted, but yet i dont want a user to be able to decompile it using JAD or any other program thanks in advance thoover

Share this post


Link to post
Share on other sites
Advertisement
Give up now. There is no way to stop a determined user from decompiling a Java application. Even if you encrypt the strings, they'll just find the bit of code that decrypts it and use it for themselves.

Share this post


Link to post
Share on other sites
It's impossible to encrypt them. You can merely obfuscate them, so that method and variables names make no sense. But there's no way to encrypt or hide the code.

Share this post


Link to post
Share on other sites
I've been curious about this myself. If you actually compile a java program to native code (make an exe) using 1 of many third party programs on the internet, is a java app still more vulnerable to reverse engineering than any other exe?

Thanks,

Karan

Share this post


Link to post
Share on other sites
Quote:
Original post by Karan Bhangui
I've been curious about this myself. If you actually compile a java program to native code (make an exe) using 1 of many third party programs on the internet, is a java app still more vulnerable to reverse engineering than any other exe?


Compiling Java bytecode to native platform binary for purpose of security is a huge falacy. In order to remain compatible, and to make platform itself work, such binary needs to provide the exactly same semantic information as pure byte-code.

The purpose of native compilation lies somewhere else, namely in domain of compile-time escape analysis, RVO and greater stack usage. Depending on application, this can yield dramatic performance improvements.

Java, C#, Python and other modern managed languages are semantically rich. As such, no matter how they are encoded, they provide adequate information to restore the original source almost completely.

These days, if you want security, run the application on server. Game industry has learned this in Korea, where copy protection lasts for a total of 3 minutes before it's cracked and software pirated.

Anything that the user has is insecure by definition. The greatest falacy you can fall for however is applying your own (mis-)understanding or unfamiliarity with certain concepts to quality of protection. Not knowing assembly for example may make compilation into binary form look as good protection, where in reality it's not.

Managed reflective languages *need* provide greatest benefits by providing complete run-time reflection of itself. As such, they have the ability to reverse engineer themselves, making the difficulty of such task a moot point.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!