<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-04-20 16:42 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">Hello,</div></blockquote><div><br></div><div>Hello,<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><br></div><div>I have in mind to use a smartcard or a hardware hsm as a random number generator via the PKCS#11 C_GenerateRandom function.</div><div><br></div><div>However I would need a large amount of bits. </div><div>However the available examples on Internet use small values for the randomLen argument (<100 bits) e.g. <a href="https://docs.oracle.com/cd/E19120-01/open.solaris/819-2145/6n4f2qhq0/index.html" target="_blank">https://docs.oracle.com/<wbr>cd/E19120-01/open.solaris/819-<wbr>2145/6n4f2qhq0/index.html</a></div><div><br></div><div>Is there a theoretical maximum value?</div><div>Could I ask for 1000000000 bits at one time for example ? Or will I have to call several times the function in a loop with small values?</div><div>I assume it would depend on the smartcard model, right?</div></div></blockquote><div><br></div><div>I suggest you to use a hardware dedicated to random number generation.<br><br></div><div>A smart card may be too slow for you. 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><br>Bye<br clear="all"></div></div><br>-- <br><div class="gmail_signature"> Dr. Ludovic Rousseau</div>
</div></div>