Re:Popcount CPU instruction
by eru on Monday September 09, 2019 @01:16AM
(#20915368)
You are a wasting a lot of random bits this way, don't you?
[ Parent
| on HN ]
Not if you already have 2^n bits at hand. In fact, if you have 2^n bits of entropy, popcount is probably more efficient than generating n more bits randomly.
Re:Popcount CPU instruction
by JoachimSchipper on Monday September 09, 2019 @01:39AM
(#20915472)
Sure, but generating random bits is fast with e.g. AES-NI, RdRand or a software implementation of e.g. ChaCha.