Return-Path: Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mail.saout.de (Postfix) with ESMTP for ; Tue, 23 Mar 2010 09:43:37 +0100 (CET) Received: by wwi14 with SMTP id 14so19377wwi.37 for ; Tue, 23 Mar 2010 01:43:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20100124131101.GA19254@tansi.org> <20100124140205.GA22492@fancy-poultry.org> <20100124230354.GA24786@tansi.org> <4B5D7F8E.1090202@redhat.com> <4B693A25.7040605@redhat.com> <4B697D55.5020304@redhat.com> Date: Tue, 23 Mar 2010 19:43:36 +1100 Message-ID: From: Roscoe Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [dm-crypt] Entropy available for luksFormat during GNU/Linux installs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Woops, only just noticed I had replied off list. -- Roscoe On Thu, Feb 4, 2010 at 7:31 AM, Roscoe wrote: > On Thu, Feb 4, 2010 at 12:42 AM, Milan Broz wrote: >> It is not only about master key, there are at least two other consumers >> of RNG output - AF split and secure keyslot wipe. So both "fast" RNG >> and long-term key quality is needed. > > Well, I'm not overly concerned about those. As you say, other > consumers don't need the security margin of MK. > >>>> And exactly this waiting is solved by gcrypt RNG and I do need >>>> to reimplement it in cryptsetup. >>> >>> I do not understand this sentence. >> >> I want to avoid implementing any "please wait and do some random work >> till kernel collects some entropy" loop in cryptsetup. > > That doesn't relate to my suggestion of an option, but certainly does > relate to any use of /dev/random. > >> At least its _implementation_ requires extensive review. >> (If the real in-kernel encryption key is generated using approved source, >> there is no problem. If we XOR it with another source, it is basically new RNG.) > > The great thing about XORing the output of two random functions is > that you're no worse off than if you had just used either function. > (My view of things is we already rely on the user to produce one > unpredictable string, why not for another? If in the worst case they > just hit enter, we're no worse off than if we had only used > /dev/random.) > (Now that we have the options to specify the master key, I can get > this functionality via the use of an external tool obviously, but it > would be slightly more convenient to have a --user-random switch.) > >> If the RNG source is ok for long-term key use, what additional XOR brings here? >> If RNG is not ok, it should not be used at all. > > That is the big question, how good is Linux's RNG early on in an > install environment? > (gcrypt's RNG in FIPS mode will still as mentioned before hinge on /dev/random) > > > On a similar note, I did notice the lavarnd guy commenting about /dev/random: > "The existence of uniformity flaws indicates that the medium quality > random number generators listed above are not cryptographically strong > random number generators. " > -- http://www.lavarnd.org/what/nist-test.html > > > Regards, > > -- Roscoe >