Suppose I have this scenario:
User --> Inputs License Key --> I validate it --> If success, good, move onto main window. If not, prompt the user to reenter the license key.
The license key will not have activation or hardware ID verification. Just basically enter key and pass or not.
I am wondering about few things when it comes to license key validation.
1) What am I comparing the license key I get from the user to typically when someone performs a license key validation?
How does it determine if the key is valid or not?
What if I had an xml template that included what was needed to generate a key and that xml template had a public key. Would it need to include the private key?
Where in my code/when do I use a private key for validation?
2) After I validate the key and it's valid, I save it inside the datasbase.... If the user reopens the software, do I just do a check to see if a key is stored in the database? How do I perform a daily check to make sure the program is running a valid license? What is typically done in this scenario?
EDIT: More details.
Probably highly insecure but just talking about very basic license key validation using private/public keys.
No hardware ID or activation through server. No License. Just basic check if the key is valid or not.