| Previous | Next |
| TPM_20_E_HIERARCHY | TPM_20_E_MGF |
TPM_20_E_KEY_SIZE
Key size is validated by the TPM as part of the public template, not merely by the application that generated the request. A size may be well formed but unavailable for the chosen algorithm, firmware capability set, curve family or object role. This is why an application can create a software key successfully and still fail when it asks the TPM for an equivalent object.
Do not reduce this to “use a smaller key”
For RSA and symmetric objects, the template carries a key-size selection. For ECC, the curve selection determines the practical coordinate and key size. The valid choices depend on the TPM implementation and on the algorithm parameters paired with the object.
- Query supported algorithms and curves on the target TPM before hard-coding a size.
- Check that the selected key size belongs to the same algorithm family as the rest of the public area.
- Keep hardware capability data in deployment diagnostics; a template that works on one TPM model need not be portable unchanged.
TCG: TPM key and ECC structure definitions · tpm2-tools: supported public object algorithms · tpm2_createprimary: key algorithm selection
Looking for a different code? Search another status or error code.
