-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key sizes for RSA and curves for ECC are not configurable in ECC abstractions #397
Comments
Hey, apologies for the delay - this does sound like an issue, and I assume there are actual TPMs out there that use other algorithms/indexes as well. Maybe an option would be to introduce a very minimal configuration to those functions, but I wouldn't think something very comprehensive - that covers all the possible parameters - would make sense. Don't know if I have the bandwidth to implement this for now, though. |
I agree that it makes to only cover the most common ones in the spec. How do you think should the configuration options look like? I can do the implementation when we have defined the API. |
Sorry, this fell off my radar. Maybe a better option would be to replace the current |
I like this idea. I did an initial implementation of this in #414. Do we want to fully replace |
Currently the code assumes that the key size for RSA is 2048 and that the ECC P-256 curve is used.
This for example does not work with swtpm's ECC configuration, which uses the P-384 curve when provisioning a ECC EK certificate. This then affects also
retrieve_ek_pubcert()
because it cannot find the ECC certificate because only at the index for P-384 is one provided and not at the one for P-256.NV-Indexes for P-384 EK certificates and others are defined in section 2.2.1.5 of TCG EK Credential Profile for TPM Family 2.0; Level 0 Version 2.3 Revision 2.
Minimal reproducer
main.rs
Starting the TPM
mkdir -p /tmp/emulated_tpm sudo swtpm_setup \ --tpmstate '/tmp/emulated_tpm' --create-ek-cert \ --create-platform-cert \ --lock-nvram \ --tpm2 \ --ecc sudo swtpm chardev --vtpm-proxy --tpmstate dir=/tmp/emulated_tpm --tpm2
Error message that the index certificate cannot be found.
Note that
tpm2_createek
also only currently only supports ECC with P-256.The text was updated successfully, but these errors were encountered: