<div dir="ltr">Hello Stephen,<div><br></div><div>Thanks a lot for your response.</div><div>Does it mean that RFC 2898. is not supported? <br></div><div><br></div><div>Best regards,<div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 12 Nov 2018 at 13:47, Stephan Mueller <<a href="mailto:smueller@chronox.de">smueller@chronox.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Montag, 12. November 2018, 13:24:01 CET schrieb Yann Garcia:<br>
<br>
Hi Yann,<br>
<br>
> Dear All,<br>
> <br>
> I want to implement ECIES encryption. To do it, I have to 1) generate ECDH<br>
> secret key (the key agreement) and then 2) derive it using Key Derivation<br>
> Function 2 (KDF2).<br>
> <br>
> 1) For the key agreement, I need to generate a random number.<br>
<br>
You need to have the local private ECDH key and the remote public ECDH key. A <br>
plain random number does not work as you need to send the local public ECDH <br>
key to your recipient as otherwise he cannot decrypt it.<br>
<br>
> Can you<br>
> indicate me the best way to generate this random number because in the<br>
> help, clause 9.2 Retrieving random numbers, I found 3 different methods and<br>
> I don't know which one is the best for my purpose?<br>
> <br>
> 2) Is it correct to use the function gcry_kdf_derive() with GCRY_KDF_PBKDF2<br>
> flag to do the Key Derivation Function 2?<br>
<br>
Nope, PBKDF is not allowed. Key-based KDFs like SP800-108 or RFC5967 are ok. I <br>
am not sure libgcrypt offers a native implementation of those.<br>
> <br>
> 3) Does the libgcrypt provides samples for ECIES encryption?<br>
> <br>
> Many thanks in advance for your help,<br>
> <br>
> Best regards,<br>
> Yann Garcia<br>
> Senior Software Engineer<br>
> Microsoft MCAD.net Certified<br>
> **************************************<br>
> FSCOM SARL<br>
> Le Montespan B2<br>
> 6,<br>
> <<a href="https://maps.google.com/?q=6,%C2%A0+Avenue+des+Alpes&entry=gmail&source=g" rel="noreferrer" target="_blank">https://maps.google.com/?q=6,%C2%A0+Avenue+des+Alpes&entry=gmail&source=g</a>><br>
> Avenue des Alpes<br>
> <<a href="https://maps.google.com/?q=6,%C2%A0+Avenue+des+Alpes&entry=gmail&source=g" rel="noreferrer" target="_blank">https://maps.google.com/?q=6,%C2%A0+Avenue+des+Alpes&entry=gmail&source=g</a>><br>
> F-06600 Antibes, FRANCE<br>
> ************************************************<br>
> Tel: +33 (0)4 92 94 49 08<br>
> Mobile: +33 (0)7 61 00 77 05<br>
> Email: *<a href="mailto:yann.garcia@fscom.fr" target="_blank">yann.garcia@fscom.fr</a>* <<a href="mailto:yann.garcia@fscom.fr" target="_blank">yann.garcia@fscom.fr</a>><br>
> <a href="mailto:Yann.Garcia_EXT@etsi.org" target="_blank">Yann.Garcia_EXT@etsi.org</a><br>
> Skype: yann.garcia<br>
> Google+: <a href="mailto:garcia.yann@gmail.com" target="_blank">garcia.yann@gmail.com</a><br>
<br>
<br>
<br>
Ciao<br>
Stephan<br>
<br>
<br>
</blockquote></div>