From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6914 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Daniel_Cegie=C5=82ka?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: getrandom syscall Date: Wed, 28 Jan 2015 20:33:59 +0100 Message-ID: References: <20150128145410.GH4574@brightrain.aerifal.cx> <20150128154108.GH32318@port70.net> <20150128160352.GI32318@port70.net> <20150128162104.GJ4574@brightrain.aerifal.cx> <20150128191746.GK4574@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1422473675 10937 80.91.229.3 (28 Jan 2015 19:34:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2015 19:34:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6927-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 28 20:34:34 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YGYNl-0004wQ-4N for gllmg-musl@m.gmane.org; Wed, 28 Jan 2015 20:34:33 +0100 Original-Received: (qmail 12274 invoked by uid 550); 28 Jan 2015 19:34:31 -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 12263 invoked from network); 28 Jan 2015 19:34:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=WR3Nj4mMfbHS+HWASgvFOvxnzpcohqC4+YxbJiM1oYs=; b=aZ46XOFLgJQRjfz1SoGjPXcv4CAuutRLZRH6S6NR0GG7o/wmWSr9kspLWiK4+MNvPD D9llkjGDiQ1BlwRJcAFLvtfAsiTjPhWtaVXlhirmA2ao8DDBxtwvTOzES4OiZvNNgi9y W3yBhbHs6bBkeBp0db1/FWpqx/InLIenYDPZdxRvz5uBtMM7CW0vq14BLJJiFnyJu0f9 hmI8+syotYUMb+jzLUcbEmuXXnHTP9yL5WeAHHtLcC6eRW1KKHcA7y5KLQHJzEYGuZNL RNYtMUS8HbG84z1h1nvDDWJWpY88CrwEPKuTm4S1+v5OSj7J8MgvLvoh50z8DwnTQbkf Ml+Q== X-Received: by 10.202.98.2 with SMTP id w2mr3027568oib.15.1422473659537; Wed, 28 Jan 2015 11:34:19 -0800 (PST) In-Reply-To: <20150128191746.GK4574@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:6914 Archived-At: 2015-01-28 20:17 GMT+01:00 Rich Felker : > On Wed, Jan 28, 2015 at 11:43:17AM -0600, Brent Cook wrote: >> Here is the wrapper in LibreSSL for getrandom, to hopefully lend to >> the discussion: >> >> https://github.com/libressl-portable/openbsd/blob/master/src/lib/libcrypto/crypto/getentropy_linux.c#L194 > > This version is failing to set errno when rejecting len>256, which > looks bad. http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2?query=getentropy&sec=2 linux getrandom() is not limited to 256 bytes, but len>256 bytes is problematic. Very similar and so different :) Daniel > Rich