lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <482E1899.7020604@hp.com>
Date:	Fri, 16 May 2008 16:28:25 -0700
From:	Rick Jones <rick.jones2@...com>
To:	Jeff Garzik <jeff@...zik.org>
CC:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
	Chris Peterson <cpeterso@...terso.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/net: remove network drivers' last few uses of
 IRQF_SAMPLE_RANDOM

Jeff Garzik wrote:
> The Treacherous Platform Module includes an RNG.
> 
> Someone (hi Jesse?) should implement support for TPM_GetRandom.
> 
> All the specs are public, and the hardware is already in users' hands.

My curiousity got the better of me, so I enabled the TPM (Infineon)

moe:~# dmesg | grep -i tpm
tpm_inf_pnp 00:05: Found TPM with ID IFX0101
tpm_inf_pnp 00:05: TPM found: config base 0xff5b804e, data base 
0xff5b8000, chip version 0x0006, vendor id 0x15d1 (Infineon), product id 
0x0006 (SLD 9630 TT 1.1)

on a system I had, and using whatever Debian Lenny (w 2.6.24-1 kernel) 
offers for trousers and tcsd etc, a bunch of help from some other HPers, 
and a hacked example program from an HP-UX document I pressed-on without 
much understanding and arrived at:

moe:~# time ./raj_example -c 1000
making 1000 Tspi_TPM_GetRandom calls of 16 bytes each

real    0m28.033s
user    0m0.000s
sys     0m0.000s


28.0033s / 1000 calls = 2.8 ms per call.  While this was happening top 
was reporting  1% CPU time in the tcsd.

I've no idea how much feeding /dev/random would want and how often, but 
there is some crude data on overhead for pulling random numbers out of 
at least one TPM.  Here is some varying of the number of bytes requested 
each time:

moe:~# for i in 1 16 32 64
 > do
 > time ./raj_example -c 1000 -r $i
 > done
making 1000 Tspi_TPM_GetRandom calls of 1 bytes each

real    0m24.146s
user    0m0.008s
sys     0m0.000s
making 1000 Tspi_TPM_GetRandom calls of 16 bytes each

real    0m28.032s
user    0m0.000s
sys     0m0.000s
making 1000 Tspi_TPM_GetRandom calls of 32 bytes each

real    0m28.032s
user    0m0.004s
sys     0m0.000s
making 1000 Tspi_TPM_GetRandom calls of 64 bytes each

real    0m36.032s
user    0m0.004s
sys     0m0.000s

rick jones
no, i don't plan on adding this to netperf :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ