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

Add RTMR public APIs in the README. #46

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,23 @@ This type contains five fields:
certificate.
Certificate chain verification is performed using trusted roots.

## `rtmr`

This library should be used within the confidential workload to perform a hash
extend operation into the TDX RTMR register.

### `func ExtendEventLog(rtmrIndex int, hashAlgo crypto.Hash, eventLog []byte) error`

This function calculates the hash digest of a provided event log and extends it
in the corresponding RTMR register. However, it's important to note that TDX
currently only supports the SHA-384 hash algorithm. If `hashAlgo` is not SHA-384,
the function will return an error.

### `func ExtendDigest(rtmrIndex int, digest []byte) error`

This function extends a SHA-384 digest into the corresponding RTMR register.
If the length of the given digest does not match that of a SHA-384 digest,
the function will return an error.

## License

Expand Down
Loading