I searched a lot about what is the best way to secure your program and I found many results and there were two good ways. The first one is to hash the mac address of the computer and link it with an activation code but it's still vulnerable. And the second one is to use a usb device but I didn't find any detail so can anybody tell me in details what is the best way and how to implement it please.
-
Are you talking about creating a program where you need a license and you want to make sure that the user has a legitimate license? – Esteban Cervantes Dec 14 '16 at 20:56
-
Yes I am, I want to create a license or something more efficient to my program – Rami ZK Dec 14 '16 at 21:59
-
A license can always be cracked. It is a matter of how "hard" it should be. The hardest the solution is the one that will cost you most. It is a matter of balance between your cost of development and the estimated value of the software. – Simon Dec 14 '16 at 22:36
1 Answers
First of all, you need to consider that it doesn't matter what you do, someone will be able to crack it, and because of this is that you need to consider a balance between the security of your application and how hard you will make it for legitimate users (since you don't want to punish a user who already paid for your product, just because you want to protect your applications from the guys who don't want to pay).
Having this in mind, you could go with digital signatures using asymmetric encryption, where you'll sign your license "activation" with your private key, and then your application will use its public key to verify that the received license was submitted by you. You should also take a look at this discussion (I recommend you to focus on the 2nd answer, not the selected one) and this one.
But again, your objective should be to just make things hard for bad guys, but without punishing your legitimate users, because for an attacker, it could be as easy as de-compiling your program and removing your logic to validate the license (unless you're creating an "always online" application, but usually users don't like that, and I'm saying this as a user).

- 1
- 1

- 323
- 2
- 11
-
thank u a lot I read a lot and I found out that what matter I did to secure my program it could be hacked . – Rami ZK Dec 14 '16 at 23:44
-
but what about using a usb device to use the program , I know it costs more and it will bother the users but I want to know the details how it works or what is the name of that method so I can search it online – Rami ZK Dec 14 '16 at 23:48
-
1I guess you're talking about a dongle: https://en.wikipedia.org/wiki/Software_protection_dongle – Esteban Cervantes Dec 14 '16 at 23:50