Registration Key: single computer, multiple installations [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this questionI am working on an开发者_运维知识库 application that I intend to sell to clients. The clients intend to have several separate installations of the same application on one or more computers. I will be charging them for each separate installation regardless of how many computers they use. My problem is I want to have a unique registration key for each of the installations so that they cannot copy the program from one folder to another without obtaining another license.
So far my only idea is to create a hash of the physical path to the program and the MAC address of the computer. Checking the stored hash with the recalculated hash would tell me if the program had been moved or copied. A big problem is, if the program is stored on a file server and each user access it from a different computer, the path to the exe might not be the same in all cases. Is this a decent solution or are there better ones?
Please try to keep your answers language neutral as I'm writing my application in assembly, not .NET.
If you trust your clients that they are not going to reverse engineer your software protection then a good solution would be the following:
1) You ask from your clients the necessary info you mentioned, MAC and Path
2) You can concatenate these 2 info + a long enough secret seed that you will only know (in order to avoid make it easy for them to generate valid hashes that will be used as decryption keys read below..) and generate a valid hash from all this info.
3) Write a function in your application that is called on startup and uses that hash as a key in order to decrypt the rest of the program.
4) Before sending the application for the new license purchased encrypt the code (except ofcourse the necessary parts that are used by the decryption function) with the new key.
So each time, they will have to ask you for a new copy of the application in order to put it to another folder and/or computer. The decryption key that is going to be read by the decryption function by every copy of the application can be stored in registry in a different regkey or in a file.
I know that it looks complicated but this can work. However, don't forget that also this can be cracked, but if they don't intend to do so, then you will have the results you want.
I hope that helped...
精彩评论