Re: TPMs and random numbers

From: Theodore Ts'o
Date: Wed Sep 11 2013 - 14:46:04 EST


On Wed, Sep 11, 2013 at 10:49:59AM -0700, Andy Lutomirski wrote:
>
> A TPM that has an excellent internal entropy source and is FIPS 140-2
> compliant with no bugs whatsoever may still use Dual_EC_DRBG, which
> looks increasingly likely to be actively malicious.

To be fair, given the limited CPU found in most TPM's, using
Dual_EC_DRBG would be rather unlikely. It's more likely that the TPM
would be using a real hardware RNG --- and if the TPM was compromised
by some evil spy agency, it would be doing using something like
AES_ENCRYPT(i++, NSA_KEY), not using Dual_EC_DRBG.

> I'd be *much* happier if my system read a few hundred random bytes
> from the TPM at startup and fed those bytes into the kernel's entropy
> pool. This should IMO happen at startup as early as possible.

We should definitely do this. If the TPM driver could fetch some
randomness and then call add_device_randomness() to feed this into the
random driver's entropy pool when it initializes itself, that would be
***really*** cool.

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/