Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp910315ybp; Thu, 17 Oct 2019 05:28:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqye1mn4+uhfdypDN99rCgu8XUgkV8X7W9p9Mq79C/8OHHVXy5rPz2bJK8pFuoyfRRa+u8mP X-Received: by 2002:a05:6402:21dd:: with SMTP id bi29mr3461932edb.7.1571315289285; Thu, 17 Oct 2019 05:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571315289; cv=none; d=google.com; s=arc-20160816; b=LJIsNTnpAFl/8Yj6CIKHqhpcAiXSzXgkkv1o4uxJ9m21BQly5eV/mC6XLgN59utUz/ OZeolMCF98FS40yAlEWKJdNxPizMBqPlS09PN9BSj9ADgycoBlYly7z2Osn4iwFbwu4j wUxx67+A8nsRHqmMxbXLtJy14Lja7lOrkdOjykg+N8WMnG6yYGfi2nogDn+4FiTxZfhF O+/C4WqFxKrI2BwY5k1V+TxzOndsCLpM6XAAI0nXxGQLNOMIIclYXz/B1StDk3801JCE JICzpS1qT0kGY3hABgkM/8fWn7ZRLdvkjWKFEBGBkIcbZiNnXoXaNBsqzpl3BEMwCBBx QpdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MiwpLuS969vf0SzfVRaAyEPN7B8rjy4k2wFQGATeoN0=; b=uyaP0N9wUR2IfTGxvsb//OtEEKEdSr4quNd4l92Ip9t2SAwaYpGLoDmQg+NdbPXvFj zm1oTsQ/9YePyCHfdKPt297tjMF9yZhTbUJnG8VcSVarr8bFwFs1yPbA30BdFp+ZUapu 5L7yTV4O9PGm0VIvRLqTI1OkFwD8YuHMGFq0Jr4t7EMMmXmOgJEBzBfG17FPStCSPOas pWyqRF2ZtVh1yDJStasnxHidXyn9Tn3+WRaIATtZB0i5qTX8m+IJIn+Kllamq1+Jmgla HxSr4GNFFPjDbrgoXkb0gUADZfzhRXFGsSVT5o/syRV9N0qM7QIc0l6dmckHvuVOkAUp 6Scg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16si1372337edo.307.2019.10.17.05.27.45; Thu, 17 Oct 2019 05:28:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392437AbfJPQZt (ORCPT + 99 others); Wed, 16 Oct 2019 12:25:49 -0400 Received: from mga07.intel.com ([134.134.136.100]:12345 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733056AbfJPQZt (ORCPT ); Wed, 16 Oct 2019 12:25:49 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 09:25:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,304,1566889200"; d="scan'208";a="202116161" Received: from hagarwal-mobl1.gar.corp.intel.com (HELO localhost) ([10.252.5.165]) by FMSMGA003.fm.intel.com with ESMTP; 16 Oct 2019 09:25:44 -0700 Date: Wed, 16 Oct 2019 19:25:43 +0300 From: Jarkko Sakkinen To: James Bottomley Cc: "Safford, David (GE Global Research, US)" , Ken Goldman , Mimi Zohar , "linux-integrity@vger.kernel.org" , "stable@vger.kernel.org" , "open list:ASYMMETRIC KEYS" , "open list:CRYPTO API" , open list Subject: Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes() Message-ID: <20191016162543.GB6279@linux.intel.com> References: <20191007000520.GA17116@linux.intel.com> <59b88042-9c56-c891-f75e-7c0719eb5ff9@linux.ibm.com> <20191008234935.GA13926@linux.intel.com> <20191008235339.GB13926@linux.intel.com> <20191014190033.GA15552@linux.intel.com> <1571081397.3728.9.camel@HansenPartnership.com> <20191016110031.GE10184@linux.intel.com> <1571229252.3477.7.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1571229252.3477.7.camel@HansenPartnership.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 16, 2019 at 08:34:12AM -0400, James Bottomley wrote: > reversible ciphers are generally frowned upon in random number > generation, that's why the krng uses chacha20. In general I think we > shouldn't try to code our own mixing and instead should get the krng to > do it for us using whatever the algorithm du jour that the crypto guys > have blessed is. That's why I proposed adding the TPM output to the > krng as entropy input and then taking the output of the krng. It is already registered as hwrng. What else? Was the issue that it is only used as seed when the rng is init'd first? I haven't at this point gone to the internals of krng. /Jarkko