-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add ability to seal against user-specified PCR values #51
Comments
I had though about just adding another symbol, i.e. |
Oh yeah, that works as well, I like that this is backwards-compatible :)
Hm, something like
in combination with the already existing
I guess we could also use our own file format and provide a script to convert the output from |
Hmmm... So far we've stayed out of the tpm2-types.h file for user convenience. In a different context, I'm using
Rational is that I prefer the pcr selector and the pcr value to be close to each other, so code is less complex. So without tpm-types.h this might become:
The 0-length array allows for fitting allocations instead of allocating the max matrix size... |
Yeah, that works for me as well. Note that this is slightly more general than what we currently do for |
Good point... I guess mixing the ideas, we could have some
We'd only need to specify if we cycle pcrs or banks first. Or would this here be too error prone ? |
Hm, what I don't like about this solution is that you can't really telegraph or enforce the order convention in code, you really have to read the documentation in order to use it correctly. If we are fine with a fixed maximum number of 32 PCRs (which is the current maximum anyway, since the PCR bitmask is
Looks a bit clumsy, but it should hopefully be quite unambiguous how to use it. What do you think? |
Banks / Bankalgs are a bitmask right now, corect ? |
Indeed, I would just reuse
I also thought about redefining these as an enum so that we could do
to be used like |
I don't think I understand what the third dimension in the array was for ? |
The dimensions would be
Indeed, the only differences are
|
pcrvalues[TPM2TOTP_BANK_SHA256] would be pcrvalues[2] so pcrvalue[1] would be empty ? So it's #51 (comment) or #51 (comment) I guess ? |
👍 If I find the time, I'll try implementing at least the library function and see what feels better :) |
Quoting
README.md
:Probably the most convenient way to handle this is to add a new option that accepts a file generated by
tpm2_pcrlist --out-file
.Since this requires breaking changes to the library ABI, it would be good to implement this before releasing version 1.0.
The text was updated successfully, but these errors were encountered: