title: node-jose explanation / example?
body: <p>I want to use token based authentication with JWT (Signed and encrypted if possible). I use NodeJS in server side.</p>
  
  <p>I am trying to use this node-jose module : <a href="https://github.com/cisco/node-jose" rel="noreferrer">https://github.com/cisco/node-jose</a> </p>
  
  <p>I don't know a lot about generate / store keys &amp; cryptographic algorithms. Even if the documentation looks clear, i don't understand the part <strong>keys and key stores</strong> (until the signature part) :
  <a href="https://github.com/cisco/node-jose#keys-and-key-stores" rel="noreferrer">https://github.com/cisco/node-jose#keys-and-key-stores</a></p>
  
  <ul>
  <li><strong>How i need to generate and where i need to store keys in my server node app to then allow me to sign and verify my tokens ? I need to use symetric secret key or asymetric public private key pair ?</strong></li>
  </ul>
  
  <p>I suppose that it depends what i need but because of my level in crypto, i don't know what i need...</p>
  
  <p>Then in the signature part, when i need to use the key, i don't understand well this part <a href="https://github.com/cisco/node-jose#keys-used-for-signing-and-verifying" rel="noreferrer">https://github.com/cisco/node-jose#keys-used-for-signing-and-verifying</a> </p>
  
  <ul>
  <li><strong>How can i know which one use between OCT, EC, RSA etc ? And finally, what is the input Buffer they are talking about in the signature part ?</strong></li>
  </ul>
  
  <p>Could i have explanation / example about these questions ?</p>
  
  <p>Thank you in advance.</p>