Support TPM2_PCR_Allocate command
- Dominant language
- Go
- Stars
- 673
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
Our primary motivation for supporting the TPM2_PCR_Allocate command is that we would like to be able to pre-configure the TPM Simulator with a given list of PCR registers for unit tests.
By default, the TPM Simulator comes with a number of PCR banks (one per each supported algorithm), and each PCR bank has 24 registers. But some physical TPMs may come with PCR bank(s) that have zero registers (e.g. SHA1 bank with 0 registers, and SHA256 bank with 24 registers). If we want to have a TPM Simulator with a similar configuration of PCR registers, we need to modify the list of available registers somehow; and that's where TPM2_PCR_Allocate is going to be useful.
There are probably other use cases that need TPM2_PCR_Allocate too.
Contributor guide
Research direction
Start by tracing the existing TPM command implementations and the TPM Simulator's PCR-bank configuration, then read the TPM2_PCR_Allocate specification and identify the relevant entry points. Done means callers can configure PCR banks with differing register counts, including zero-register banks, and the simulator reflects that configuration for unit tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100