Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7376044ybp; Wed, 16 Oct 2019 07:48:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2zGnvub/9umTGKF+5ImGxuKBVBpAofRg1ck6NGb99Z3YO37K4RsPDE6zOqqqCFrligO5g X-Received: by 2002:aa7:d905:: with SMTP id a5mr39511427edr.88.1571237313115; Wed, 16 Oct 2019 07:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571237313; cv=none; d=google.com; s=arc-20160816; b=sdo2no77Z0KGXfw6KUCl9cCu+YbPz3umoXMAW3onvC53YsiDH1Atnd7GlkSTAENo/i 4hxfa+whYqT6VzgK9i6UkoXu0leTR40sj4pSf5XIVHcZN0U9Nxjde/SuodWOOJ9obroy i76Pd1dWvzSsoDQqwVFrzXBdWulzt1kq0g8KwRPgkjmmK8BsiPYuBGs0MmZtmWmcC+tm DOTrRyAtr9GW2QTbRh5s9EECDAWwGB3ef12MhB1m/IbI2miuDEHvnIfYX2PSB9RxxCsE U8sJRVykxT8NP7qoi/MWWWieoFLZmwx2VBwYzoPPnup4vLcbHXXqjuLS70uhh1Cp0VOW gEgw== 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=t6w3y5Ci0PcGLLBIic3vzacWNtu75eXjFZ9Jm6wGWl8=; b=k8gHViSJaiJjqG3wFJyVHzv7rhNbJXoV/0UxMbaUU88TMK9QNGieYCR9d9j81FJ7Dl WjGEnNqTk9/hvjIs1IwS8JwVg1g9b4pPQSLnOJ84/oVd6yPEwZcZBguq26xaCBdfcbh8 8q9MQwGjKdvzpW80M2Uc/jVjr1UbNf/hBfVma/MeCoTldO5BOTriO3lXaqmtCYnMpxUu SYVnT2iMFuZlovpDAqUkxa3i562bswH8EyakJmPxPRykg+CoiemvkKrf3XkPwb/D9R1C mM309cgk76rgiyv/iKl3Kx0qTLtXNIyjccbstTtO5PZaK5n5spyOPOW9lUzSzz7fdLfi OiKg== 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 i24si18325361edj.207.2019.10.16.07.48.09; Wed, 16 Oct 2019 07:48:33 -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 S2392505AbfJPLAg (ORCPT + 99 others); Wed, 16 Oct 2019 07:00:36 -0400 Received: from mga09.intel.com ([134.134.136.24]:3400 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbfJPLAg (ORCPT ); Wed, 16 Oct 2019 07:00:36 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 04:00:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,303,1566889200"; d="scan'208";a="225749572" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.130]) by fmsmga002.fm.intel.com with ESMTP; 16 Oct 2019 04:00:32 -0700 Date: Wed, 16 Oct 2019 14:00:31 +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: <20191016110031.GE10184@linux.intel.com> References: <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> <20191014190033.GA15552@linux.intel.com> <1571081397.3728.9.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1571081397.3728.9.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 Mon, Oct 14, 2019 at 12:29:57PM -0700, James Bottomley wrote: > The job of the in-kernel rng is simply to produce a mixed entropy pool > from which we can draw random numbers. The idea is that quite a few > attackers have identified the rng as being a weak point in the security > architecture of the kernel, so if we mix entropy from all the sources > we have, you have to compromise most of them to gain some predictive > power over the rng sequence. The documentation says that krng is suitable for key generation. Should the documentation changed to state that it is unsuitable? > The point is not how certified the TPM RNG is, the point is that it's a > single source and if we rely on it solely for some applications, like > trusted keys, then it gives the attackers a single known point to go > after. This may be impossible for script kiddies, but it won't be for > nation states ... are you going to exclusively trust the random number > you got from your chinese certified TPM? I'd suggest approach where TPM RNG result is xored with krng result. > Remember also that the attack doesn't have to be to the TPM only, it > could be the pathway by which we get the random number, which involves > components outside of the TPM certification. Yeah, I do get this. /Jarkko