From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2701 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] Add support for mkostemp, mkstemps and mkostemps Date: Wed, 30 Jan 2013 14:45:37 +0100 Message-ID: <20130130134537.GF6181@port70.net> References: <1359349583-3643-1-git-send-email-basile@opensource.dyc.edu> <20130128093755.GI10600@port70.net> <5108583B.4080002@opensource.dyc.edu> <20130130072108.GN20323@brightrain.aerifal.cx> <5108D2F7.3050207@qomboo.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1359553552 8325 80.91.229.3 (30 Jan 2013 13:45:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jan 2013 13:45:52 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2702-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 30 14:46:12 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U0XzP-000598-D3 for gllmg-musl@plane.gmane.org; Wed, 30 Jan 2013 14:46:11 +0100 Original-Received: (qmail 15432 invoked by uid 550); 30 Jan 2013 13:45:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15423 invoked from network); 30 Jan 2013 13:45:50 -0000 Content-Disposition: inline In-Reply-To: <5108D2F7.3050207@qomboo.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2701 Archived-At: * Hardy Falk [2013-01-30 08:59:51 +0100]: > Am 30.01.2013 08:21, schrieb Rich Felker: > >On Tue, Jan 29, 2013 at 06:16:11PM -0500, Anthony G. Basile wrote: > >>>implement, but the random name generator definitely needs a better > >>>algorithm. I just adopted what was already there, but its not good > >>>enough. > >>> > You should try "shr3" by George Marsaglia (rip) no, we dont need a prng there, we get new entropy at each try from the clock source the statistical quality may be improved a bit with different hashing of the time and addresses, but it is reasonable now for retries the iteration count and the previous rand could be used as well, but that's a rare case more significant improvement can be done by larger set of names and better entropy source the current 24bit should be good enough for most practical use (you can generate a few thousand names before a collision happens, assuming uniform distribution) but that may be worth increasing the entropy source is mostly problematic on embedded systems with bad clock, but there is probably no good source at all there > https://groups.google.com/forum/?fromgroups=#!msg/sci.math/k3kVM8KwR-s/jxPdZl8XWZkJ i could not open this another evil from google..