Re: max length of randomLen for C_GenerateRandom

Ludovic Rousseau <[email protected]> Thu, 20 Apr 2017 17:00:10 +0200
Newsgroups gmane.comp.lib.muscle
Message-ID <CAGstE8CYnefGoeJvHQCPBXviEmR+QFY7YhRrWSbfEWMmqF5Yiw@mail.gmail.com>
2017-04-20 16:42 GMT+02:00 Florent <[email protected]>:

> 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

_______________________________________________
Pcsclite-muscle mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle