security - protect Java Application by licence or key -


i want make desktop application runs on machines have key or licence. how can achieved?

this depends entirely on how secure want make it...

the problem java can reverse compile it. if wanted to, download software, reverse compile it, , remove whatever security have put in place (and redistribute if wanted).

this problem if plan on going mass market , selling , piracy problem though.

if you're not concerned this, can either go online, or offline checking.

the company work uses online method; there few steps:

edit: i've since changed how works, old way maintenance nightmare.

  1. a license file
    • (this can contain whatever want in reality, has unique per user. people go general garb;
    • name
    • company
    • email
    • and key. i.e. jdu8-ajs9-88df-sasf-asf9 kind of thing see.
  2. the program generates hash license file.
    1. put data license file string
    2. pass string hashing function this page can show how.
  3. have program check online (on server). data gets encoded in html request (post/get/json/whatever want) , submitted licence verification page, verifies data. included in data randomly generated string, used verification page generate password. returned program, has used random string generate it's own password. if 2 match, program starts up.

to generate keys, use same hasing function, , upload hash server.

if want offline, include hashes in code guess, , check against them there.

i should point out however, i'm not security expert means, develop company portion of phd , how did it.

edit: image might helpful:

enter image description here

second edit:

i have included "offline verification" in process. it's not offline verification, uses user proxy - need access internet way.

it works this:

  1. no internet connection found: supply user 4 digit code
  2. user goes offline verification page (optimised mobile use too)
  3. user selects software use dropdown list
  4. user enteres username (this field remembers entries)
  5. user enters code program gave them , submits
  6. webpage provides 4 digit code, enter program, , starts.
  7. program adds special data licence file meaning process won't need repeated next week/month/however long.

every time program succesfully verifies online, adds offline access password licence file, means it's robust against temporary internet downtime, , stop working if internet down more week/month/however long it's set work for.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -