title: Which key-pair type to use in libsodium? What are the different capabilities of each?
body: <p>I want to use a suitable libsodium keypair as user identity but I don't know yet what cryptography features I'll provide.</p>
  
  <p>There seems to be 3 types of keypair generation in libsodium:</p>
  
  <pre><code>crypto_box_keypair()
  crypto_kx_keypair()
  crypto_sign_keypair()
  </code></pre>
  
  <p>Also, there seems to be 3 types of keys:</p>
  
  <pre><code>// Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/libsodium-wrappers/index.d.ts
  export type KeyType = 'curve25519' | 'ed25519' | 'x25519';
  </code></pre>
  
  <p>I don't know which key-type corresponds to which key-pair generation function, or if they correspond at all.</p>
  
  <p>So, the questions:</p>
  
  <ol>
  <li>Each key-pair is designed to be used with some functions (e.g., <code>crypto_box_keypair()</code> with <code>crypto_box_easy()</code>). What is the compatibility matrix between the keypair types &amp; the cryptographic functions/capabilities?</li>
  <li>If there's a key-type that can be used with all functions, which one is it?</li>
  </ol>