The perils of security tools

Werner Koch wk at gnupg.org
Wed May 28 09:56:50 EDT 2008


On Wed, 28 May 2008 10:34, pg at futureware.at said:

> Yes. Still, some people are using fopen/fread to access /dev/random, which 
> does pre-fetching on most implementations I saw, so using open/read is 
> preferred for using /dev/random.

It is not an implementaion issue but a requirement of the C standard.
To avoid buffering use

   setvbuf (fp, NULL, _IONBF, 0);

right after the fopen.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.

---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to majordomo at metzdowd.com



More information about the cryptography mailing list