Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a Byte Array data which I have to encrypt/Decrypt using Elliptic Curve Cryptography( ECC ) in C#. I did found this article

Elliptic Curve Diffie Hellman Cryptography[^]

but it uses .NET classes. I have to use Bouncy Castle(https://bouncycastle.org/[^]) to implement this because in my project already Bouncy Castle is used to implement RSA.
The problem is for Bouncy Castle Java there is help available online but for Bouncy Castle C# there is no help available.
Posted
Comments
Mateen Khan 2-Dec-15 4:17am    
Dear Phil ,
The Bouncy Castle source code is with me too. Its easily available on net. The problem is How to implement ECC Encryption/Decryption using that? What will be the steps involved?

1 solution

I found their source code/tests/examples/documentation file in less than a minute.
(See my comment for the link).

You should improve your search skills :)
 
Share this answer
 
Comments
Patrice T 2-Dec-15 1:37am    
Easier to ask here and wait for someone to do the search.
Least effort.
Mateen Khan 2-Dec-15 4:22am    
I am doing my research part. Its just that if someone else has implemented it earlier may be he/she can provide some help
phil.o 2-Dec-15 4:48am    
I had a look into the .zip download, and that's true that it is not really evident to find an example in there.
In the archive, go to bccrypto-csharp-1.8.0\crypto\test\src\crypto\test folder; in there, you will find two files that will give you a clue about how to use their library: DHTest.cs and ECDHKEKGeneratorTest.cs.
I can't say more about that; if I had your requirement, I would use the built-in .NET ECDiffieHellman class. Never used the Bouncy Castle library. On a side note, the fact that you already use this library for something else does not force you to use it for this specific cryptographic algorithm. You may find examples for .NET version much more easily.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900