[Pcsclite-muscle] max length of randomLen for C_GenerateRandom

Ludovic Rousseau ludovic.rousseau
Thu Apr 20 08:00:10 PDT 2017


2017-04-20 16:42 GMT+02:00 Florent <fdeybach at gmail.com>:

> Hello,
>

Hello,


>
> I have in mind to use a smartcard or a hardware hsm as a random number
> generator via the PKCS#11 C_GenerateRandom function.
>
> However I would need a large amount of bits.
> However the available examples on Internet use small values for the
> randomLen argument (<100 bits) e.g. https://docs.oracle.com/
> cd/E19120-01/open.solaris/819-2145/6n4f2qhq0/index.html
>
> Is there a theoretical maximum value?
> 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?
> I assume it would depend on the smartcard model, right?
>

I suggest you to use a hardware dedicated to random number generation.

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.

Bye

-- 
 Dr. Ludovic Rousseau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20170420/bc5c5c57/attachment.html>



More information about the pcsclite-muscle mailing list