-
Notifications
You must be signed in to change notification settings - Fork 13
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
vtpm-quote: Add SHA256 PCR value extraction API #47
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkulke
reviewed
Dec 22, 2023
mkulke
reviewed
Jan 4, 2024
let's bump a minor version of the tdx and snp crates in this PR |
22efda5
to
beb8f62
Compare
I need to update other fixtures as well, because the test fails otherwise. |
aa30c3f
to
0f1b45a
Compare
I have updated the scriptures. |
mkulke
reviewed
Jan 15, 2024
Ignore .vscode directory. Signed-off-by: Suraj Deshmukh <[email protected]>
This commit removes unused code in the `vtpm` module. This enum is defined elaborately in `verfiy.rs`. Signed-off-by: Suraj Deshmukh <[email protected]>
- Also fix the formatting from spaces to tabs. Signed-off-by: Suraj Deshmukh <[email protected]>
This commit add support to include PCR SHA256 bank values in the Quote struct. Here are details of minor changes as a part of this commit: - Make the Quote parameters private. - Add a field called `pcrs` to Quote which will hold the PCR SHA256 bank values. - Add verification logic to the see if hash of all the PCRs match the PCR digest from the message. - Add test for verify_pcrs - Update the existing test to read the whole quote instead of individual message and signature from the fixutres. - Generate new fixtures for the test so that the PCR values are also incorporated. Signed-off-by: Suraj Deshmukh <[email protected]>
Make these enums non-exhaustive so that we can make non-breaking changes in subsequent updates. Signed-off-by: Suraj Deshmukh <[email protected]>
289cbfa
to
3917111
Compare
Since the `Quote` struct's fields were made private, to access the field `message` this commit adds a getter method `message()`. Signed-off-by: Suraj Deshmukh <[email protected]>
Signed-off-by: Suraj Deshmukh <[email protected]>
3917111
to
ba22c78
Compare
mkulke
approved these changes
Jan 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an API to extract all PCRs from SHA256 bank and store it in the quote. Alongwith this extraciton logic, it also adds a verification logic. Now users can call
quote.verify_pcrs()
to verify the PCR values.How to test
Here is a sample code that can be used to verify the workings of code. Run the following steps from the root of the directory:
Here is
Cargo.toml
Make the following change:
Finally run the code: