Re: [dsfjdssdfsd] getentropy(2)

Benjamin Kaduk <kaduk@MIT.EDU> Tue, 15 July 2014 12:39 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: dsfjdssdfsd@ietfa.amsl.com
Delivered-To: dsfjdssdfsd@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5C71A1B287B for <dsfjdssdfsd@ietfa.amsl.com>; Tue, 15 Jul 2014 05:39:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.652
X-Spam-Level:
X-Spam-Status: No, score=-2.652 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, J_CHICKENPOX_21=0.6, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.651, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2P3M3PlP2TVG for <dsfjdssdfsd@ietfa.amsl.com>; Tue, 15 Jul 2014 05:39:12 -0700 (PDT)
Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu [18.9.25.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A5F0C1B285F for <dsfjdssdfsd@ietf.org>; Tue, 15 Jul 2014 05:39:12 -0700 (PDT)
X-AuditID: 1209190c-f79ef6d000005dd6-8b-53c520ef32c2
Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 67.0E.24022.FE025C35; Tue, 15 Jul 2014 08:39:11 -0400 (EDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s6FCdA0S008173; Tue, 15 Jul 2014 08:39:10 -0400
Received: from multics.mit.edu (system-low-sipb.mit.edu [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s6FCd8mI014351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 15 Jul 2014 08:39:09 -0400
Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id s6FCd7Xx020329; Tue, 15 Jul 2014 08:39:07 -0400 (EDT)
Date: Tue, 15 Jul 2014 08:39:07 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: "Theodore Ts'o" <tytso@MIT.EDU>
In-Reply-To: <20140715082507.GA1451@thunk.org>
Message-ID: <alpine.GSO.1.10.1407150825590.21571@multics.mit.edu>
References: <CACsn0c=nt0bap4QvEwEt1kAP1zQ2p3BS2ykizRUbLPJxOSP4aQ@mail.gmail.com> <20140715082507.GA1451@thunk.org>
User-Agent: Alpine 1.10 (GSO 962 2008-03-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFIsWRmVeSWpSXmKPExsUixCmqrfte4WiwwfzD3BZ3VktY3O/qYnZg 8liy5CeTR8v+a2wBTFFcNimpOZllqUX6dglcGbP+HGQtWMJVcfPGIvYGxpUcXYycHBICJhJz L79mhbDFJC7cW88GYgsJzGaS6L0l2MXIBWRvZJQ4u24vVOIQk8T/JSEQiQZGiQ2vlzKBJFgE tCXu/vwMVsQmoCIx881GMFtEQFni2LIHYDazgKHEg4aNQNs4OIQFNCT+PfUDCXMK6Em0vG9h AbF5BRwldjf+YoTYVSQx5+0csONEBXQkVu+fAlUjKHFy5hMWiJGWEv/W/mKdwCg4C0lqFpLU AkamVYyyKblVurmJmTnFqcm6xcmJeXmpRbqGermZJXqpKaWbGMFBKsmzg/HNQaVDjAIcjEo8 vBLvDgcLsSaWFVfmHmKU5GBSEuUtZjsaLMSXlJ9SmZFYnBFfVJqTWnyIUYKDWUmEt/7fkWAh 3pTEyqrUonyYlDQHi5I471trq2AhgfTEktTs1NSC1CKYrAwHh5IErykwGoUEi1LTUyvSMnNK ENJMHJwgw3mAhkuB1PAWFyTmFmemQ+RPMSpKifPygyQEQBIZpXlwvbAk8opRHOgVYV5JkCoe YAKC634FNJgJaHB5zWGQwSWJCCmpBsay/Soth/X/1K2oPZyw0EluoeGC4l+zfj4Q6porsKfL NFUynfvA9uK+spuXHRbv4swJNI+5kr5CXOOczJHIkH0fy2anrtDkW+hUPTfcNGnDBNt3i07X zas+cKluze0ZFRIv2pa1M37MDfw94cmkLzudjtb9O/03ZgXzrBusjI/3u/OVt8sVVesrsRRn JBpqMRcVJwIAxoWMY/0CAAA=
Archived-At: http://mailarchive.ietf.org/arch/msg/dsfjdssdfsd/Mv8cM2LFfMMGnIll4aU4mf8vwIQ
Cc: "dsfjdssdfsd@ietf.org" <dsfjdssdfsd@ietf.org>
Subject: Re: [dsfjdssdfsd] getentropy(2)
X-BeenThere: dsfjdssdfsd@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "The dsfjdssdfsd list provides a venue for discussion of randomness in IETF protocols, for example related to updating RFC 4086." <dsfjdssdfsd.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dsfjdssdfsd>, <mailto:dsfjdssdfsd-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dsfjdssdfsd/>
List-Post: <mailto:dsfjdssdfsd@ietf.org>
List-Help: <mailto:dsfjdssdfsd-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dsfjdssdfsd>, <mailto:dsfjdssdfsd-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Jul 2014 12:39:14 -0000

On Tue, 15 Jul 2014, Theodore Ts'o wrote:

> But if we get all applications to use the same library, we can
> abstract away not only differences in operating system but also
> security policies vis-a-vis DRBG/NDRBG blocking/nonblocking.  So what
> *I* would prefer is a library interface where the application declares
> what it wants the random numbers for:
>
> * Monte carlo simulations
> * Padding
> * IV
> * Session key
> * long-term key
>
[...]
>
> Basically, I don't want to leave this choice up to the application
> writer, since many application writers won't be competent to make this
> choice, and having consistency across different applications which are
> conform to the organization's designated security officer seems to be
> something that at least some organizations would want.

I'm not confident that [all] application writers will even be competent to 
correctly choose amongst the 5 listed uses [plus whatever others might be 
added].  If it stays a small number of easily identified things, it might 
still be better than only exposing the blocking/nonblocking-ness directly, 
but it doesn't seem clear-cut to me.

BTW, FreeBSD exposes a sysctl MIB (CTL_KERN.KERN_ARND) to get entropy 
directly, saving syscalls over open("/dev/[u]random")/read()/close().

-Ben