Hi Zaid,

you should probably start reading about encryption in general. From your description, I am uncertain whether you know the difference between Symmetric and Asymmetric Cryptography. The Wikipedia is a good start: <http://en.wikipedia.org/wiki/Cryptography#Modern_cryptography>. You do not have to know the math behind cryptography if you just want to use cryptography, but you should know the use cases of the different technologies.

Once you have got an overview, you should find out, how PGP implements Cryptography. I believe you should not start programming right away, instead you should play around with GPG or the like. Encrypt and decrypt some files, change the password on your PGP key, export keys and import them on another machine or into another keyring. You can find details about the PGP protocol in RFC 4880.

After you know how to use GPG, it will be less difficult to understand the Bouncy Castle Crypto API :-).

There is another popular cryptography protocol, defined by standards X.509, PKIX, S/MIME and PKCS. Maybe these are an alternative to PGP. Bouncy Castle supports both, but I think X.509 has better support in general. Java and C# offer native methods to process those and most operating systems have some kind of support for X.509. X.509 is also used for TLS (e.g. HTTPS). PGP is probably sufficient to achive your goal, though, so this is for bonus ;-).


Good luck and best wishes,

Christoph

On 19.09.2012 02:30, Muhd Zaid wrote:
Hi,

I'm relatively new to encryption and quite frankly I'm lost. Let me try to explain my use case properly..

I need an API that can run both on the client side and the server side. It needs to be able to send 128 bit PGP encrypted xml files to and from the game client and the game server. I've considered looking at the c# implementation of bouncy castle's API since it could easily allow me to make an api that could run as a plugin in-game as well as a standalone program server side. However its sheer size and the lack of good documentation have put me at a loss.

I’ve been following examples from this site http://ledwith.org/2009/08/pgp-decryption-with-c/ but I keep getting the exception “can’t find signing key in key ring”. I’m generating my keys with gpgtools a gnuPG implementation for mac. Quite frankly I don’t know where to start to isolate the problem. As this is my 1st task as a junior programmer at my company, ideally I would like to be able to roll out my own solution for this API but bouncy’s API is so huge and add to the fact I have no encryption experience or background I’m at a loss. I’d be nice if anyone could also highlight the classes that I need to zoom in for use... A little background about myself, I’m CS bachelor but I majored in game development so I know how to code, I’m just lost with how to approach this problem and use bouncy’s API for PGP.

Thanks in advance,
Zaid


Reply via email to