Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1398360ybm; Wed, 22 May 2019 23:53:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhtxUQl5i/b1cI5eZPLvA0UjPbdrMAYV6Vo3sl7QQTuTENhVlicxdveBQoJbdQYPLg6Qh0 X-Received: by 2002:a63:a84c:: with SMTP id i12mr97344395pgp.115.1558594403837; Wed, 22 May 2019 23:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558594403; cv=none; d=google.com; s=arc-20160816; b=Ijkt3qAOWsczMdxNLbSGqaEa55368LJ3CagQfCqSalSB3deCAptu5JRBwe9F9fqjzl YcT+nH2WFTSQ3J+Y38fEIEWHbhyPzZgsrt34lLGAIUAgykpW1lWvn6KPRc44poOlcRZe 1uQ4PHOdaNiX9aueTFIdCUsjpYS45YuPOKx+KSVugz9LX4PxgZcJTr2YztRtoPC9CN/R lTlq0tP/ovxegCG/k7lH+99VL7rX1FX/RBZMizuhs5Nvs4YxH+khIR8/JNjVOT4LsDde YDTZfKd5VijiAM4zjMerPe98Vofxou268e+PyFs3SjIY8iEPx+b4tlGlfXNCzL9nMjhq Nbmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=32bHnU6V8Ub76N9+aIaYoRoLd0LDbRxblzu5mFYCEyY=; b=VShbRSolXuyNO4MGsNeGwmNjGt5CWorOZxem7qv7vGKH8nNJXyD9Jq5bpMuc/Ry1Oc ZAzTrIDXERiko2KJvcB8eWIltdisMa0y7B6c1PZdpwThXygPL+2ZoeITQ7qezZ8DX8vk tR2VZgZahzDn+YeLdb6Yx41m91R74BTfMlk4+tfn6milIpPAzDJEK/OaHSk5Lz3Hr2md mQldSwvQmKwHRd/ALwU3izlpygDJisialGU0F3sy5RtDCm4V9Why9rmM6s3ffRHbfiqf iXu1559zktspOypQ8KeyTh3VKmi+jbVqehjPvZWMz1biwiyuFmo7ltbyNB+z4vlplOxt PIDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si459519pgd.398.2019.05.22.23.53.07; Wed, 22 May 2019 23:53:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726309AbfEWGuv (ORCPT + 99 others); Thu, 23 May 2019 02:50:51 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:47762 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbfEWGuv (ORCPT ); Thu, 23 May 2019 02:50:51 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hThYs-0001mD-G2; Thu, 23 May 2019 14:50:46 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hThYp-0006AI-QT; Thu, 23 May 2019 14:50:43 +0800 Date: Thu, 23 May 2019 14:50:43 +0800 From: Herbert Xu To: Stephan Mueller Cc: Yann Droneaud , linux-crypto@vger.kernel.org Subject: Re: [PATCH v6] crypto: DRBG - add FIPS 140-2 CTRNG for noise source Message-ID: <20190523065043.j3pvpevnvr7i3h53@gondor.apana.org.au> References: <1852500.fyBc0DU23F@positron.chronox.de> <1654549.mqJkfNR9fV@positron.chronox.de> <74c517ac2c654a7372af731a67e24743c843e157.camel@opteya.com> <1778495.GGYfhorZbc@tauon.chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1778495.GGYfhorZbc@tauon.chronox.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, May 08, 2019 at 04:19:24PM +0200, Stephan Mueller wrote: > FIPS 140-2 section 4.9.2 requires a continuous self test of the noise > source. Up to kernel 4.8 drivers/char/random.c provided this continuous > self test. Afterwards it was moved to a location that is inconsistent > with the FIPS 140-2 requirements. The relevant patch was > e192be9d9a30555aae2ca1dc3aad37cba484cd4a . > > Thus, the FIPS 140-2 CTRNG is added to the DRBG when it obtains the > seed. This patch resurrects the function drbg_fips_continous_test that > existed some time ago and applies it to the noise sources. The patch > that removed the drbg_fips_continous_test was > b3614763059b82c26bdd02ffcb1c016c1132aad0 . > > The Jitter RNG implements its own FIPS 140-2 self test and thus does not > need to be subjected to the test in the DRBG. > > The patch contains a tiny fix to ensure proper zeroization in case of an > error during the Jitter RNG data gathering. > > Signed-off-by: Stephan Mueller > --- > crypto/drbg.c | 94 +++++++++++++++++++++++++++++++++++++++++-- > include/crypto/drbg.h | 2 + > 2 files changed, 93 insertions(+), 3 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt