Encrypting Java Code

M

Mike

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
 
D

Daniel Dyer

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

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.
 
A

Alun Harford

Mike said:
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
 
B

Benji

Mike said:
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. ;-)
 
B

Benji

Mike said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top