title: End-to-End encryption for a chat application
body: <p>I am trying to build an android chat application just for educational purpose. I would like to try implementing <strong>end-to-end encryption</strong> so that my messages are secure. I thought of using <strong>RSA</strong> as the encryption scheme (I'm new to the field of cryptography)</p>
  <p>This is how I thought I should do it,</p>
  <blockquote>
  <p><strong>Step 1:</strong> Generate public and private key in the Client and Server sides.</p>
  <p><strong>Step 2:</strong> Exchange the public keys. (This means that server will have the public key of each and every client).</p>
  <p><strong>Step 3:</strong> Encrypt the message using the public key of the Server and send to Server or vice-versa.</p>
  <p><strong>Step 4:</strong> The Server can then use its private key to decrypt the message.</p>
  </blockquote>
  <p>So my questions are,</p>
  <blockquote>
  <ol>
  <li>How am I to store the private keys?</li>
  <li>What are the drawbacks of this approach?</li>
  <li>How should this actually be implemented?</li>
  </ol>
  </blockquote>
  <p>Please help me clear this concept</p>