Re: Q for a new API for the random device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06.06.2018 15:11, Stephan Mueller wrote:
> Am Mittwoch, 6. Juni 2018, 14:48:33 CEST schrieb Harald Freudenberger:
>
> Hi Harald,
>> I am still searching for a way to provide our good hardware entropy
>> source to the random pool in the random device driver. So I'd like to
>> have a new arch interface which is called when the random pool finds
>> out that it is running out of entropy. My feeling is that it should
>> not be the only source but should still be mixed with other sources
>> of entropy. It should not be able to dominate or occupy the random
>> pool but contribute to a significant part.
>>
>> As nowadays true random generators provide conditioned data usually
>> with some kind of hashing algorithm a granularity of 4 or 8 bytes is
>> waste of random entropy. The s390 TRNG uses SHA512 and can provide
>> 64 bytes entropy with each invocation. Other TRNGs may use sha1 or
>> sha256 and so provide 20 or 32 bytes of random. However, the API
>> could be something like:
>>
>>   int arch_get_entropy(void *buf, int bufsize);
>
> Why not using the add_hwgenerator_randomness with a kernel thread that is 
> controlled/spawned from the noise source?
>
> Ciao
> Stephan
Had a short glimpse to the mentioned add_hwgenerator_randomness()
and this looks in fact like the API I am looking for :-)
Thanks Stephan, I'll write some code and check this out.

regards H.Freudenberger
>




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux