[124884] in cryptography@c2.net mail archive
Re: The perils of security tools
daemon@ATHENA.MIT.EDU (Werner Koch)
Fri May 30 13:31:14 2008
From: Werner Koch <wk@gnupg.org>
To: Philipp =?utf-8?Q?G=C3=BChring?= <pg@futureware.at>
Cc: Cryptography <cryptography@metzdowd.com>
Date: Wed, 28 May 2008 15:56:50 +0200
In-Reply-To: <200805281034.54061.pg@futureware.at> ("Philipp =?utf-8?Q?G?=
=?utf-8?Q?=C3=BChring=22's?=
message of "Wed, 28 May 2008 10:34:53 +0200")
On Wed, 28 May 2008 10:34, pg@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@metzdowd.com