I agree with Zac that SSL is likely to be your best bet for this.

The challenge with symmetric encryption is secure key agreement: both the
sender and the receiver must use the same key, but the key must be not be
visible to eavesdroppers. There are two ways to go about this: using a
secure channel to transfer the key, or using a secure key exchange system
such as Diffie-Hellman.

The most common secure channel for the Web is of course SSL. However if SSL
is available to you, you may as well let it encrypt your data for you. Your
browser's SSL implementation will be faster and more robust than anything
you can roll yourself.

In cases where a secure channel is not available, a secure key exchange
system such as Diffie-Hellman is needed. DH works well, however it is
extremely computationally expensive and any JavaScript implementation would
be horrendously slow. All the alternatives to DH that I know of are even
slower.

-- Dennis


On 4 August 2011 14:55, Zac Spitzer <zac.spit...@gmail.com> wrote:

> bcrypt is pretty good, but the main problem with any decent encryption
> in js is as usual IE which is slow and good encryption needs to be
> complex... wouldn't using SSL suffice?
>
> http://code.google.com/p/javascript-bcrypt/
>
> On Thu, Aug 4, 2011 at 2:48 PM, Steve Onnis <st...@cfcentral.com.au>
> wrote:
> > Basically i need something that i can use to encode/decode the same way
> in
> > both cfml and javascript
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > From: Paul Kukiel [mailto:kuki...@gmail.com]
> > Sent: Thursday, 4 August 2011 2:39 PM
> > To: cfaussie@googlegroups.com
> > Subject: Re: [cfaussie] JavaScript equivelant to HASH function
> >
> >
> >
> > hash by default is MD5 as long as you are using md5 then:
> >
> >
> >
> > http://pajhome.org.uk/crypt/md5/
> >
> >
> >
> > Works well.
> >
> >
> >
> > Paul
> >
> > On Thu, Aug 4, 2011 at 2:33 PM, Steve Onnis <st...@cfcentral.com.au>
> wrote:
> >
> > Does anyone know if there is a JavaScript equivelant to the coldfusion
> > HASH() function?
> >
> >
> >
> > Steve
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "cfaussie" group.
> > To post to this group, send email to cfaussie@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cfaussie+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/cfaussie?hl=en.
> >
> >
> > --
> > Paul Kukiel
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "cfaussie" group.
> > To post to this group, send email to cfaussie@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cfaussie+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/cfaussie?hl=en.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "cfaussie" group.
> > To post to this group, send email to cfaussie@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cfaussie+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/cfaussie?hl=en.
> >
>
>
>
> --
> Zac Spitzer
> Solution Architect / Director
> Ennoble Consultancy Australia
> http://www.ennoble.com.au
> http://zacster.blogspot.com
> +61 405 847 168
>
> --
> You received this message because you are subscribed to the Google Groups
> "cfaussie" group.
> To post to this group, send email to cfaussie@googlegroups.com.
> To unsubscribe from this group, send email to
> cfaussie+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cfaussie?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to