Skip to main content
2 of 3
replaced http://security.stackexchange.com/ with https://security.stackexchange.com/

Using GPG or PGP for symmetric database encryption/decryption in c#

I am looking to symmetrically encrypt/decrypt information in a database. This info consists of short pieces of information, which need to be individually encrypted when a specific method is called.

I have been researching using AES_256 in GCM mode, but keep coming across the recommendation that I should not "roll my own cryptography protocol". see these links for examples

Lessons learned and misconceptions regarding encryption and cryptology

http://stackoverflow.com/questions/4453724/aes-encryption-of-files-with-python

I need to actually incorporate the encrypting/decrypting in code.

Can I viably use GPG or PGP to encrypt/decrypt code, and if so how?

If not, any suggestions as to the best library to use for AES in GCM would be appreciated.

Thanks