title: Generating public ed25519 key with OpenSSL
body: <p>I'm using this command to generate private ed25519 key:</p>
  <pre><code>openssl genpkey -algorithm ed25519 -out private.pem
  </code></pre>
  <p>and this is the example result:</p>
  <pre><code>-----BEGIN PRIVATE KEY-----
  MC4CAQAwBQYDK2VwBCIEIAYIsKL0xkTkAXDhUN6eDheqODEOGyFZ04jsgFNCFxZf
  -----END PRIVATE KEY-----
  </code></pre>
  <p>So then I want to generate a public key based on this private key and I do it like this:</p>
  <pre><code>openssl pkey -in private.pem -out public.pem
  </code></pre>
  <p>but with this command I still get a private key that looks like this:</p>
  <pre><code>-----BEGIN PRIVATE KEY-----
  MC4CAQAwBQYDK2VwBCIEIAYIsKL0xkTkAXDhUN6eDheqODEOGyFZ04jsgFNCFxZf
  -----END PRIVATE KEY-----
  </code></pre>
  <p>Additionally, this private and &quot;public&quot; key is not 32-bytes, but 64. What's wrong with my command?</p>