How do I best obfuscate my C#.net app Product Key verification code?
Is it enough to place it in a "INTERNAL SEALED CLASS CLASSNAME { };" or do I need to do more?
Thanks!
How do I best obfuscate my C#.net app Product Key verification code?
Is it enough to place it in a "INTERNAL SEALED CLASS CLASSNAME { };" or do I need to do more?
Thanks!
Access modifiers like internal
and sealed
don't have anything to do with obfuscation or code security, they just tell other classes how to interact (or not interact) with them.
At the end of the day, there's nothing you can do to prevent piracy. Anything created by one human can be broken by another. There are loads of questions on SO that deal with product keys, keeping software secure, etc. which you can find if you use the search mechanism in the upper-right. All the answers cover a few basic ideas that anyone with a little sense will tell you:
Research public/private and elliptic key cryptography and you'll find ways to secure your key algorithm, but it will only prevent cracking the key, not bypassing it.
Rex is correct, internal sealed class
won't hide anything. Use a one-way encryption hash (e.g. MD5CryptoServiceProvider) to protect passwords and keys.
Use Microsoft Software Licensing and Protection service.
Software Licensing and Protection Services can help you protect, package, license, sell and control your software.
To protect your IP you can select certain functionality for one-way transformation, and this transformed code runs within a secure virtual machine (SVM), with each vendor receiving a unique SVM
I agree with Rex M, you should consider using an asymmetric encryption algorithm such as elliptic curves cryptography to avoid keygens. And if you are interested in a commercial solution then try Ellipter - it uses elliptic curves and has some useful features like product info and expiration data embedding into generated serial keys.
Making a class internal or sealed won't help your cause. The soure code can be viewed in Reflector anyway. You need to use an obfuscator such as Crypto Obfuscator. For product keys, use a licensing system such as CryptoLicensing.
we are not getting what u r telling in this. we want the answer directly pls provide