.NET cryptography for licence keys?

前端 未结 6 1156
梦谈多话
梦谈多话 2020-12-14 20:33

I want to create a license key, which cryptography algorithm would you recommend?

Basically the inputs would be:

company name
major ver

6条回答
  •  再見小時候
    2020-12-14 21:18

    If you are doing validation on the customer-side, you want to use asymmetric encryption. That way you do not have to distribute the private key to the customer. I would generate a RSA signature using SHA-256 and a 2048 bit key. If you do that, the cryptographic operations will not be the weak link. A cracker could of course change the code to skip the verification step, but no cryptographic algorithm will help that.

    If you are doing validation server-side, I would choose a SHA-256 based HMAC.

提交回复
热议问题