Your key derivation function is pretty weak. Looking at your code you are doing SHA256(password entered by user). You should take a look at using http://en.wikipedia.org/wiki/PBKDF2 for the key derivation. SHA256 is really fast and given that you are getting entropy from some user entered password (which is likely to be badly chosen) you want something _slow_ to derive the key. Hence PBKDF2 with lots of iterations.
My weekend project - AES encryption for Gmail or anything else
31–40 of 71 posts
Re: My weekend project - AES encryption for Gmail or anything else
#32>Weekend project >encryption Choose one.
Re: My weekend project - AES encryption for Gmail or anything else
#33I 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...
Re: My weekend project - AES encryption for Gmail or anything else
#34Re: My weekend project - AES encryption for Gmail or anything else
#35Earlier quoted context omitted.
Yes, I will install ssl cert in future (at least self signed), understand the risk. Standalone bookmark is great idea, but I am not sure if I can fit script to 2048 bytes. Maybe, I'll make html5 cache manifest to avoid network access.
Don't do your self the disservice of self-signed - you can get a free cert from startssl. 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. (Repeati…
Re: My weekend project - AES encryption for Gmail or anything else
#36Re: My weekend project - AES encryption for Gmail or anything else
#37Earlier quoted context omitted.
Yes, I will install ssl cert in future (at least self signed), understand the risk. Standalone bookmark is great idea, but I am not sure if I can fit script to 2048 bytes. Maybe, I'll make html5 cache manifest to avoid network access.
Don't do your self the disservice of self-signed - you can get a free cert from startssl. 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. (Repeati…
Re: My weekend project - AES encryption for Gmail or anything else
#38Note that Gmail automatically saves your draft as you type it. So while this will offer some protection for the message while it's in transit from Google's server to your destination, your unencrypted message draft will still be sent to Google's servers (and given Google Apps' distributed architecture, I'm not sure you can determine where that unencrypted copy could end up or when it'd be erased). Perhaps a way aroun…
Re: My weekend project - AES encryption for Gmail or anything else
#39Typing The Letters A-E-S Into Your Code? You’re Doing It Wrong
Re: My weekend project - AES encryption for Gmail or anything else
#40Wouldn't it make more sense to revive FireGPG[1] and, while you're at it, port it to all other major browsers? 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 OAu…