Search code examples
cryptographyenterprise-librarypgp

PGP and the Cryptography Application Block


I just had a request to add PGP support to a web application and web service that I'm developing. I currently am using the Enterprise Library, and would like to use the Cryptography Application Block (CAB) that I'm already using, but I can't find any information on supporting PGP with the Enterprise Library's CAB. I would figure as much as both of these technologies are used, and the fact that the CAB is extensible, someone would have provided some support for this. Is there something I'm overlooking, or can someone provide links on using the CAB with PGP.

I don't know all the details as of yet as to why they want to use PGP, but I'm assuming that blocks of information are going to be encrypted with a PGP public key and posted to the Web service, so I would need to use a private key programatically on the server side to decrypt to get to the information being posted. It sounds like a horrible idea, but my part is not the planning, only the implementation.


Solution

  • The crypto block API isn't set up for public key algorithms, unfortunately. It handles hashing and symmetric (single key) algorithms only.