> (Unfortunately, this is not as great as in desktop applications because it is not feasible to completely protect against code injection, malicious servers and side-channel attacks.)
The browser is not a secure environment and cannot be. You cannot guarantee security in the browser even if you control the server-side of the application, let alone when someone else does. In other words, Google can still read every bit of email you send/receive in cleartext.
The only way I see how one could make something like this work is by creating a browser plugin where the cleartext runs outside the context of the browser process (perhaps in Java?). If cleartext ever exists inside a JavaScript interface, it's game over.
I upvoted this post because we do need more discussion of security and especially usability of security. However, unfortunately, this provides no real security.