title: Local storage protection in phonegap application
body: <p>I should develop an <strong>phonegap</strong> application. I need to <strong>encrypt</strong> my requests to the server side and then <strong>decrypt</strong>.
  <strong>HTTPS</strong> is not a solution, because I need to sign requests to be sure that the data is not fake. I can use any async cryptography (the app will generate <code>private/public</code> keys and will send public key to the server). But this way I need to keep my private key on the device.</p>
  
  <p>The question is: how I can keep private key on the device securely?</p>
  
  <p>I can use <a href="http://sqlcipher.net/" rel="nofollow">sqlclipher</a> (to encrypt my local <strong>SQLite DB</strong>) and <a href="http://brodyspark.blogspot.com/2012/12/integrating-sqlcipher-with.html" rel="nofollow">integrate</a> it into my <strong>phonegap app</strong>. Great, but here I have to keep secret key for database :)</p>
  
  <pre><code>var db = window.sqlitePlugin.openDatabase({name: "DB", key: "secret1"});
  </code></pre>
  
  <p>Any one who have access to the phone can get this secret key. So here I have the same issue:)</p>
  
  <p>Please, give me any suggestions.</p>
  
  <p>Thanks!</p>
  
  <p>p.s. app for iOS and Android</p>