Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Encrypting Java Code

Thread view: 
Mike - 31 Oct 2005 16:32 GMT
I provide a Web service that is mostly JSP with a few java classes
thrown in. I want to give my customers the ability to down load a
subset of the service's functionality (JSPs) to run offline.

How can I encript the code so that it cannot be reversed engineered?
If it encripted, is there a performance hit?

Thanks
Daniel Dyer - 31 Oct 2005 17:09 GMT
> I provide a Web service that is mostly JSP with a few java classes
> thrown in. I want to give my customers the ability to down load a
[quoted text clipped - 4 lines]
>
> Thanks

In short, you can't.  The best you can achieve is obfuscatation to make  
things more difficult, but there is nothing you can do to protect your  
code from a determined reverse engineer.

You may have heard of schemes for encrypting class files, but these do not  
work (see  
http://www.javaworld.com/javaworld/javaqa/2003-05/01-qa-0509-jcrypt.html).

For a good, free obfuscator, try Proguard  
(http://proguard.sourceforge.net).

Dan.

Signature

Daniel Dyer
http://www.dandyer.co.uk

Alun Harford - 31 Oct 2005 19:01 GMT
> I provide a Web service that is mostly JSP with a few java classes
> thrown in. I want to give my customers the ability to down load a
> subset of the service's functionality (JSPs) to run offline.
>
> How can I encript the code so that it cannot be reversed engineered?
> If it encripted, is there a performance hit?

You can't.
If you provide the information needed in order to run the code, you provide
the information needed in order to reverse engineer it.

Alun Harford
Benji - 31 Oct 2005 20:03 GMT
> How can I encript the code so that it cannot be reversed engineered?

Don't worry about encrypting code.  There's no really good reason for it.
For any sufficiently complex peice of code, it's easier for someone to
write it themselves than use a decompiler to reverse engineer it.  If
you've actually put enough effort into it to worry about someone stealing
it, either it's too complex for them to be able to want to, or you put
too much effort into the code.  ;-)

Signature

Of making better designs there is no end,
 and much refactoring wearies the body.

Benji - 31 Oct 2005 23:01 GMT
> How can I encript the code so that it cannot be reversed engineered?

Don't worry about encrypting code.  There's no really good reason for it.
For any sufficiently complex peice of code, it's easier for someone to
write it themselves than use a decompiler to reverse engineer it.  If
you've actually put enough effort into it to worry about someone stealing
it, either it's too complex for them to be able to want to, or you put
too much effort into the code.  ;-)

Obfuscators should be a sufficient deturrent.

Signature

Of making better designs there is no end,
 and much refactoring wearies the body.

Roedy Green - 31 Oct 2005 23:23 GMT
>How can I encript the code so that it cannot be reversed engineered?
>If it encripted, is there a performance hit?

No, or otherwise how could the machine run it? The computer has to
know the key.

But you can make it more difficult to reverse engineer.  see
http://mindprod.com/jgloss/obfuscator.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.