title: how to openSSL 1.1.1 ECDH with 25519
body: <p>i need to implement ecdh with 25519 using openssl.</p>
  
  <p>using: </p>
  
  <pre><code>key = EC_KEY_new_by_curve_name(NID_X25519)
  </code></pre>
  
  <p>fails.</p>
  
  <p>using this:</p>
  
  <pre><code>EVP_PKEY *pkey = NULL;
  EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(NID_X25519, NULL);
  EVP_PKEY_keygen_init(pctx);
  EVP_PKEY_keygen(pctx, &amp;pkey);
  </code></pre>
  
  <p>seems to work but i have no idea how to export the public key in uncompressed bin format. or how to import the other sides public key.</p>
  
  <p>any help?</p>