title: OpenSSL EdDSA Specify Key Size
body: <p>I need to generate some keypairs with the ed25519 curve for NodeJS's <code>elliptic</code> module for a project I'm working on. After some searching, a discovered that this can be done with the following command:</p>
  
  <pre class="lang-none prettyprint-override"><code>openssl genpkey -algorithm ed25519 -out private.pem
  </code></pre>
  
  <p>However, this always generates a key of 64 characters in length. I wish to specify a certain size for the key though. Is this possible using OpenSSL? If not, could I please be pointed to a method by which to securely generate such keys with a set size elsewhere?</p>
  
  <p>Also, I am very new to elliptic curve cryptography, and don't quite yet understand how EdDSA keys are generated. So please tell me if I've completely failed at understanding this, and please explain where I've gone terribly wrong if so.</p>