From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2721 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: Sat, 2 Feb 2013 23:11:11 +0100 Message-ID: <20130202221110.GM6181@port70.net> References: <1359830731-24717-1-git-send-email-basile@opensource.dyc.edu> <510D6E30.60206@barfooze.de> 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 1359843085 9060 80.91.229.3 (2 Feb 2013 22:11:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Feb 2013 22:11:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2722-gllmg-musl=m.gmane.org@lists.openwall.com Sat Feb 02 23:11:46 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 1U1lJJ-0008Dw-AE for gllmg-musl@plane.gmane.org; Sat, 02 Feb 2013 23:11:45 +0100 Original-Received: (qmail 30258 invoked by uid 550); 2 Feb 2013 22:11:26 -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 30250 invoked from network); 2 Feb 2013 22:11:26 -0000 Content-Disposition: inline In-Reply-To: <510D6E30.60206@barfooze.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2721 Archived-At: * John Spencer [2013-02-02 20:51:12 +0100]: > + unsigned long r = ts.tv_nsec + (uintptr_t)&ts / 16 + (uintptr_t)x6; i recommend a multiplier here, eg. with r = nsec*1664525 + A; if only the last few bits of nsec are uniform random then the top bits of A are not immediately known from r ..only the top bits of A*4276115653 can be known (1664525*4276115653 == 1 mod 2^32) and that's probably less useful for an attacker