title: js signature on chrome with OS keystore
body: <p>W3C is working on a <code>http://www.w3.org/TR/WebCryptoAPI/</code> to define a way to generate digital signatures, encrypton and so on from javascript. Basically defines a new object <code>crypto</code> inside a <code>window</code> object in <code>DOM</code> which must provide javascript with signature and encrypton features. Chrome starts to implement this object which is currently available in its javascript engine (I think in beta stage), I make some tries to generate some signatures with it an seems to work correctly, however I think the most util way to generate digital signatures with this new object is using the private keys in the OS keystore instead to autogenerated key material but this access is not covered in this working draft.</p>
  
  <p>I'm work for a years with a signature applet to deal with OS keystore (MS, Firefox KS, MAC OS X) but I want to do directly in javascript if it's possible to avoid all the problems which applet produces last days... new oracle security requeriments, new MANIFEST.MF attributes, browser blocking plugins and so on which are a real pain!</p>
  
  <p>So I'm looking a javascript way to do so and seems that all major browser take his own way:</p>
  
  <ul>
  <li><p>In internet explorer there is an ActiveXObject to access the windows keystore:</p>
  
  <pre><code>// instantiate the CAPICOM objects
  var store = new ActiveXObject("CAPICOM.Store");
  store.Open(CAPICOM_CURRENT_USER_STORE, "My", CAPICOM_STORE_OPEN_READ_ONLY);
  ...
  </code></pre></li>
  <li><p>To access firefox Keystore seems that firefox add a <code>signText</code> method in <code>window.crypto</code> (more info about firefox webCryptoAPI implementation <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window.crypto" rel="nofollow">here</a> and about the proprietary implementation <a href="https://developer.mozilla.org/en-US/docs/JavaScript_crypto" rel="nofollow">here</a> ):</p>
  
  <p><code>window.crypto.signText("textToSign", "ask");</code></p></li>
  </ul>
  
  <p><strong>EDIT: This firefox method it's deprecated since version 34 because it's not an standard: <a href="https://developer.mozilla.org/en-US/docs/Archive/Mozilla/JavaScript_crypto" rel="nofollow">https://developer.mozilla.org/en-US/docs/Archive/Mozilla/JavaScript_crypto</a></strong></p>
  
  <p>However on chrome seems that currently doesn't exists nothing to do the same. </p>
  
  <p>So Anyone knows how can achieve this in Chrome?
  Anyone knows a common js way to do so in all the browsers? Any advice to give me in the right direction will be appreciated.</p>
  
  <p>Thanks!</p>