Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 18 Aug 2002 00:53:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 18 Aug 2002 00:53:27 -0400 Received: from waste.org ([209.173.204.2]:22498 "EHLO waste.org") by vger.kernel.org with ESMTP id ; Sun, 18 Aug 2002 00:53:26 -0400 Date: Sat, 17 Aug 2002 23:57:24 -0500 From: Oliver Xymoron To: Robert Love Cc: Linus Torvalds , linux-kernel Subject: Re: [PATCH] (0/4) Entropy accounting fixes Message-ID: <20020818045724.GK21643@waste.org> References: <1029642713.863.2.camel@phantasy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1029642713.863.2.camel@phantasy> User-Agent: Mutt/1.3.28i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2184 Lines: 49 On Sat, Aug 17, 2002 at 11:51:52PM -0400, Robert Love wrote: > On Sat, 2002-08-17 at 23:05, Linus Torvalds wrote: > > > This is particularly true on things like embedded routers, where the > > machine usually doesn't actually _run_ much user-level software, but is > > just shuffling packets back and forth. Your logic seems to make it not add > > any entropy from those packets, which can be _deadly_ if then the router > > is also used for occasionally generating some random numbers for other > > things. > > Agreed. Further, embedded routers - since they are headless/diskless - > have problems even with the _current_ /dev/random code. They simply do > not generate enough entropy to fulfill sshd requests [1]. This analysis actually stemmed from my work to port OpenSSH to a headless (non-UNIX, non-POSIX, non-protected-memory, diskless) network appliance. SSH only needs real entropy for the keys generated by ssh-keygen. It's complete overkill for session keys. And guess what? Stock Portable OpenSSH (v3.4p1) uses /dev/urandom (configure.ac): # Check for user-specified random device, otherwise check /dev/urandom AC_ARG_WITH(random, [ --with-random=FILE read entropy from FILE (default=/dev/urandom)], > Saying "use /dev/urandom" in this case means we may as well not have a > /dev/random. There is a difference between incorrect accounting (which > it seems you have identified) and just too strict gathering behavior. > > Robert Love > > [1] this is why I wrote my netdev-random patches. some machines just > have to take the entropy from the network card... there is nothing > else. This patch is perfectly compatible with your netdev-random patches, in fact I encourage it's resubmission after this one gets in. /dev/urandom users will get all the benefits of network sampling without /dev/random suffering at all. -- "Love the dolphins," she advised him. "Write by W.A.S.T.E.." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/