Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7714701ybi; Wed, 5 Jun 2019 23:51:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjI8yCNEn2UboBiBYoFOqhH5LHUadjv+N+WMm1cI30U9GQfGnr7AgjxVA5IRqQtkechtSA X-Received: by 2002:a62:198e:: with SMTP id 136mr49809678pfz.180.1559803916992; Wed, 05 Jun 2019 23:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559803916; cv=none; d=google.com; s=arc-20160816; b=JIZM7ch+SDFpLCAVhLQtJEgOgpVEAT/AEj9sZYfRFD2/8EhzhtOsV02KcCXvagJBbl I3Fo6l/ZaaYz0HrxNWXDWBpT7Apv3gXZ2Ut1bhR7H2N4fzFyzBbcI5oCfEGOEOMR2jOy IA6Ou5KpYLTzCmRko9oUfS1XikkgdOQXJmmFPpeds8cpCX0C88pUvaxU3n6varlQqhOK UEieNMXsrIyXXMdT1LRiomW0tWUrIggTd7iV41kHQQdhuD/86nw74hfQTojeAcvrI1Zh oI9fSD0jtWnzQ+LKoW1BsosvC0rljvrfjXd7EdgDoEjGh9GBx8AVSmkSB/udhPK3AI/Q kAhQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=SLcv7GpL7q276sPxwetrJeGp6CBehMgA3j9n2QZpd2I=; b=aTu720dSzxG1to+qllQhWoCDQ/Cak6hIHGu4s9bRmOKlzx2D5WGaSty6934woY3JsP vsmMW/W83qIBVE8FQJohaqiCusokw8EAPjJFSk8CQ4rBKzqnc9XSqFTOZE8TBQcU4Zj4 EZmoLECCsBODYYxsVMQlPMpVScHX+uQkVPz1joFxudXriUsss+8hrIXmqIHrrgxPkIx5 n6GoUu6S/rOimb561kNJ4bfJLaf0doMfK5FELZwL8O1UGneFYQMhqgu5re6ZYntI70ea nOtT3KQs8OYqI1cou8axc+VHRHr4iZ789LnzsDTxnQ5jsM1GA80W1haBcWX1Qo01Nzaw Hfkw== 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 o4si1059446pfo.92.2019.06.05.23.51.43; Wed, 05 Jun 2019 23:51:56 -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 S1726648AbfFFGv2 (ORCPT + 99 others); Thu, 6 Jun 2019 02:51:28 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:38730 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbfFFGv2 (ORCPT ); Thu, 6 Jun 2019 02:51:28 -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 1hYmFD-0006tP-3b; Thu, 06 Jun 2019 14:51:27 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hYmFA-0006hF-A1; Thu, 06 Jun 2019 14:51:24 +0800 Date: Thu, 6 Jun 2019 14:51:24 +0800 From: Herbert Xu To: Stephan =?iso-8859-1?Q?M=FCller?= Cc: linux-crypto@vger.kernel.org, Reto Buerki Subject: Re: [PATCH] crypto: Jitter RNG - update implementation to 2.1.2 Message-ID: <20190606065124.xpyshz3al7wwivrp@gondor.apana.org.au> References: <6808423.xveKLjRae5@positron.chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6808423.xveKLjRae5@positron.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 29, 2019 at 09:24:25PM +0200, Stephan M?ller wrote: > The Jitter RNG implementation is updated to comply with upstream version > 2.1.2. The change covers the following aspects: > > * Time variation measurement is conducted over the LFSR operation > instead of the XOR folding > > * Invcation of stuck test during initialization > > * Removal of the stirring functionality and the Von-Neumann > unbiaser as the LFSR using a primitive and irreducible polynomial > generates an identical distribution of random bits > > This implementation was successfully used in FIPS 140-2 validations > as well as in German BSI evaluations. > > This kernel implementation was tested as follows: > > * The unchanged kernel code file jitterentropy.c is compiled as part > of user space application to generate raw unconditioned noise > data. That data is processed with the NIST SP800-90B non-IID test > tool to verify that the kernel code exhibits an equal amount of noise > as the upstream Jitter RNG version 2.1.2. > > * Using AF_ALG with the libkcapi tool of kcapi-rng the Jitter RNG was > output tested with dieharder to verify that the output does not > exhibit statistical weaknesses. The following command was used: > kcapi-rng -n "jitterentropy_rng" -b 100000000000 | dieharder -a -g 200 > > * The unchanged kernel code file jitterentropy.c is compiled as part > of user space application to test the LFSR implementation. The > LFSR is injected a monotonically increasing counter as input and > the output is fed into dieharder to verify that the LFSR operation > does not exhibit statistical weaknesses. > > * The patch was tested on the Muen separation kernel which returns > a more coarse time stamp to verify that the Jitter RNG does not cause > regressions with its initialization test considering that the Jitter > RNG depends on a high-resolution timer. > > Tested-by: Reto Buerki > Signed-off-by: Stephan Mueller > --- > crypto/jitterentropy-kcapi.c | 5 - > crypto/jitterentropy.c | 305 ++++++++++------------------------- > 2 files changed, 82 insertions(+), 228 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