Skip to content

Commit

Permalink
readme: add explanation for MigTD hash generation
Browse files Browse the repository at this point in the history
Signed-off-by: Jiaqi Gao <[email protected]>
  • Loading branch information
gaojiaqi7 committed Nov 15, 2023
1 parent a8d4b89 commit 4ff183c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ cargo image --no-default-features --features remote-attestation,stack-guard,virt

### Generate SERVTD_INFO_HASH

`SERVTD_HASH_INFO` can be calculated based on a given MigTD image and a TD configuration such as
TD attributes, XFAM etc. An example configuration can be found in `config/servtd_info.json`. If a
field is masked by VMM, then it should be set to zero in the configuration file.

To generate the SERVTD_HASH_INFO of a MigTD binary with a default TD configuration at `config/servtd_info.json`:
```
cargo hash --image /path/to/migtd.bin
Expand All @@ -114,6 +118,9 @@ You can also specify a custom configuration in the same format with `config/serv
cargo hash --image /path/to/migtd.bin --servtd-info /path/to/servtd_info.json
```

The hash value in string will be ouput to `stdout`. You can also output the binary by specifing
output file through `-o`.

## How to run

### Prerequisites
Expand Down

0 comments on commit 4ff183c

Please sign in to comment.