News for hackers. Stuff that matters.
Re:FFS SSL by wolf550e on Friday October 17, 2014 @02:25PM (#8472540)
In this case you are trusting the javascript running in the browser that it does not leak the key it generated. It is safer to just not let the browser ever see the private key.
Re:FFS SSL by MatthewWilkes on Friday October 17, 2014 @02:31PM (#8472591)
keypair generation is done by the browser using the <keygen /> element, not by custom JS.
Re:FFS SSL by antsar on Friday October 17, 2014 @02:43PM (#8472661)
Unless malicious JS is served in place of the <keygen> element, which would be largely undetectable to the user.
Re:FFS SSL by kelnos on Saturday October 18, 2014 @04:42AM (#8474947)
How would said malicious JS then install the generated phony certificate in your browser's cert store?
Re:FFS SSL by antsar on Saturday October 18, 2014 @08:47PM (#8476881)
I'm talking about the step where StartSSL generates an SSL private key for you in the browser (unless you know to click "Skip"). No need to install anything in a browser store, it just brings you to a page with a generated SSL certificate using that key.
Re:FFS SSL by makomk on Friday October 17, 2014 @03:43PM (#8472936)
<keygen>'s really intended for client certificates used to authenticate to websites. I think that (for example) StartSSL use it to generate the private key you use to log into their site, but any private keys you create on their website for things like websites are generated on their server.
Re:FFS SSL by wolf550e on Friday October 17, 2014 @02:47PM (#8472688)
Thanks, I didn't know that. But even if the spec says javascript on the page should not be able to extract the private key and XHR it somewhere, it's just a bug away.
Re:FFS SSL by mikeash on Friday October 17, 2014 @02:44PM (#8472665)
Interesting tag! I hadn't heard of that.

But even so, unless you actually inspect the live DOM and ensure it's really using that element for your session, and inspect enough of the rest of the code to ensure it's not some misdirection, you can't really trust it.

Re:FFS SSL by stevep98 on Friday October 17, 2014 @03:21PM (#8472853)
It's an old deprecated netscape tag. In Netscape/Firefox derived code, it's superceded by the 'crypto' javascript object.
Re:FFS SSL by lmz on Saturday October 18, 2014 @09:54AM (#8475318)
The Netscape specific crypto JS is also gone now: https://bugzilla.mozilla.org/show_bug.cgi?id=1030963 replaced by the Web Crypto API.