Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1229574ybp; Fri, 4 Oct 2019 11:23:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/j568Hqkrd/Giy9e2orQ0yFhCmevx2nFSowF8t2gl5nexvF3Slbzxoj03sJ81XPYbE4Ps X-Received: by 2002:a50:9250:: with SMTP id j16mr17003133eda.160.1570213381566; Fri, 04 Oct 2019 11:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570213381; cv=none; d=google.com; s=arc-20160816; b=tQS0eJg9IbdV4lKATybQaO6HMAyPshquU48Vn+bPRlvmTej8aNMA77aPklE5bjYUQh BYDFy6CZQVQZ3qCrLFiqDC9gqLHrour93oyquhoOxlbl1k0v9iQiEINU7wI19DpVIEmw EYNd1Qz3NJUumGglo91UBNYtT64v4s/ymdRXqzoH6t4MZX50NMD6eN4O6eueBq+TG6IO 7kWKHqQS7EZAjXCE5fPupNKVWLtQHN7YX2qfbmwpSblpCbQqjCA+RsiTimKXjx7b7Skj IpMeCNvoMTF/CgLSJmUvC/TstgMbxOMZZNsE0TBOz8MxyzHyf1SIYTnlWcaognHWFOX8 EKkw== 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=FJlwGGJibRVHZcMNIZDF3LS24SPPGR+25FPkfyRvOoI=; b=0b67DiDcnkB7jIr6XvFt/CDK7CtIblVoCxxKLSTUyQOugfZopRrO909e0K3I26ynde Jty5nX7gcYxrlcbpBn0wbG2FLI8rHMHtYcpGcl9TiM/+T1zH2JJjUWoRLeNF6Tbv4Iff nkD7xxwY+oAit7WBnlsanBDe6r+fl4Ms1ajwQsYOgFHNgW1tNL/r/IExXKB6bOUMoDMz lIjETPkZVeXcn0C9ngKOu12A12JlJnR9xh2+M1UBcGDXrHM+ko5bb8NpCbJG2FUpNtBx C085CREzFJbsDmVsIMpj5hJ/ZoL8z694+1Oyiy7m7bugxv06gRLRNKOdHLA3YIGWKgGd 9GTA== 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 h2si4076426edb.346.2019.10.04.11.22.36; Fri, 04 Oct 2019 11:23:01 -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 S1728954AbfJDSW0 (ORCPT + 99 others); Fri, 4 Oct 2019 14:22:26 -0400 Received: from mga06.intel.com ([134.134.136.31]:10975 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728357AbfJDSWZ (ORCPT ); Fri, 4 Oct 2019 14:22:25 -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 orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2019 11:22:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,257,1566889200"; d="scan'208";a="198932519" Received: from nzaki1-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.4.57]) by FMSMGA003.fm.intel.com with ESMTP; 04 Oct 2019 11:22:18 -0700 Date: Fri, 4 Oct 2019 21:22:16 +0300 From: Jarkko Sakkinen To: James Bottomley Cc: Mimi Zohar , David Safford , linux-integrity@vger.kernel.org, stable@vger.kernel.org, David Howells , Herbert Xu , "David S. Miller" , "open list:ASYMMETRIC KEYS" , "open list:CRYPTO API" , open list Subject: Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes() Message-ID: <20191004182216.GB6945@linux.intel.com> References: <20190926171601.30404-1-jarkko.sakkinen@linux.intel.com> <1570024819.4999.119.camel@linux.ibm.com> <20191003114119.GF8933@linux.intel.com> <1570107752.4421.183.camel@linux.ibm.com> <20191003175854.GB19679@linux.intel.com> <1570128827.5046.19.camel@linux.ibm.com> <20191003215125.GA30511@linux.intel.com> <20191003215743.GB30511@linux.intel.com> <1570140491.5046.33.camel@linux.ibm.com> <1570147177.10818.11.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1570147177.10818.11.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-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Oct 03, 2019 at 04:59:37PM -0700, James Bottomley wrote: > I think the principle of using multiple RNG sources for strong keys is > a sound one, so could I propose a compromise: We have a tpm subsystem > random number generator that, when asked for random bytes first > extracts bytes from the TPM RNG and places it into the kernel > entropy pool and then asks for random bytes from the kernel RNG? > That way, it will always have the entropy to satisfy the request and in > the worst case, where the kernel has picked up no other entropy sources > at all it will be equivalent to what we have now (single entropy > source) but usually it will be a much better mixed entropy source. I think we should rely the existing architecture where TPM is contributing to the entropy pool as hwrng. /Jarkko