Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp325352ybk; Fri, 15 May 2020 01:34:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlODphAni8PSXelDJ4EC+QoR3i1I6A8fjv/UdHENeRHEg4l9QyYgdBr1zJGY5PHIUbg4/q X-Received: by 2002:a05:6402:154e:: with SMTP id p14mr1659909edx.326.1589531649861; Fri, 15 May 2020 01:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589531649; cv=none; d=google.com; s=arc-20160816; b=RGxJUA0ICj3GlREFj8tyj0OHpfi8MgHX04e3bg0BR1ljDByOYG1cHs2qwHia95tzWA oVTZ60RSAQj6zw31qwWGzZJrfELsqoOTLQwLN76n/3xNCp22f5g3UwDPJCqESJSAjIY7 O0WRHOf6+23fWOxIXtqSwJo2F8+XCi5DIAskztL7QR5EGwaPowI8P0z+nnmUA2L3cdCo NPGFi9pnoJSi2ucWQwn0+k9DC3ncMbQrPPg20ssuBCTgKCvyCUD6ICre1Y/N050yPmD6 /nJTcQldQjG84zQgGpOqnwr3QXsTAd8p3oFYLeLNEisXa6WsSNOxGD6S9SYCK1f0dZ7S riCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cHEQOWUyIIldwmU2G5ztyzURhkG246vmV36B4A8PLNg=; b=SrMcGeUo8Gs/g7sHbKbqcPflQcY8lEnrd2jrEpFwq10Zj3zJDNWbu9pxZ3oo62DZ3q G20rox3kdBHyiYFDRhHYW9G+q9ILJvMduKtUHWJTNxN7qx1kXTtCf1qQZYIznOTi4LXz PELRPIKuJPFVp6cFrYvfaaVoIL25/hloLS+NDjsjJUfKOXkgKLb36fqyHE68gXvPKy7e kHEKdXpvwjgS4BjuDD8LWexzseWOdSwTbDNmBXSjF9y6CtXLfAbh55uP2ONkWaS6K8UJ 9vGaGB1TYKw1dje4xlrBCobKXAg2zeXzdTu2CLnsaYOA9aO7UfYiRktl8GXrHF/UxTO3 RVyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=IuicEsZL; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si735420edz.368.2020.05.15.01.33.37; Fri, 15 May 2020 01:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=IuicEsZL; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727910AbgEOIco (ORCPT + 99 others); Fri, 15 May 2020 04:32:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726730AbgEOIcl (ORCPT ); Fri, 15 May 2020 04:32:41 -0400 Received: from mo6-p01-ob.smtp.rzone.de (mo6-p01-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5301::5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1734C061A0C; Fri, 15 May 2020 01:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1589531557; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=cHEQOWUyIIldwmU2G5ztyzURhkG246vmV36B4A8PLNg=; b=IuicEsZLQ+IWZvn46fqIzv8mnRi9bsTzIalpbDAxiCGMZ3VRLcZucrP+fUsRXR/r0s rts+19tHz3YACk3hQ0NZFZcEqGDXU2Qhp3jLlxe1GBd/LjkVIWEFBRS+9zq9kn3hPJE+ GWQ+WRzdFsrbxPBkaNLK+ViY6ALoWoO5gYMTT3dNsql48FlcIQ13ryBBxL31s5JsbkyW KFU5LjhqKOAcZ1YVwKXRI7SQc3OTdjHRCo1oIY2pbMqbJ5CIlwr7I54d9RD0hiyAfyiy szxrx0rtEHXHIohi/hzIn+qLRJcLpF7r0n1hR100/BM6Ze7y+/nu0e2YuJ3gVbtzGGKt lcMw== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9xmwdNnzGHXPaJfSc9C1S" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 46.6.2 DYNA|AUTH) with ESMTPSA id u08bf3w4F8WN0ZL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 15 May 2020 10:32:23 +0200 (CEST) From: Stephan Mueller To: Lukasz Stelmach Cc: Matt Mackall , Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Kukjin Kim , Krzysztof Kozlowski , Florian Fainelli , Markus Elfring , Matthias Brugger , Stefan Wahren , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Bartlomiej Zolnierkiewicz Subject: Re: [PATCH 1/2] hwrng: iproc-rng200 - Set the quality value Date: Fri, 15 May 2020 10:32:22 +0200 Message-ID: <2080864.23lDWg4Bvs@tauon.chronox.de> In-Reply-To: References: <4493123.C11H8YMYNy@tauon.chronox.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Am Freitag, 15. Mai 2020, 00:18:41 CEST schrieb Lukasz Stelmach: Hi Lukasz, > > I am running tests using SP800-90B tools and the first issue I can see > is the warning that samples contain less than 1e6 bytes of data. I know > little about maths behind random number generators, but I have noticed > that the bigger chunk of data from an RNG I feed into either ent or ea_iid > the higher entropy they report. That is why I divided the data into 1024 > bit chunks in the first place. To get worse results. With ea_iid they > get even worse (128 bytes of random data) I read that you seem to just take the output data from the RNG. If this is correct, I think we can stop right here. The output of an RNG is usually after post-processing commonly provided by a cryptographic function. Thus, when processing the output of the RNG all what we measure here is the quality of the cryptographic post-processing and not the entropy that may be present in the data. What we need is to access the noise source and analyze this with the given tool set. And yes, the analysis may require adjusting the data to a format that can be consumed and analyzed by the statistical tests. Ciao Stephan