Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755905Ab3IIVMn (ORCPT ); Mon, 9 Sep 2013 17:12:43 -0400 Received: from terminus.zytor.com ([198.137.202.10]:33411 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755342Ab3IIVMl (ORCPT ); Mon, 9 Sep 2013 17:12:41 -0400 Message-ID: <522E3997.9030109@zytor.com> Date: Mon, 09 Sep 2013 14:11:51 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Leonidas Da Silva Barbosa , Ashley Lai , Rajiv Andrade , Marcel Selhorst , Sirrix AG , Linux Kernel Mailing List , Jeff Garzik , "Ted Ts'o" , Kent Yoder , David Safford , Mimi Zohar , "Johnston, DJ" Subject: TPMs and random numbers X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1146 Lines: 25 It recently came to my attention that there are no standards whatsoever for random number generated by TPMs. In fact, there *are* TPMs where random numbers are generated by an encrypted nonvolatile counter (I do not know which ones); this is apparently considered acceptable for the uses of random numbers that TPMs produce. There are two issues with this from a Linux point of view. One, we harvest supposed entropy from the TPM for /dev/*random use via /dev/hwrng and rngd. This was something I originally proposed because on a lot of platforms it is the only available entropy source with any significant bandwidth. However, in light of the above it is questionable at best, at least with entropy being credited. The other issue is that we use tpm_get_random() *directly* in security/keys/trusted.c. I don't know what the policy ought to be, but I suspect we should ask the question. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/