Search code examples
c#winformslicensingcryptographybouncycastle

ECC Encryption with BouncyCastle for C#


After reading this post regarding the use ECC to implement the hashing using aa private key I set about trying to find an implementation of ECDH and came across BoucyCastle.

Unfortunately documentation is minimal (as in zerow!) and I'm unsure what I'm about to accomplish is completely correct/valid.

We want to simply hash 4 strings which will be the users registration information (Name, Company, their company ID and their account ID which are both 12 characters long) which will then compute a serial they can use to activate our software.

I have generated a key pair using PUTTYGEN.exe but I cannot workout how to apply this with BouncyCastle, which class can I use to get started? Are there any examples out there?

So far I've concatenated the information and computed a MD5 hash of it (using the .NET classes) I cannot use the new VISTA enhanced API functions as we target XP still - .NET 3.5.

Anyone have any ideas?


Solution

  • I think .NET has the RSACryptoServiceProvider class which is a full RSA implementation.

    There's sample code for your particular application here:

    http://www.codeproject.com/KB/security/xmldsiglic.aspx

    In this example they use MS's sn.exe tool to create the key.