Skip to content
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: add method to get sha256 PCRs from Quote #50

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

mkulke
Copy link
Member

@mkulke mkulke commented Feb 15, 2024

Added a method to retrieve the PCR values from a quote.

Internally the PCRs are still represented as Vec<Vec<u8>>, due to serialization concerns of large arrays. For the consumer a fixed byte array Vec<[u8; 32]> is more convenient, so they don't have to perform runtime assertions on the vector size.

How to use

Call quote.pcrs_sha256()

Testing done

A test has been added to make sure the transformation is non-destructive.

Ran cargo semver-checks to make sure there is no breaking api change.

az-cvm-vtpm/src/vtpm/mod.rs Outdated Show resolved Hide resolved
The internal representation of the PCRs has been changed to fixed-size
array.

Signed-off-by: Magnus Kulke <[email protected]>
@mkulke mkulke force-pushed the mkulke/expose-pcr-in-quote branch from 1cfccfc to d652595 Compare February 22, 2024 16:13
@mkulke mkulke requested a review from jepio February 22, 2024 16:14
@mkulke mkulke merged commit 64da750 into kinvolk:main Feb 23, 2024
1 check passed
@mkulke mkulke deleted the mkulke/expose-pcr-in-quote branch February 23, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants