Skip to content

Commit 03a8dbe

Browse files
committed
update README
1 parent b9b76e3 commit 03a8dbe

File tree

2 files changed

+14
-70
lines changed

2 files changed

+14
-70
lines changed

go-tdx/README.md

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Intel® Trust Authority Go TDX Adapter
2-
Go module for collecting TDX Quote from TDX enabled platform.
2+
Go module for collecting TDX Quote from MSFT Azure TDX enabled platform.
3+
This module is specifically built to work with Azure TDX stack only.
34

45
## Go Requirement
56

@@ -30,44 +31,6 @@ if err != nil {
3031
}
3132
```
3233

33-
### To generate RSA keypair
34-
35-
```go
36-
km := &tdx.KeyMetadata{
37-
KeyLength: 3072,
38-
}
39-
privateKeyPem, publicKeyPem, err := tdx.GenerateKeyPair(km)
40-
if err != nil {
41-
fmt.Printf("Something bad happened: %s\n\n", err)
42-
return err
43-
}
44-
```
45-
46-
### To decrypt an encrypted blob
47-
48-
```go
49-
em := &tdx.EncryptionMetadata{
50-
PrivateKeyLocation: privateKeyPath,
51-
HashAlgorithm: "SHA256",
52-
}
53-
decryptedData, err := tdx.Decrypt(encryptedData, em)
54-
if err != nil {
55-
fmt.Printf("Something bad happened: %s\n\n", err)
56-
return err
57-
}
58-
```
59-
60-
### To collect event log from TD
61-
Note that the TD should have exposed ACPI table for eventlog collection.
62-
63-
```go
64-
evLogParser := tdx.NewEventLogParser()
65-
eventLog, err := evLogParser.GetEventLogs()
66-
if err != nil {
67-
return err
68-
}
69-
```
70-
7134
## License
7235

7336
This source is distributed under the BSD-style license found in the [LICENSE](../LICENSE)

tdx-cli/README.md

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Intel® Trust Authority TDX CLI
2-
An easy-to-use command line interface for attesting TDX TEE(TD) with Intel Trust Authority. The CLI will be installed and run inside the TD.
2+
An easy-to-use command line interface for attesting Azure TDX TEE(TD) with Intel Trust Authority. The CLI is specifically built to work with Azure TDX stack and will be installed and run inside the TD.
3+
4+
## TPM2 Tools
5+
Tpm2 tools is required to read the TDX report data from vTPM. Install tpm2-tools package, e.g., on Ubuntu:
6+
```sh
7+
sudo apt install tpm2-tools
8+
```
39

410
## Go Requirement
511

@@ -26,59 +32,34 @@ See the example test in `tdx-cli/token_test.go` for an example of a test.
2632
### To get list of all the available commands
2733

2834
```sh
29-
trustauthority-cli --help
35+
./trustauthority-cli --help
3036
```
3137
More info about a specific command can be found using
3238
```sh
33-
trustauthority-cli <command> --help
34-
```
35-
36-
### To create RSA keypair
37-
38-
```sh
39-
trustauthority-cli create-key-pair --pub-path <public key file path>
39+
./trustauthority-cli <command> --help
4040
```
4141

4242
### To get Intel Trust Authority signed token
4343

4444
`token` command requires Intel Trust Authority configuration to be passed in json format
4545
```json
4646
{
47-
"trustauthority_api_url": "<trustauthority attestation api url>",
47+
"trustauthority_api_url": "https://api.trustauthority.intel.com",
4848
"trustauthority_api_key": "<trustauthority attestation api key>"
4949
}
5050
```
5151
Save this data in config.json file and invoke `token` command
5252
```sh
53-
trustauthority-cli token --config config.json --user-data <base64 encoded userdata> --policy-ids <comma separated trustauthority attestation policy ids>
54-
```
55-
OR
56-
```sh
57-
trustauthority-cli token --config config.json --pub-path <public key file path> --policy-ids <comma separated trustauthority attestation policy ids>
53+
sudo ./trustauthority-cli token --config config.json --user-data <base64 encoded userdata> --no-eventlog
5854
```
5955

60-
### To get TD quote with Nonce and UserData
61-
62-
```sh
63-
trustauthority-cli quote --nonce <base64 encoded nonce> --user-data <base64 encoded userdata>
64-
```
65-
66-
### To decrypt an encrypted blob
67-
68-
```sh
69-
trustauthority-cli decrypt --key-path <private key file path> --in <base64 encoded encrypted blob>
70-
```
71-
OR
72-
```sh
73-
trustauthority-cli decrypt --key <base64 encoded private key> --in <base64 encoded encrypted blob>
74-
```
7556

7657
### To verify Intel Trust Authority signed token
7758

7859
`verify` command requires Intel Trust Authority URL to be passed in json format
7960
```json
8061
{
81-
"trustauthority_url": "<trustauthority url>"
62+
"trustauthority_url": "https://portal.trustauthority.intel.com"
8263
}
8364
```
8465
Save this data in config.json file and invoke `verify` command

0 commit comments

Comments
 (0)