Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460097 > unrolled thread
| Started by | Theodore Ts'o <tytso@mit.edu> |
|---|---|
| First post | 2016-08-11 01:50 +0200 |
| Last post | 2016-08-14 20:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2] RANDOM: ATH9K RNG delivers zero bits of entropy Theodore Ts'o <tytso@mit.edu> - 2016-08-11 01:50 +0200
Re: [PATCH v2] RANDOM: ATH9K RNG delivers zero bits of entropy Jason Cooper <jason@lakedaemon.net> - 2016-08-14 20:20 +0200
| From | Theodore Ts'o <tytso@mit.edu> |
|---|---|
| Date | 2016-08-11 01:50 +0200 |
| Subject | Re: [PATCH v2] RANDOM: ATH9K RNG delivers zero bits of entropy |
| Message-ID | <s4Lq1-3su-1@gated-at.bofh.it> |
On Tue, Aug 09, 2016 at 02:04:44PM +0000, Jason Cooper wrote: > > iiuc, Ted, you're saying using the hw_random framework would be > disasterous because despite most drivers having a default quality of 0, > rngd assumes 1 bit of entropy for every bit read? Sorry, what I was trying to say (but failed) was that bypassing the hwrng framework and injecting entropy directly the entropy pool was disatrous. > Thankfully, most hw_random drivers don't set the quality. So unless the > user sets the default_quality param, it's zero. The fact that this is "most" and not "all" does scare me a little. As far as I'm concerned *all* hw_random drivers should set quality to zero, since it should be up to the system administrator. Perhaps the one exception is virtio_rng, since if you don't trust the hypvervisor, the security of the VM is hopeless. That being said, I have seen configurations of KVM which use: -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 Which is somewhat non-ideal. (Try running od -x /dev/random on such a guest system....) - Ted
[toc] | [next] | [standalone]
| From | Jason Cooper <jason@lakedaemon.net> |
|---|---|
| Date | 2016-08-14 20:20 +0200 |
| Message-ID | <s68aR-35C-15@gated-at.bofh.it> |
| In reply to | #1460097 |
Hey Ted, On Wed, Aug 10, 2016 at 07:44:25PM -0400, Theodore Ts'o wrote: > On Tue, Aug 09, 2016 at 02:04:44PM +0000, Jason Cooper wrote: > > iiuc, Ted, you're saying using the hw_random framework would be > > disasterous because despite most drivers having a default quality of 0, > > rngd assumes 1 bit of entropy for every bit read? > > Sorry, what I was trying to say (but failed) was that bypassing the > hwrng framework and injecting entropy directly the entropy pool was > disatrous. Ok, whew. :) > > Thankfully, most hw_random drivers don't set the quality. So unless the > > user sets the default_quality param, it's zero. > > The fact that this is "most" and not "all" does scare me a little. My recent grep showed that only virtio-rng set it to a non-zero value. > As far as I'm concerned *all* hw_random drivers should set quality to > zero, since it should be up to the system administrator. Agreed. Gathering conversation about this from a few related threads, I have one concern. Apparently there is some confusion in userspace consumers of /dev/hwrng data as to the quality of it. Specifically, rngd (spotted by Stephan Mueller) appears to assume 1bit of entropy per 1 bit read. :-/ So, while moving ath9k-rng to the hwrng framework makes complete sense internally, it's not so good for existing userspace assumptions. I'd think that timeriomem-rng falls in this same category. In light of this, do you think it's worth the effort (I'm volunteering) to create a subcategory of hwrng drivers that are 'environemntal' rngs? They can contribute to the kernel entropy pools, but not to /dev/hwrng. thx, Jason.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web