Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Create a trial application

scarnaviascarnavia Posts: 3Member
Hello
I have an application and i want to create a trial version of it. I need a decent solution. My first approach is to create two values in an key registry, in which to hold application install date and last open application date, to control the backdate of the system. But the values in registry keys can be modified by anyone, so this is not a good solution....
if anyoane can help me, pls do...


Comments

  • DataDinkDataDink Posts: 135Member
    Actually a lot of programs use a hidden registry entry and this will keep like 90% of the population from cracking your software.

    There is absolutely no fool-proof way to secure software on someone's hard-drive - just because of the fact that the software itself is now in another person's hands - and especially with .NET - disassembly is really easy to do.

    However, there are a lot of tools out there that will allow you to obfuscate your code, and if you compile your assemblies using an open key it will become much harder to break into.

    Basically your goal is not to eliminate people from hacking your software, but reduce the number of people that are able to as much as possible.

    That being said - what you might try doing is using an encryption hash name for your registry key/folder based off of user-specific/hardware specific information. Hide this in one of several different areas of the registry and make the actual values something cryptic and not easily identified - or better yet, encrypt the values in a way that tampering or removal will cause your software not to work.

    Also - depending on what kind of application you are making, you might try using an alternate deployment method. For example - writing something in silverlight would mean that the person would run your application in a web page. It would still be a full-fledged application, but you would have more control over assembly access - who receives what version of your program.


  • scarnaviascarnavia Posts: 3Member
    thanks for your reply....
    another question :) (i don't have much experience with encryption algorithm)
    how can i "encryption hash name for your registry key/folder based off of user-specific/hardware specific information",
    and decrypted as well?

    thank again
  • DataDinkDataDink Posts: 135Member
    when hashing you don't want to neccessarily what to decrypt the actual hash - you just want to match it... so if you take let's say the following information:

    ComputerName
    VideoCard Make
    Chipset

    and put it into a string
    "Mikes Computer NVidia GeForce Intel Core Duo"
    and then hashed it with MD5 (this is available in the System.Security.Cryptography library) - you would get something like this...

    d41d8cd98f0b24e980998ecf8427e

    Now if you take that same string - you can always find that same entry - but if someone were to even find your registry entry and try to copy it to someone else's computer (let's say from a registered user) you wouldn't be able to find it because you would end up with a different hash.

    As for encrypting the data in your values - there are like a million different approaches to this - you should come up with your own. Try looking up terms like DES and TripleDES - but you might just want to come up with your own method - maybe using a hash key to garble and de-garble your data. It wouldn't really need to be anything very complicated.
  • DataDinkDataDink Posts: 135Member
    Because I've seen this alot in posts I went ahead and blogged a really simple Triple DES encryption implementation.

    [link=http://www.programmersheaven.com/user/DataDink/blog/1040-NET-Triple-DES-encryption-class/]click me[/link]

    Check it out and use it how ever you want.
  • sswaressware Posts: 2Member
    You are much better off using a ready made licensing tool instead of trying to come up with your own. Check out [link=http://www.ssware.com/cryptolicensing/cryptolicensing_net.htm]CryptoLicensing[/link] which does trials as well as full licenses and other scenarios too.
Sign In or Register to comment.