My weekend project - AES encryption for Gmail or anything else
encipher.it
encipher.it
I am still disappointed that PGP in the browser never gained traction. Not only would it help with e-mail security, it could also be used for passwordless website logins, portable web identities, all that jazz[2].
One proper, user-friendly browser plugin could put an end to all those nasty kludges called OAuth, OpenID, LastPass, etc...
I can imagine an extension for Chrome or Firefox that will not be updated without my knowledge and has been peer reviewed like gnupg.
But yeah, like you said, if you're only checking emails on machines that are secure and in your control, you might as well just install Tbird/Enigmail. And if you're at the library or a computer lab, you can't trust the client to be secure.
It could still read your email after decryption and show ads based on that, it would be easy to do with JS. Search would be broken though unless they encrypt each word separately, but that would make your inbox size grow quickly, still doable.
Since I have zero experience with JS, I'm thankful for any help. Code is on: https://github.com/Mononofu/CryptoChrome
The plugin I'm using was compiled on Ubuntu x64 and probably doesn't work anywhere else. It was written using firebreath, basically it's just a wrapper to gpg.
A SHA{1,2,3,128,256,512} hash is very VERY VERY fast. So fast, in fact, that an attacker who has the hash could easily run through all 8 character passwords given a few GPU machine clusters.
PBKDF2 is very much like a SHA hash, but it is repeated over and over. Instead of just salt||SHA1(password||salt) you compute salt||SHA1(SHA1(SHA1(SHA1(SHA1(password||salt))))). This makes it so an attacker with the hash has to do much more work in order to brute force the password.
Now, that's not exactly how it works, but just read the wikipedia article for that.
javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://encipher.it/javascripts/inject.js';})();
You should consider moving to https. After all, what's the point in providing this kind of script if anyone can MITM it ?Besides that, this is pretty cool. Could you provide a standalone bookmarlet which doesn't need to download any scripts ?
The basic problem here is that JS is too dynamic to ensure this type of security. Any script running on the page can rebind any value, monitor or trigger any event, or a number of other things. Without SSL or similar, an attacker can inject any script they want into the page.
The simplest variant of such an attack would be a script that replaces your AES function with a ROT13 or other useless cipher. There are variations on this theme, and in the end it's impossible to defend against all of them.
It's still a good, if imperfect, solution for other use-cases.
See there: https://www.squarefree.com/bookmarklets/limits.html
I just tested a 1Mb bookmarlet on chromium and it works.
The CA landscape has changed.... what used to be expensive and required a lot of paperwork is getting cheap/free, and CAs are pushing "Extended validation" certificates and whatnot (the ones that turn your browser bar green, etc....)
Just hit up startssl and get a real certificate... it's that easy. No strings attached.
(Repeating this because I ignored it for about a year until actually checking it out and realizing I'd been an idiot)
ALSO
Given the single utility of this - just inline the scripts you need and avoid the request overhead. You can probably strip out all the functions you don't need to minimize the load time. You could offer a minimized version as well....
ALSO
Very cool! Thanks!
I think encryption is something more people might use if it were accessible.
But it's hard enough as it is without making it so easy that Joe Sixpack could use it -- especially since implementations as we know it require Joe Sixpack to understand what he's doing or else the encryption fails.
However, tools like this at least give us prototypes for ideas that could one-day bridge the gap.
Good job, dude. Hope you stick with it and find a way to make it better.
Perhaps a way around that could be to enhance a text input field so that only the final encrypted message is written to it, so Google's app does not see the plain text.
Cool project though :)
Don't type stuff into a program you didn't write if you don't want the author to see it.
>encryption
Choose one.
Typing The Letters A-E-S Into Your Code? You’re Doing It Wrong
You should also use SJCL's AES.
Here's the link: http://bitwiseshiftleft.github.com/sjcl/
It would be better to HMAC the ciphertext with a second key value.
I am not sure though, if it is possible to create a multipart message using JavaScript in gmail.
That combined with the poor crypto practices makes it rather unusable, but it's a fantastic concept! Just needs a bit of work.
I also created recently a weekend project based on client-side encryption: https://whisperpassword.com , I need to learn about design though ;-)
http://blog.chromium.org/2011/06/new-chromium-security-featu...
"Firefox or Goole Chrome:" (missing _g_ in Google)