I'm looking for an advice regarding cryptography.
I'm working on a .Net application which I need to create a license for it, so I plan to create an encrypted license file which my application will use to know if it is licensed or not.
Handling license is as following:
License Generation:
- Generate unique symmetric key.
- Use symmetric key to encrypt license information.
- Use asymmetric public key to encrypt symmetric key.
- Write encrypted symmetric key and encrypted license information to file.
License Decryption:
- My application will read license file.
- Decrypt symmetric key using asymmetric private key which is embedded xml file inside dll.
- Use decrypted symmetric key to decrypt license information.
My questions are:
- If the dll which is responsible for decrypting the license has the asymmetric private key as xml embedded resource, is it possible to spy on the dll to get the key and generate a new license?
- Is there another technique I can use which is more secure?