Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1668961ybk; Thu, 21 May 2020 12:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxicFzhRfOis/mPPGwek2Rsn0zTo16yLpUF2Z3ARqWGKew1KUXd7/c7kA2tHrTLAl+f14xp X-Received: by 2002:a17:906:924a:: with SMTP id c10mr5184304ejx.360.1590088667805; Thu, 21 May 2020 12:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590088667; cv=none; d=google.com; s=arc-20160816; b=vFoITWj9Y1P8cR/GvSlBtqxHbraliq5pc1UZNGmssPYRqLLjaXajUe8m2ShW1fQEpP orOfSQngpQuwMmg1sgR2zYCGhSg2nyStCPu1KLMz/A3sSVMQEgj5odEBJgeFelPyGcvs TNAC9E5e3iFUXnUMbmUDJuNVcxTa3/+M0/4+2LIQw961jkCjsVIROyNsz+J4gW33Ge6/ yWijv5gKF36mzN/Lm3HhNud5LINRIu2MnG7XJwJpwr+J3YhUuA9Y11t4IMla1glT7PpH lOoflzfnepMvj7ucHVacYiwKwSlBgy0uG4X+86CM0xM9Q9QwXpRE+0uZ+06i76rBF78c Vk/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:mime-version :user-agent:message-id:in-reply-to:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=2Hm918oQzbPJkJZODw11AOxw6PW5YurvcHvbPoWuhvw=; b=jf3LwLXL18r7zLHzjbcdHazwmnq/m0oA+c4j8YVyyzBk6wF+GCz0qM9K1488n9F71A xcoW1yckvRvl9kaQF+8CH3Q9WpiRSGy2uLqvMTopTq+tJRJrNtWSGbdavuSqNy61wIKD F8R1Vd4BXGIKytmV2A4gYAFgY73im9z421RKkq7h8nbIjmCZq/KzB71ss63HMS0Swemv 4Aj8k0+KABV2+dwnQF43pVvBvx9dqJ44HEx1gUWkN7AdxCfduLC0ig0BbUevFh6id85I WgxdeAtgwF8hihYq9Vk/hbzQlszkQLCARS3bUpOKtWRR2Pd/+d3O73qdEEHX7PK/Q9HC 3FBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qEqYU8O4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb12si3587921ejb.695.2020.05.21.12.17.14; Thu, 21 May 2020 12:17:47 -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=pass header.i=@samsung.com header.s=mail20170921 header.b=qEqYU8O4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729531AbgEUTOT (ORCPT + 99 others); Thu, 21 May 2020 15:14:19 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:39144 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729475AbgEUTOT (ORCPT ); Thu, 21 May 2020 15:14:19 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200521191416euoutp01406a09fea21c119418aed71c6e462521~RIQbJ_DFV3049730497euoutp01d; Thu, 21 May 2020 19:14:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200521191416euoutp01406a09fea21c119418aed71c6e462521~RIQbJ_DFV3049730497euoutp01d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1590088456; bh=2Hm918oQzbPJkJZODw11AOxw6PW5YurvcHvbPoWuhvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qEqYU8O4luTy/5y9TlzG4psZVbnqA76Ard0Z1v0X6j0axobO9srSshZLNWay8fT8A 0AkYpS1mRQu81nhEC0fqyEYsLKZXpkfdZ0cbQsyZtHg359Hvs92x4zHkL+UY41NW1n qsuv65IdMAoG2jXMXBmIQpSXf1bssuMOpFM0y+dU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200521191416eucas1p1f9c925645e26efd0d940969d4d63cbfa~RIQav2Bdt1168511685eucas1p1M; Thu, 21 May 2020 19:14:16 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 5F.86.60698.703D6CE5; Thu, 21 May 2020 20:14:15 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200521191415eucas1p2d112a86171b23dcf255e7da53a56f4f3~RIQaEFCrA2032720327eucas1p2T; Thu, 21 May 2020 19:14:15 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200521191415eusmtrp28b9448932936d83ce87cdd52598ba64f~RIQaDSRJK2432924329eusmtrp2l; Thu, 21 May 2020 19:14:15 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-7d-5ec6d307ba94 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id DC.56.07950.703D6CE5; Thu, 21 May 2020 20:14:15 +0100 (BST) Received: from localhost (unknown [106.120.51.46]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200521191415eusmtip22a3ec30a98ec92f7cf49806acb8289f2~RIQZ4NyI80034100341eusmtip25; Thu, 21 May 2020 19:14:15 +0000 (GMT) From: Lukasz Stelmach To: Stefan Wahren 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 , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Stephan Mueller , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value Date: Thu, 21 May 2020 21:14:02 +0200 In-Reply-To: <573b2eff-3c74-90e9-50fa-644264d0a0e5@i2se.com> (Stefan Wahren's message of "Thu, 21 May 2020 13:00:33 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Brightmail-Tracker: H4sIAAAAAAAAA02SfUxTVxjGc3o/aVZ2LDLfVcOWBlzUSbcIepzObAvL7j9GY5bJTAZe5Ypk tJhe64Zug6nT8SEoxgAFNz4UWBEKpTTDODZxFAaTOtsZJJMyqCgfosI0yhyOcjHxv9/7Pu95 zvOeHJ7SVrM6PsW0VzKbxFQ9q6Zd7sc9KzmvO+GNE+NryX8Fbo40FtkZUnesnSaerGqKTE/8 ypFDlXaW5IwuIflDYxTxeBo44hi6xhB//2MV8Z4vZUmRp1VFyk4GGFLmykPkZnETSyZqA4ic 6q6jiaOml30nTPh3ugAJVv9lVpj0+VRCi/UGJ7h+iRKa+2IFhy2LFX4+fY4Tms5kCHlOGxLy RhqQYHf+SQsHu44ywpQjYnPoNvX6JCk1ZZ9kNmzYrt7d3FSs2jP90uffVF+iMpE/LBuF8IBj YGBqiMlGal6LaxBc7xqklOIfBGc7+zilmEJwxXZQ9ezI4Z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apjsVKzfJYpTpGt3ulRitXrV2dymVlZHNm1do9 yvTmplLB3pl5B45X3SeOAI/EBoKECC5Hx/KHSRsIFophBUClA5OEDQh9gQxdu5QWcCTo53Mb HXDGAJpo8wK/Q0Mlqq3d6XekMArZ8pyM3yHgXQoVV44AfyCBm1HZy0rSz2K4Cv1pmZhlEkag 8g8eys9B8BC64Kqg/SyCOtR5onG2GwZjkeu9hwnMQ9Gj0tHZLgEz0XTNO+IMgPb/Ivt/kd33 PQJGovpWVWC8BFWWjRMBXoPq6j6TDkBVAyln5Q1pBl6j5PUG3mpMU6aYDE7gu4gW93fXDWDz bm8HUAjkc0RvUtxJYkqfzecY2oHC98xwQ81TICONJiMnl4rKQjqSxKJUfc5BzmxKNluzOL4d aH17niVkYSkm360ZLclqrVqHY9W6GF3MCiyfLzoF7+0SwzS9hcvkuL2c+V9PIAySHQHuC/cu blG9XTapBVk7Ig8MtKni6WmvBAwmbBwrHN8nzFufvOJU9QImPion6sv7bXFS6lPb/k7FUlv3 0MmRFxXfTgs2haOSxLqkyU0LQws10dIzG3I7UJwCDhTJpvaTiuIYF/vqVoFUrzjYnz/HJvhp najrfTX1tTvZ9dpZnvpCTvLpenUUYeb1fwH2utjCMwMAAA== X-CMS-MailID: 20200521191415eucas1p2d112a86171b23dcf255e7da53a56f4f3 X-Msg-Generator: CA X-RootMTR: 20200521191415eucas1p2d112a86171b23dcf255e7da53a56f4f3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200521191415eucas1p2d112a86171b23dcf255e7da53a56f4f3 References: <573b2eff-3c74-90e9-50fa-644264d0a0e5@i2se.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable It was <2020-05-21 czw 13:00>, when Stefan Wahren wrote: > Hi Lukasz, > > Am 19.05.20 um 23:25 schrieb =C5=81ukasz Stelmach: >> The value was estimaded with ea_iid[1] using on 10485760 bytes read from >> the RNG via /dev/hwrng. The min-entropy value calculated using the most >> common value estimate (NIST SP 800-90P[2], section 6.3.1) was 7.964464. > > could you please mention in the commit the used hardware > implementation(s) of iproc-rng200 to get this quality? > > AFAIK there is still no public register description at least for the > bcm2711. So is it safe to assume that the suggested quality applies to > all possible configurations? I've learnt that there is a post-processing unit in RNG200 that tests the output of the noise generator and fills FIFO only with data that passes FIPS tests. Unlike simmilar unit in Exynos, it cannot be disabled or bypassed. Therefore, after Stephan Mueller's thorough explanations I am considering dropping this patch in v3. However, I stil am still not 100% convinced that it is impossible to assign the quality a reasonable non-zero value in such case. > Thanks > Stefan > >> >> [1] https://protect2.fireeye.com/url?k=3Dda4735b2-87d99b28-da46befd-0cc4= 7a336fae-e1c21080bc6ab1e4&q=3D1&u=3Dhttps%3A%2F%2Fgithub.com%2Fusnistgov%2F= SP800-90B_EntropyAssessment >> [2] https://csrc.nist.gov/publications/detail/sp/800-90b/final >> >> Signed-off-by: =C5=81ukasz Stelmach >> --- >> drivers/char/hw_random/iproc-rng200.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_ran= dom/iproc-rng200.c >> index 32d9fe61a225..95669ece050f 100644 >> --- a/drivers/char/hw_random/iproc-rng200.c >> +++ b/drivers/char/hw_random/iproc-rng200.c >> @@ -199,6 +199,7 @@ static int iproc_rng200_probe(struct platform_device= *pdev) >> priv->rng.read =3D iproc_rng200_read, >> priv->rng.init =3D iproc_rng200_init, >> priv->rng.cleanup =3D iproc_rng200_cleanup, >> + priv->rng.quality =3D 1000, >>=20=20 >> /* Register driver */ >> ret =3D devm_hwrng_register(dev, &priv->rng); > > =2D-=20 =C5=81ukasz Stelmach Samsung R&D Institute Poland Samsung Electronics --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEXpuyqjq9kGEVr9UQsK4enJilgBAFAl7G0voACgkQsK4enJil gBCTpAf9EuGO7grEX/oH7Vcrzy2CBVDtdNQcJXDRvzv5S3eM9Hn2DzUMjdbJfnCU kaXL16BI7IXz70IV64NakifjI6BeMuHria7mloEKupURngqPpDGnikOZFvLqzaib Hb7rgbdK20pCwmWzRB0tnsSeWZiLhCEeyuYY5ZyMfPPci1uXstDFjUicdRY13D3S zEJCVWNaNqihaYX+6OeGPWrPiCiB9ufmWy+9iZNSLuCmUgXwIoXOFn6ALS/ydOPt pQ2vooM/p3I+z/t55Y2XyTa220/FjK55fE3othybXSsdYq8a+Stwm1FGLu7GvoaQ 3c+8fUGvKHEvOWx3jB8UXca/n0AwjA== =kxZ0 -----END PGP SIGNATURE----- --=-=-=--