Implement tpm2_duplicate
- Dominant language
- Go
- Stars
- 673
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
FR to implement `tpm2_duplicate` capability which will allow sealed transfer of tpm based keys
Here is a sequence using `tpm2_tools`: [Duplicating Objects](https://github.com/salrashid123/tpm2/tree/master/tpm2_duplicate)
for ref, the
- `TPM2_CC_Duplicate` constant value is `0x14b` from tpm2_tools [command-code-,mappings](https://github.com/tpm2-software/tpm2-tools/blob/master/man/tpm2_policycommandcode.1.md#command-code-mappings) for [constants.go](https://github.com/google/go-tpm/blob/master/tpm2/constants.go#L349)
but the larger thing that remains is implementing [tpm2_duplicate](https://github.com/tpm2-software/tpm2-tools/blob/master/man/tpm2_duplicate.1.md)
eg
```
tpm2_duplicate -C new_parent.ctx -c key.ctx -G null -p "session:session.dat" -r dup.dup -s dup.seed
```
Contributor guide
Research direction
Start with constants.go and the referenced tpm2_tools Duplicating Objects sequence, then read the tpm2_duplicate command documentation and its TPM2_CC_Duplicate mapping. Compare the requested command invocation with the existing go-tpm APIs and determine the supported inputs and outputs. Done means the tpm2_duplicate capability is implemented for sealed transfer of TPM-based keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cryptography, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100