Ask a Jedi: ColdFusion and PGP

Bob asks:

How can I encrypt text via PGP using CFMX (on Windows)?

ColdFusion has no native PGP abilities. However, you can find solutions on the Developer's Exchange. In fact, there is a free CFC-based one called PGP CFC. I haven't tested this myself, but you might want to check it out.

On a side note - ColdFusion MX 7 added many new encryption features. Check out the docs for Encrypt.

Archived Comments

Comment 1 by RR007 posted on 8/19/2005 at 2:03 AM

How can I reach you to also ask a question. I don't see any contact info here.

Comment 2 by Jim posted on 8/19/2005 at 5:17 AM

I've been using this for years with great success.

http://www.digitaloutlook.c...

Comment 3 by Wayne Graham posted on 8/19/2005 at 6:41 PM

While the CF 7 hash and encrypt is a bit better, it's still not where it needs to be...

I haven't run any "real" tests, but as anecdotal evidence, I've been able to crack passwords within minutes with rainbow tables (http://www.antsight.com/zsl... up to SHA1. You should also check out http://coldfusion.sys-con.c.... The actual zip file is at http://swem.wm.edu/blogs/wa... This was written for CF 6.1 with an older version of GnuPG, and I need to update the code base a bit, but it should give you another way to implement really strong encryption algorithms on your server.

One final note about encryption. In order to get really "good" random numbers, most software relies on ramping up your CPU to create entropy, which can have an affect on your server performance.

Comment 4 by Raymond Camden posted on 8/20/2005 at 1:09 AM

RRR07, email me at ray@camdenfamily.com

Comment 5 by Tamuri posted on 8/21/2005 at 1:18 AM

Raymond,

Thanks for the mention. I try to keep PGP CFC up-to-date <a href="http://www.tamuri.com/">here</a>, but, unfortunately, PGP 8.1 (and up) broke compatibility. I don't believe <a href="http://community.wow.net/gr...">GRT</a> has got round to updating the DLL, and I'm not aware of anyone else who has really made any effort to fix it for the latest version.

Regards,

Tamuri

Comment 6 by Tamuri posted on 8/21/2005 at 1:19 AM

Gosh, no links. Should have noticed.

Apologies!

Comment 7 by Isaac posted on 2/26/2007 at 5:52 AM

In need of a way to deal with PGP in CF - are these links still my best bet in 2007, or are there new/better options?

Comment 8 by Christopher Wigginton posted on 6/3/2007 at 8:59 PM

Here's a solution using the BouncyCastle API to openPGP.

http://www.intersuite.com/c...

Comment 9 by Brian posted on 2/9/2010 at 12:22 AM

There is a project posted on RIAforge for CF 8 and 9
http://pgp.riaforge.com