<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-04-20 17:15 GMT+02:00 Florent <span dir="ltr"><<a href="mailto:fdeybach@gmail.com" target="_blank">fdeybach@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks for your answer Ludovic.<br></div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-m_2736129333700748091gmail-"><div>I suggest you to use a hardware dedicated to random number generation.<br></div></span></div></div></div></blockquote><div><br></div></span><div>Yes, this is of course the main option I have in mind.</div><div>My question remains theoretical in the event we don't trust any of the TRNG vendors (<a href="https://en.wikipedia.org/wiki/Comparison_of_hardware_random_number_generators" target="_blank">https://en.wikipedia.org/<wbr>wiki/Comparison_of_hardware_<wbr>random_number_generators</a>).</div><div>I may have more confidence in a certified card, like the JCOP 2.4.1r3 which has been evaluated according to the AIS 31 of the BSI.</div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-m_2736129333700748091gmail-"><div></div></span><div>A smart card may be too slow for you.</div></div></div></div></blockquote><div><br></div></span><div>Yes, I am aware of that. But certified TRNG are also very slow (75 kbps for the <span style="background-color:rgb(248,249,250);color:rgb(0,0,0);font-family:sans-serif;font-size:11.9px;text-align:center">Quantis AIS31 for example).</span></div><div><span style="background-color:rgb(248,249,250);color:rgb(0,0,0);font-family:sans-serif;font-size:11.9px;text-align:center">Let's just say that the time is not a issue for me :)</span></div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Also I am not sure that the data returned by C_GenerateRandom() always comes from the smart card. It depends on the PKCS#11 library you use.<br></div></div></div></div></blockquote><div><br></div></span><div>Yes, you're right. Thanks for the warning. In order to be sure I would need the source code of the PKCS#11 library, right?</div></div></div></div></blockquote><div><br></div><div>Yes. Or you have to trust the vendor :-)<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>So by the content of your answer, I presume this hasn't been tested/considered yet? (assuming the data comes genuinely from the internal generator of the card).</div></div></div></div></blockquote><div><br></div>I guess that OpenSC is implementing C_GenerateRandom correctly (after a quick review of the code).<br><br>Another option is to use the ISO 7816-4 GET CHALLENGE command [1] if your card suport it.<br><br></div><div class="gmail_quote">Bye<br></div><div class="gmail_quote"><br>[1] <a href="http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_6_basic_interindustry_commands.aspx#chap6_15">http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_6_basic_interindustry_commands.aspx#chap6_15</a><br><br></div>-- <br><div class="gmail_signature"> Dr. Ludovic Rousseau</div>
</div></div>