Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-17 Thread Jarkko Sakkinen
On Wed, Oct 16, 2019 at 01:09:08PM -0300, Jason Gunthorpe wrote: > On Wed, Oct 16, 2019 at 01:43:22PM +0300, Jarkko Sakkinen wrote: > > On Wed, Oct 16, 2019 at 01:38:05PM +0300, Jarkko Sakkinen wrote: > > > On Tue, Oct 15, 2019 at 02:04:50PM -0300, Jason Gunthorpe wrote: > > > > On Tue, Oct 15, 201

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-16 Thread Jarkko Sakkinen
On Wed, Oct 16, 2019 at 02:16:20PM +0300, Janne Karhunen wrote: > On Wed, Oct 16, 2019 at 1:41 PM Jarkko Sakkinen > wrote: > > > > > get_random_bytes(). TPM could have a bug (making results predicatable), > > > > backdoor or even an inteposer in the bus. Salting gives protections > > > > against

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-16 Thread Jason Gunthorpe
On Wed, Oct 16, 2019 at 01:43:22PM +0300, Jarkko Sakkinen wrote: > On Wed, Oct 16, 2019 at 01:38:05PM +0300, Jarkko Sakkinen wrote: > > On Tue, Oct 15, 2019 at 02:04:50PM -0300, Jason Gunthorpe wrote: > > > On Tue, Oct 15, 2019 at 03:47:02PM +0300, Jarkko Sakkinen wrote: > > > > Salt the result tha

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-16 Thread Janne Karhunen
On Wed, Oct 16, 2019 at 1:41 PM Jarkko Sakkinen wrote: > > > get_random_bytes(). TPM could have a bug (making results predicatable), > > > backdoor or even an inteposer in the bus. Salting gives protections > > > against these concerns. > > > > The current issue in the randomness from my point o

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-16 Thread Jarkko Sakkinen
On Wed, Oct 16, 2019 at 01:38:05PM +0300, Jarkko Sakkinen wrote: > On Tue, Oct 15, 2019 at 02:04:50PM -0300, Jason Gunthorpe wrote: > > On Tue, Oct 15, 2019 at 03:47:02PM +0300, Jarkko Sakkinen wrote: > > > Salt the result that comes from the TPM RNG with random bytes from the > > > kernel RNG. Thi

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-16 Thread Jarkko Sakkinen
On Wed, Oct 16, 2019 at 10:02:01AM +0300, Janne Karhunen wrote: > On Tue, Oct 15, 2019 at 3:50 PM Jarkko Sakkinen > wrote: > > > > Salt the result that comes from the TPM RNG with random bytes from the > > kernel RNG. This will allow to use tpm_get_random() as a substitute for > > get_random_bytes

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-16 Thread Jarkko Sakkinen
On Tue, Oct 15, 2019 at 02:04:50PM -0300, Jason Gunthorpe wrote: > On Tue, Oct 15, 2019 at 03:47:02PM +0300, Jarkko Sakkinen wrote: > > Salt the result that comes from the TPM RNG with random bytes from the > > kernel RNG. This will allow to use tpm_get_random() as a substitute for > > get_random_b

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-16 Thread Janne Karhunen
On Tue, Oct 15, 2019 at 3:50 PM Jarkko Sakkinen wrote: > > Salt the result that comes from the TPM RNG with random bytes from the > kernel RNG. This will allow to use tpm_get_random() as a substitute for > get_random_bytes(). TPM could have a bug (making results predicatable), > backdoor or even

Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-15 Thread Jason Gunthorpe
On Tue, Oct 15, 2019 at 03:47:02PM +0300, Jarkko Sakkinen wrote: > Salt the result that comes from the TPM RNG with random bytes from the > kernel RNG. This will allow to use tpm_get_random() as a substitute for > get_random_bytes(). TPM could have a bug (making results predicatable), > backdoor o

[PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()

2019-10-15 Thread Jarkko Sakkinen
Salt the result that comes from the TPM RNG with random bytes from the kernel RNG. This will allow to use tpm_get_random() as a substitute for get_random_bytes(). TPM could have a bug (making results predicatable), backdoor or even an inteposer in the bus. Salting gives protections against these c