I want to send to a client an encrypted file that contains the license data for my application. As I will use asymmetric encryption, I will encrypt the file using a private key and send it to the client. The application on the client's pc will decrypt the sent file using a public key located in the application code.
The threat model I aspect here is that the public key could be extracted from the application .dll files (using .net reflector for example) and used to regenerate the license.
So is there a way to protect my application ?
Update:
I went through the code example in the following link for encryption the xml file.
The problem I am facing now is that both keys will be generated in the client pc same as mine according to the code sample. So is this right or there is a misunderstanding from me?
Also as Alexe Barlescu suggested to use the ProtectedData class to protect the private key, how can I achieve that ?