I want to license my product. The question is about validation and making sure that public key is not changed so is the certificate (Man in the middle attack).
What I have planned so far is;
- I give my EXE with license key and signed certificate (signed with private key) to the customer.
- when customer enters license key, my EXE will validate it using public key (generating hash code, then decrypting certificate to get other hash code and compare)
Now problem is; if someone reverse engineers the EXE, changes the public key with his own public key and get a new certificate generated with his own private key. Then the EXE will always validate the certificate and my EXE is hacked.
Is this possible? If yes, what could be the solution to be sure my public key is not changed?
NOTE: There is no internet connection involved.