Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp589875ybp; Wed, 9 Oct 2019 00:42:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIbH9wAFTqls41mFJg4ejSQSql7IAEjKOtMYwyXmIX6wsCMW2VJPwonZ9GHiTWJlaHdHCC X-Received: by 2002:a17:907:3301:: with SMTP id ym1mr1539960ejb.106.1570606962092; Wed, 09 Oct 2019 00:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570606962; cv=none; d=google.com; s=arc-20160816; b=1FHUHFiqjvgUETvaNrx8vQCp17QgvgUAQwdMBLEepbw5+/VcAbAUZMtC8m6847w97a 3AeovfcYZ33MvPXrTzqroRl33xVnhy/JAqj4+w9ew0l/vRpPNEexMVIZxdt8QBDBAOo5 i27yYdQN5cLPoT2bKX78cUlPYdn8pqm6va2/5eCkf1adBC7XuM6lkNTTAJW+3Jyfubwr a5jujHiOusb+AAUYOymIg6XMGYGFCJgXgtuKxPdNSP0OMz/LwiVP6+euz5aYiT/PlWmv 4zCy5hnUTkEflrPe/m1Wi8VjqLB+eO72wdavKY6hcVuxo/NGYMc95QuW5dtjNLoFOE8y Wdmw== 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=Kx/qNJBrVkkbFBXX4IlfQbozS4gArY/U73SZg7JjJY4=; b=0D2PIaSsC4QZEK83FquoOZdOMbBLxMxI7pjVrsGmruWz5/s2yYmBL9d3FwY/DDh6C8 reFxKnUAr58+TNEsTODbSnzXN6eHoWJnuZKBtVHta+VrJ8dZ7mLZzt5o8TAgR9w0HQ9n YlhjxJKYUtJ9kU/Ylq35S3TyKqDwbzoSMKERGiLIvwyHRAZdrXfiifH8xBkuCCSwqALD q95/xxtY5QN1lNFoyQUlp9yNe8VDTbjhRddOVShQUBHLaBTEedfcWfmdCF1S02iJHqO2 PyKtQPOmWUgZ/BcS719JSpWxJnX0HrokFhOeYxHHyL0TFn2R1CGoM/83X0Q3bhAGsNhT INDg== 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; 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 z11si887424edl.1.2019.10.09.00.42.16; Wed, 09 Oct 2019 00:42:42 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730168AbfJIHlk (ORCPT + 99 others); Wed, 9 Oct 2019 03:41:40 -0400 Received: from mga05.intel.com ([192.55.52.43]:10388 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729983AbfJIHlj (ORCPT ); Wed, 9 Oct 2019 03:41:39 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 00:41:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,273,1566889200"; d="scan'208";a="277350156" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.125]) by orsmga001.jf.intel.com with ESMTP; 09 Oct 2019 00:41:34 -0700 Date: Wed, 9 Oct 2019 10:41:33 +0300 From: Jarkko Sakkinen To: Ken Goldman Cc: "Safford, David (GE Global Research, US)" , 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: <20191009074133.GA6202@linux.intel.com> References: <20191003175854.GB19679@linux.intel.com> <1570128827.5046.19.camel@linux.ibm.com> <20191004182711.GC6945@linux.intel.com> <20191007000520.GA17116@linux.intel.com> <59b88042-9c56-c891-f75e-7c0719eb5ff9@linux.ibm.com> <20191008234935.GA13926@linux.intel.com> <20191008235339.GB13926@linux.intel.com> <20191009073315.GA5884@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191009073315.GA5884@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Oct 09, 2019 at 10:33:15AM +0300, Jarkko Sakkinen wrote: > On Wed, Oct 09, 2019 at 02:53:39AM +0300, Jarkko Sakkinen wrote: > > On Wed, Oct 09, 2019 at 02:49:35AM +0300, Jarkko Sakkinen wrote: > > > On Mon, Oct 07, 2019 at 06:13:01PM -0400, Ken Goldman wrote: > > > > The TPM library specification states that the TPM must comply with NIST > > > > SP800-90 A. > > > > > > > > https://trustedcomputinggroup.org/membership/certification/tpm-certified-products/ > > > > > > > > shows that the TPMs get third party certification, Common Criteria EAL 4+. > > > > > > > > While it's theoretically possible that an attacker could compromise > > > > both the TPM vendors and the evaluation agencies, we do have EAL 4+ > > > > assurance against both 1 and 2. > > > > > > Certifications do not equal to trust. > > > > And for trusted keys the least trust solution is to do generation > > with the kernel assets and sealing with TPM. With TEE the least > > trust solution is equivalent. > > > > Are you proposing that the kernel random number generation should > > be removed? That would be my conclusion of this discussion if I > > would agree any of this (I don't). > > The whole point of rng in kernel has been to use multiple entropy > sources in order to disclose the trust issue. > > Even with weaker entropy than TPM RNG it is still a better choice for > *non-TPM* keys because of better trustworthiness. Using only TPM RNG is > a design flaw that has existed probably because when trusted keys were > introduced TPM was more niche than it is today. > > Please remember that a trusted key is not a TPM key. The reality > distortion field is strong here it seems. And why not use RDRAND on x86 instead of TPM RNG here? It is also FIPS compliant and has less latency than TPM RNG. :-) If we go with this route, lets pick the HRNG that performs best. /Jarkko