Monday, December 18th, 2006

aSSL – Ajax Secure Service Layer

Category: Security, Utility

Francesco Sullo has created aSSL: Ajax Secure Service Layer an open source library built to substitute the need for SSL in Ajax applications.

First a random 128-bit key is negotiated with the server, then, once the connection is established, data is exchanged using BlockTEA. The most recent version of aSSL (v1.1) implements what Francesco calls Double Key Quadruple DES. Future developments will see aSSL move away from DES and towards AES encryption.

aSSL is composed from a file .js and a server component. Currently, the ASP and PHP components are ready. I’m developing Ruby and Java components and in the near future I will add components in all the principal web languages (Perl, Python, TKL, etc.).

Downloads

Posted by Dion Almaer at 6:47 am
19 Comments

+++--
3.6 rating from 26 votes

19 Comments »

Comments feed TrackBack URI

Jason, google Diffie-Helman.

Comment by rob — December 18, 2006

Diffie-Hellman, rather.

Comment by rob — December 18, 2006

Its a neat idea but unfortunately you don’t get the trust factor afforded by verified SSL certificates.

Neat though

Comment by Alexei — December 18, 2006

@ Jason
I put online ad introdution on the mechanism that aSSL uses to establish the connection at http://assl.sullof.com.

@ Hallvar,
you are right…
but there is an imprecision in the post above, caused by my imprecise communication.
Sorry, I am italian and my english is not perfect… (smile)

aSSL won’t substitute SSL, it would not be possible. aSSL wants to offer to the web developers a tool to elevate the security of their sites when they don’t have SSL. In fact I developed aSSL thinking to blogs, chats, etc.

I think that sending login data via aSSL is a compromise between sending them in plain text via HTTP and send them encrypted via HTTPS. In other words the question is “what level of security do you need”?

The man-in-the-middle technique you mention could be appliable to the 99% of the web sites around the Internet. GMail, for example, uses SSL only for authentication. After, it sends pages via HTTP so that a hacker can inject javascript code and capture user’s email, chat messages, etc. Apparently, Google is confident that this is ok. I don’t know…

Really, I planned to write about the security limits of aSSL in some next document, after some technical papers and reference. But since you raised the issue, I will try and put it more in evidence on the site.

@ Alexei
Absolutely true. That is a usability problem.

Thanks for your attention and your critics. This is the beauty of the Internet (smile, again)

Comment by Francesco Sullo — December 18, 2006

Wow, I didn´t know that about GMail. Definitly a discussion about the level of security needed and indeed it does help against nearly all casual attacks. Still, as I pointed out, that does not make it secure against anyone with common knowledge of javascript/DHTML.
Looking forward to more of your stuff!

Comment by Hallvar Helleseth — December 18, 2006

If you require SSL support, don’t use AJAX. The user should be willing to have the page refresh if they want that level of security. While the solution outlined above is infinitely better than no protection, it should not be treated as a full solution. Trust and AJAX, if they happen to become entangled, can cause huge problems.

Comment by Dan — December 18, 2006

@Dan I don´t see your point here, sorry. What does AJAX have to do with security at all? The only problem with AJAX from a security perspective is that it is easier to make mistakes when designing a web application. E.g. treat as if no-one could make AJAX “calls” except the application itself. I´m guessing anyone with the knowledge to make a secure non-AJAX web application is capable of making secure AJAX-enabled web applications.

Comment by Hallvar Helleseth — December 19, 2006

@Hallvar
While I agree that aSSL is vulnerable by man-in-the-middle attacks, such an attack requires more than some knowledge of Javascript/DHTML. With just Javascript/DHTML knowledge, someone could try to sniff account information using a cross-site-scripting approach. But aSSL is absolutely secure about this aspect. Naturally, if the code *around* aSSL isn’t secure, the rest of the site can’t be secure either. But this doesn’t depend from aSSL (o SSL) but only from a bad or inexperienced developer.

A MITM attack is possible, but improbable unless there is a big gain, as it requires much more expertise. The only thing that can protect against this is an SSL certificate. But if the certificate is not good (for example in the event of DNS spoofing), the browser says this with a pop-up that normally people don’t read and just click OK. So SSL itself doesn’t guarantee from an attack if they click OK.

If a bank website were to use aSSL, certainly the hacker’s payload is good, but aSSL is not oriented to this type of sites. Instead, if I use aSSL for my web chat, I don’t think that someone would prepare a MITM attack that requires so much work.

All this to say that we can only point to a level of security. And I think that a web site with aSSL is certainly more secure than a web site without. Like everything else, it needs to be used properly, and in the right places in order to work best. And it would take a little more than knowledge of Javascript/DHTML to break through.

Comment by Francesco Sullo — December 19, 2006

Life is strange, some minutes ago Marco Manfredini wrote me to alarm about a vulnerabity in the aSSL mechanism so I decided to suspend the download of the library to fix the problem as soon as possible.
Sorry.

Comment by Francesco Sullo — December 20, 2006

Last night, at 03:00 am, I fixed the problem by changing the encryption algorithm used to negotiate the Exchange Key. This new version 1.2 alpha now uses RSA to handle this. The code is much less compact but I think the new solution is bullet-proof. In the next days I will put the new files online so that open source community can test it and let me know the results. Hoping well.

Comment by Francesco Sullo — December 21, 2006

No offense, but this is a one man project looked at by a few. SSL is long lived standard verified over and over. Also this fails if the user has no javascript capabilities (hint: think mobile phones, screen readers or search engine crawlers).

This solution is definitely at the wrong layer. A cool technological demo, but useless non the less.

Comment by Cd-MaN — December 22, 2006

@Cd-MaN
I respect your opinion but all the Ajax world is based on Javascript. If a user disables Javascript, or if its device doesn’t support Javascript, all Ajax applications are useless. [wink]
About SSL, you are right, but even SSL was once a new project before it became a standard.
About being useless, I disagree. [1] aSSL is useful in certain contexts and [2] no new ideas are ever useless.

@all
I put online a aSSL 1.2beta example. If anyone is interesting in helping me test the beta, please write me.

Comment by Francesco Sullo — December 22, 2006

Yesterday I released aSSL version 1.2beta3 with a Javascript/ASP server-side component.
In the coming weeks I’ll be working on porting this new aSSL version to PHP and other languages.

The aSSL 1.2 technology is changed respect to the previous 1.1 one.
How aSSL 1.2 works:

1. The browser calls the server to start the process.
2. The server returns its RSA modulus (e.g. the public key) and the public exponent (3 or 10001).
3. The browser generates a random exchange 128-bit key, encrypts it using the server public key and passes the encrypted exchange key to the server.
4. The server receives this encrypted 128-bit exchange key, decrypts it with its private key and, if the result is ok, returns the session duration time.
5. The browser receives the session duration time and sets a timeout to maintain alive the connection.

All subsequent client-server exchanges via aSSL are encrypted and decrypted using the AES Rijndael algorithm.

aSSL 1.2 uses Tom Wu’s BigIntegers and RSA in JavaScript (http://www-cs-students.stanford.edu/%7Etjw/jsbn/) to negotiate the secret 128-bit key and Chriss Veness’s AES Javascript implementation (http://www.movable-type.co.uk/scripts/AES.html) for the next exchanges.

Comment by Francesco Sullo — January 9, 2007

Hey, I’m trying to visit the web (http://assl.sullof.com/) but the link is broken, I would like test aSSL, please send me by email the latest release version to PHP.

I’ll waiting for the help that you can offer to me.

Best Regards.
Alain

Comment by Alain Sanchez — February 15, 2007

Sorry I forget write me email, it is luka dot ghost @ gmail dot com

Comment by Alain Sanchez — February 16, 2007

Any word on the Java implementation of this SSL solution?

Comment by Andre Untiedt — June 27, 2007

I couldn’t download aSSL 1.0 (JS, ASP and PHP) .
When I click on the hyperLink this message appears :

“File is not existent on this server or this download has been suspended…Sorry”

I wonder where and how I can download this version.!
Thanks

Comment by taconite — March 16, 2008

My email ID : f_d_212004 @ yahoo dot com

Comment by taconite — March 16, 2008

Great minds think alike… I developed a similar libaray, before I found this one. It looks like the approach here is similar to my initial version, but I have taken it way beyond what is found here and have solved many of the issues that this library has.

In case anyone is interested, you can contact me at bbroerman at bbroerman dot net and I can send you details. Most of it is not FOSS, but my licensing terms are very very good… I’ll be giving away free copies for the first 20 people who want to give it a try, just so I can get feedback and make it a better product. Free email / IM support is available.

Comment by bbroerman — December 9, 2009

Leave a comment

You must be logged in to post a comment.