• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Program Product Key?  RSS feed

 
Sam Krupa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey JavaRanch community,
I am writing a Java program (surprise!). Basically, I have been searching endlessly on Google and other furums for the basics of implementing some sort of "product key" into a Java program. I am thinking of the kind of product key that you need to enter into a program to activate it after you have purchased it.

I would really need something that explains everything about it (making a key generator to make keys and automating the license purchasing process).

I think the biggest problem is that I am not even sure what it is called! Any advice would be welcome!

Thanks!
Sam Krupa
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how are you going to stop the classes being de-compiled and the keygen algorithm viewed?
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The vast majority of users isn't going to go to the trouble, and the rest won't be stopped anyway.
 
Ramen Chatterjee
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could also employ code obfuscation techniques

Ramen
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeroen T Wenting:
The vast majority of users isn't going to go to the trouble, and the rest won't be stopped anyway.

But if just one hacker does go through the trouble, he'll spread his fake keys through a "warez" website and all those others looking for an illegal key can just find it there...
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's not all about hackers...

i once developed a b2b application which was distributed free of charge by my customer to his company's branches. the branches had to activate the application, for which they got a product key (free of charge) from my customer.

the point behind the scenes was that my customer was able to control some aspects of the applications (read: user rights, product data views, ...) by the product key.

i remember that the client application read a hard-drive id, which was obfuscated to something shorter. calling my customer with this number, all he had to do was to start a little desktop tool, which recalculated the individual key and mixed it with the coded "access level" for this certain branch.

back on the client side, the returned key was re-obfuscated and the application new exactly about it's access right... :-)

jan
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesper Young:

But if just one hacker does go through the trouble, he'll spread his fake keys through a "warez" website and all those others looking for an illegal key can just find it there...


true, but no amount of obfuscation, encryption, or whatever is going to change that.
What you need to prevent piracy is a completely different businessmodel in which the customer never gets the (vital parts of) the compiled code at all.
This is a subscription based model in which the customer pays to have the product execute on your servers and is billed accordingly (pay per view basically).
If the customer then gives out his account details to everyone and his sister he's going to get one heck of a large bill and will likely also open his business data to crackers, leaving you with no financial loss (except the collection agency and bankruptcy lawyers for your customer maybe) and the customer with a massive bloody nose.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Passing right by the discussion of just how futile it is to try to keep out determined hackers ...

I hit Google for "software license manager" and found http://www.agilis-sw.com/ezlm/. I'm sure there are more products like this around. Flex-LM is another commercial license manager that's widely used. Can't comment on the quality or cost.
 
Sam Krupa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion. I was kind of hoping for something that would instruct me on how to make my own (-: Any guides/how-tos?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!