• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Lock on Bytecode

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
My be this is silly to think "like lock on byte code"..but It may have its own advantages like no one can decompile the class file and get biz logic inside that..
I want to deliver my product to my client and I dont want let him know or modify the business logics used inside the code...Is there any way to protect the byte code from decompiling..

please let me know..

RaghuNath
[ July 20, 2006: Message edited by: RaghuNath Nandyala ]
 
author
Posts: 23931
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One option is to make the code very difficult to read -- to the point of breaking the decompiler.

Just google for "Java Obfuscator". There are a few products that will munge the java bytecodes in a fashion that confuses decompilers.

Henry
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could consider a ClassLoader that decrypts classes on loading. The Jars would contain classes encrypted before they were added to the Jars. Therefore, they wouldn't decompile with an ordinary decompiler.

This makes it harder for people to look at your bytecode, as they've either got to look at the code in-memory while executing (you can make this harder by preventing attachment of an ordinary debugger) or break the encryption.

Have no illusions that this will stop a smart, determined cracker, but it should stop a dumb or lazy one.

For hopefully-obvious reasons, I'm not posting any code, but you might like to consider this approach. It's not so very hard.
 
Raghunath Nandyala
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter Chase and Henry Wong.

Your information is very useful for me.

I hope JVM itself will suport encrypted classes in future versions.

RaghuNath.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic