xaptum / xaptum-buildroot

External Buildroot tree for Xaptum hardware
GNU General Public License v2.0
0 stars 0 forks source link

Configure TPM during boot #83

Open drbild opened 5 years ago

drbild commented 5 years ago

On boot the router card should do two things to the TPM

1) Reset the dictionary lockout 2) Set the platform authorization to a random password and throw it away

The first is necessary because the TPM will lock itself after some number of improper shutdowns. Since the router card is never shutdown properly --- power is just cut --- this will eventually manifest. Resetting the dictionary lockout on boot resets that counter.

The second prevents malicious applications from performing administrative actions on the TPM. On desktop/server systems, this is done by the BIOS. On an embedded device, we have to take care of it.

The most recent release of U-Boot has TPM2 commands that can perform this full sequence

So I propose the following approach:

The configure_tpm() function should

The random password can be generated by issuing a GetRandom command to the TPM.