23 ms·
Doesn't the Chrome plugin model sort of highlight the way forward? Chrome plugins have their own JavaScript environment, sharing only the DOM with client pages.
by javajosh 14y ago
Doesn't the Chrome plugin model sort of highlight the way forward? Chrome plugins have their own JavaScript environment, sharing only the DOM with client pages. A client wanting to do crypto could, for example, communicate this by mutating a piece of the DOM (for example, setting the text of a meta cleartext node) and then waiting for a DOM mutation in answer (a meta cyphertext node that, from the page's perspective, magically pops into existence).
Anyway, that's how I'd do it. But yes, doing crypto within a page seems to be asking for trouble.
- ville 14y agoBut couldn't this magical meta node as easily be created by malicious code running on the client page?
- javajosh 14y agoI suppose so. But if that's your level of paranoia you probably shouldn't be doing native crypto either, as any process on your machine could be finagling the memory regions of your "secure" program in the same way. In fact, the only secure way to do crypto, I suppose, is pen and paper.