Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4614937ybg; Tue, 29 Oct 2019 09:45:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmIxYBnsD8PRJ/R4fNBO50lp4SBIaF+MddwSf2D/Nnl0tgqUJAB0LAUZdrqA+s2Bf99icx X-Received: by 2002:a50:ab10:: with SMTP id s16mr26236587edc.118.1572367513385; Tue, 29 Oct 2019 09:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572367513; cv=none; d=google.com; s=arc-20160816; b=FIJvVuZ1dFj4iZnFmDwDzdh33luX89hAZQp41mK4awYZA2ZIodniEe1p0l8EwPoRdQ 7mEeukqsPgLN7W1W3RzbC8cluc0ME1R5K+I0jAwYMdyoulioYsRPziDbERQjXqHdfinq lUmYXIU4zjqez3M/gRiWN60xBH2MvvYqA+6UWsyYZb8hJumlYCUUxdIMhFut9yvPLOdV UBQf24QiNPg0uXCwbVREIMCeuFGQY/1vh3XQt+s81fixEMzhVZjcsaqkZwHyTSD/DCZc idKKF9XQemmCg0MQmbmV5gbg2wT7//PThcrU88ePdybKtKx+fJfemw+SsVey2m3i3l+Z SnFg== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=bjoQ32VI1g4kYlhYrl0aLRu7AkZVbDSHWZt2UPSwEHw=; b=P41sRnImmsDu/1G5Pnr/brOJXtBCmKzkntMdJhOtTfg0nX7y/oTocXaXCpQIlL+leC ksEwRnUKUj6hZOIDijPD6bv9KydIbfFjXfp/y5Y7UjA0ctHsMpqVpbYbaT0UGWd18hyu NbxUuRUgIZYBRGcGVrVcowAkQSzJdw7L82Kco/4/WHPyjkVf2NsTi6kzn9D7DpXW8Rmf af9+UmVvt+P0bL0kNSBM1j0bB5hMrlEd/S8NtXYlF9SU9S00eNTLi3vWR29bswTkAHSa XAbf+YO3t6YVkCQvgO9euKAXk1n1ywgQUnEJLe0b2Thq1yagw/as3K9337IdEGiGlSGp /H5A== 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 k7si10337189edb.265.2019.10.29.09.44.46; Tue, 29 Oct 2019 09:45:13 -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 S2390267AbfJ2Qnd (ORCPT + 99 others); Tue, 29 Oct 2019 12:43:33 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:43075 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390258AbfJ2Qnc (ORCPT ); Tue, 29 Oct 2019 12:43:32 -0400 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1iPUah-0000AM-I8; Tue, 29 Oct 2019 17:43:31 +0100 Message-ID: <226f5a669c2199408abcdec0ccddc9ff05672631.camel@pengutronix.de> Subject: Re: [PATCH 0/3] enable CAAM's HWRNG as default From: Lucas Stach To: Andrey Smirnov , linux-crypto@vger.kernel.org Cc: Chris Healy , Horia =?UTF-8?Q?Geant=C4=83?= , Herbert Xu , Iuliana Prodan , linux-kernel@vger.kernel.org Date: Tue, 29 Oct 2019 17:43:30 +0100 In-Reply-To: <20191029162916.26579-1-andrew.smirnov@gmail.com> References: <20191029162916.26579-1-andrew.smirnov@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::2a X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Di, 2019-10-29 at 09:29 -0700, Andrey Smirnov wrote: > Everyone: > > This series is a continuation of original [discussion]. I don't know > if what's in the series is enough to use CAAMs HWRNG system wide, but > I am hoping that with enough iterations and feedback it will be. > > Feedback is welcome! I'm not sure if we can ever use the job based RNG interface to hook it up to the Linux HWRNG interface. After all the job based RNG interface is always a DRNG, which only gets seeded by the TRNG. The reseed interval is given in number of clock cycles, so there is no clear correlation between really true random input bits and the number of DRNG output bits. I've hacked up some proof of concept code which uses the TRNG access in the control interface to get the raw TRNG random bits. This seems to yield about 6400 bit/s of true entropy. It may be better to use this interface to hook up to the Linux HWRNG framework. Regards, Lucas