Still no way around SSL… yet

Here I thought I was going to be clever and figure out a way to encrypt browser input going to the server using a fancy-schmancy Javascript public-key encryption mechanism.  I would really like to be rid of SSL if at all possible.  However, after wasting far too much time on it, I have given up Encrypted_lock and resigned myself to using SSL again.

The biggest problem with Javascript public key encryption is STORING the key.  I thought maybe I’d be able to use Dojo’s Flash-based storage mechanism, but that thing is so undocumented and so hard to use that I couldn’t figure it out and I finally gave up.  The other hard part is generating a keypair on the client that will work on the server as well, which is not quite as easy as I thought it would be.  This guy got it working in one direction, but he had to use the server to generate the private key which means you have to somehow send it to the client securely, which is easier said than done.  The only way I could think of to do it was to provide it via an SSL-secured connection, which at that point why not just go ahead and make the entire app SSL-secured and not bother with it.

Anyway, after wasting too much time on this I am surrendering to SSL and moving on.  Someday I’ll attack this problem from my rocking chair in the retirement home or something.

Oh yeah by the way, has anyone else realized that the only pages that are typically ever secured on Web-based applications are the pages where you input your credit card to pay for it?  Did you know that something as simple as the Compose Email form in Gmail sends everything you input in plain text?  How does this kind of security still fly in this day and age?

Share and Enjoy:
  • Print
  • Digg
  • Facebook
  • Google Bookmarks
  • HackerNews
  • Reddit
  • mikeb

    while bits and pieces of this can be done in Javascript without SSL, a major problem that simply cannot be avoided is the man-in-the-middle (MITM) attack. Since the JavaScript code comes from the server, a MITM can do whatever it wants.

    Arguably, the most important thing you get with SSL is authentication of the server.

  • http://www.jasonkolb.com Jason Kolb

    Well, if you're using true public key encryption nothing intercepted in the middle can be decrypted. So although somebody could sniff packets or something, what they'd be seeing is encrypted data which would be useless without the private key. The big issue for me was delivering the private key to the user without exposing it.

  • http://codinginparadise.org Brad Neuberg

    Jason, sorry about Dojo Storage's documentation issues. Here is an FAQ that will hopefully help you in the future:

    http://codinginparadise.org/projects/dojo_storage/faq.html

    Best,
    Brad