Page MenuHomePhabricator

0 bytes of randomness leftover in the buffer. Is this a problem?
Closed, InvalidPublic


in debug log, there is a line state that:

[CryptRand] 0 bytes of randomness leftover in the buffer.

I have searched about this line but not much helpful information available.

The only information I found for CryptRand is .

The MWCryptRand class is a cryptographic random generator class used for generating secret keys. This is based in part on Drupal code as well as what we used in our own code prior to introduction of this class.

Is the "0 bytes of randomness leftover" a severe problem? Do we need to fix it?

Event Timeline

Zoglun created this task.Feb 10 2019, 12:44 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 10 2019, 12:44 PM
matmarex closed this task as Invalid.Feb 11 2019, 3:20 PM
matmarex added a subscriber: matmarex.

Note that this code has been removed in rMW9bab7de5f8a2: Clean up CSPRNG support for PHP7 (MW 1.32).

Looking at the code there, this message almost certainly does not indicate any problems. There is a code comment nearby that implies that more random data will be generated when needed. And it was being logged as a "debug" message, as opposed to anything more scary, like a warning.

Cool, thank you @matmarex !