Thanks for your help, I was able to get this working using your suggestions
and the original code from encryption
http://www.12robots.com/index.cfm/2010/7/19/Using-Asymmetric-Cryptography-in
-your-ColdFusion-Application--Security-Series-1610. 

I modified that code to add support for the following:

1. Wrapped it all up in a nice CFC
2. Added a generateKeyPair() method to generate the keys
3. Added support for returning the keys as base64 encoded strings
4. The encrypt/decrypt methods accept either a string, java instance or
binary object for the public/private key pair. If a string or binary object
is provided, it will create the java instance from the string/binary
argument and then do the decryption. 

I needed it to work this way, so I could save the public key to the database
and save the private key to a text file (which is downloaded by our end user
for them to hold on to). 

I submitted the CFC to RIAForge in case any one else might find it useful. I
believe I am just waiting for approval now. If any one wants a copy just
email me and I'll send it to you.

Brook Davies

-----Original Message-----
From: denstar [mailto:valliants...@gmail.com] 
Sent: February-15-11 7:31 PM
To: cf-talk
Subject: Re: cfx_pwtextcrypt & CF9


There are examples of doing lots of weird PGP related things here:

http://subversion.assembla.com/svn/cfmlprojects/trunk/src/cfopenpgp/src/tag/
cfopenpgp/cfc/openpgp.cfc

This uses BouncyCastle (you have to add the jars), so it's sorta stand-alone
from what CF comes with.

It's butt-ugly, but there are some tests a couple dirs up and over...

Sounds like the original question was sorted, but I'll toss it out there
anyway, as there's examples in there of doing most the java-ish conversions
and whatnot (bytearray stuff, etc.).

:Den

--
Ideas any one can mould as he wishes.
Josiah Royce

On Thu, Feb 10, 2011 at 1:53 PM, Brook Davies wrote:
>
> We've been using cfx_pwtextcrypt since 2002, its worked fine on all CF 
> versions right up to CF8. However, it looks like on the 64 Bit CF9, it 
> no longer works. I assume it's a COM related issue. Does anyone know for
sure?
>
>
>
> The tag was able to generate a public/private key pair using RSA 512 
> bit encryption and subsequently perform encryption/decryption using 
> the keys generated. Does anyone know if there is a way to do this with 
> CF9 without this CFX?
>
>
>
> Brook D.
>
>
>
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342340
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to