<div dir="ltr"><div>Hello Werner,</div><div><br></div>Thank you for your answer. <div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8px">Best regards,</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Yann Garcia</span><br style="font-size:12.8px"><span style="font-size:12.8px;color:rgb(0,0,0);white-space:pre-wrap">Senior Software Engineer</span><div><span style="font-size:small">Microsoft MCAD.net Certified</span><br><span style="font-size:12.8px">**************************************</span><br><span style="font-size:small">FSCOM SARL</span><br style="font-size:small"><span style="font-size:small">Le Montespan B2</span><br style="font-size:small"><span style="font-size:10pt;color:navy;font-family:Arial,sans-serif"><a href="https://maps.google.com/?q=6,%C2%A0+Avenue+des+Alpes&entry=gmail&source=g" target="_blank">6,</a> <a href="https://maps.google.com/?q=6,%C2%A0+Avenue+des+Alpes&entry=gmail&source=g" target="_blank">Avenue des Alpes</a></span><span style="font-size:12.8px;color:navy"> </span><br style="font-size:small"><span style="font-size:small">F-06600 Antibes, FRANCE</span><br><span style="font-size:12.8px">************************************************</span><br><span style="font-size:12.8px">Tel: +33 (0)4 92 94 49 08</span><br><span style="font-size:12.8px">Mobile: +33 (0)</span><span style="color:rgb(69,69,69);font-family:Arial,sans-serif;letter-spacing:normal"><font size="2">6 68 94 57 76</font></span><br><span style="font-size:12.8px">Email: </span><b style="font-size:12.8px"><a href="mailto:yann.garcia@fscom.fr" target="_blank">yann.garcia@fscom.fr</a></b></div><div style="font-size:12.8px">Skype: yann.garcia<br>Google+: <a href="mailto:garcia.yann@gmail.com" target="_blank">garcia.yann@gmail.com</a></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 14 Nov 2018 at 18:50, Werner Koch <<a href="mailto:wk@gnupg.org">wk@gnupg.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 13 Nov 2018 09:16, <a href="mailto:garcia.yann@gmail.com" target="_blank">garcia.yann@gmail.com</a> said:<br>
<br>
> I'm looking for sample indicating of to use the function<br>
> nist_generate_key() using ECDH?<br>
<br>
That is an internal function of libgcrypt and you can't use it from your<br>
application. You need to use Libgcrypt's API to do that. Check the<br>
manual for the gcry_pk_genkey function. To create an ECC keypair for<br>
the NIST P-521 curve, you need to use these parameters<br>
<br>
"(genkey(ecc(curve nistp521)(flags nocomp)))"<br>
<br>
convert them to an s-expression object and pass it to gcry_pk_genkey.<br>
There are several examples for it in libgcrypt's soruce code (under<br>
tests/) and you can also look into GnuPG (agent/genkey.c:agent_genkey is<br>
the core which is called from g10/keygen.c:gen_ecc).<br>
<br>
<br>
Salam-Shalom,<br>
<br>
Werner<br>
<br>
-- <br>
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.<br>
</blockquote></div>