Skip to content

Commit 21e12aa

Browse files
committed
common: rename cc-trusted-api to evidence-api
* change the name of the package to 'evidence_api' instead of 'cctrusted_base' * change the repository name from 'cc-trusted-api' to 'evidence-api' Signed-off-by: Ruoyu Ying <[email protected]>
1 parent b7fac90 commit 21e12aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+11998
-11996
lines changed

.github/cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"MRTD",
3838
"CCEL",
3939
"Bootloader",
40-
"VMSDK"
40+
"VMSDK",
41+
"CIMA"
4142
]
4243
}

.github/workflows/pr-check-rust.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'common/rust/cctrusted_base/src/**.rs'
9-
- 'common/rust/cctrusted_base/src/tdx/**.rs'
10-
- 'common/rust/cctrusted_base/src/tpm/**.rs'
8+
- 'common/rust/evidence_api/src/**.rs'
9+
- 'common/rust/evidence_api/src/tdx/**.rs'
10+
- 'common/rust/evidence_api/src/tpm/**.rs'
1111
- '.github/workflows/pr-check-rust.yaml'
1212
pull_request:
1313
paths:
14-
- 'common/rust/cctrusted_base/src/**.rs'
15-
- 'common/rust/cctrusted_base/src/tdx/**.rs'
16-
- 'common/rust/cctrusted_base/src/tpm/**.rs'
14+
- 'common/rust/evidence_api/src/**.rs'
15+
- 'common/rust/evidence_api/src/tdx/**.rs'
16+
- 'common/rust/evidence_api/src/tpm/**.rs'
1717
- '.github/workflows/pr-check-rust.yaml'
1818
workflow_dispatch:
1919

@@ -33,9 +33,9 @@ jobs:
3333
run: |
3434
sudo apt update && yes | DEBIAN_FRONTEND=noninteractive sudo apt install -y libcryptsetup-dev clang protobuf-compiler protobuf-c-compiler libprotobuf-c-dev libprotobuf-c1 build-essential pkg-config libssl-dev
3535
36-
- name: Run cargo check for cctrusted_base
36+
- name: Run cargo check for evidence_api
3737
run: |
38-
cd common/rust/cctrusted_base/
38+
cd common/rust/evidence_api/
3939
cargo check
4040
cargo fmt -- --check
4141
cargo clippy

.github/workflows/vmsdk-test-python.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
# by previous run with sudo. Otherwise, the checkout
3434
# will fail with permission issue.
3535
sudo rm -fr ./*
36-
- name: Checkout cc-trusted-api repo
36+
- name: Checkout evidence-api repo
3737
uses: actions/checkout@v4
3838
with:
3939
path: ${{env.VMSDK_PYTEST_DIR}}
@@ -47,10 +47,10 @@ jobs:
4747
set -ex
4848
cd ${{env.VMSDK_DIR}}
4949
# The trick here is that we need to use the local version
50-
# of cctrusted_base instead of the version installed by
50+
# of evidence_api instead of the version installed by
5151
# setupenv.sh. So uninstall it and reinstall from local.
5252
sudo su -c 'source setupenv.sh && \
53-
python3 -m pip uninstall -y cctrusted_base && \
53+
python3 -m pip uninstall -y evidence_api && \
5454
python3 -m pip install ../common/python && \
5555
cd src/python/tests && \
5656
python3 -m pytest -v test_sdk.py'

.github/workflows/vmsdk-test-rust.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# by previous run with sudo. Otherwise, the checkout
3131
# will fail with permission issue.
3232
sudo rm -fr ./*
33-
- name: Checkout cc-trusted-api repo
33+
- name: Checkout evidence-api repo
3434
uses: actions/checkout@v4
3535
with:
3636
path: ${{env.VMSDK_RUST_TEST_DIR}}
@@ -45,5 +45,5 @@ jobs:
4545
# The trick here is to override the dependencies with local version.
4646
echo "" >> Cargo.toml
4747
echo "[patch.crates-io]" >> Cargo.toml
48-
echo 'cctrusted_base = { path = "../../../../common/rust/cctrusted_base" }' >> Cargo.toml
48+
echo 'evidence_api = { path = "../../../../common/rust/evidence_api" }' >> Cargo.toml
4949
sudo bash -c "export CARGO_TERM_COLOR=always && cargo test --verbose"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ venv/
5757
dist/
5858
*.egg-info/
5959

60-
!common/golang/cctrusted_base/go.mod
60+
!common/golang/evidence_api/go.mod

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ Here are some general guidelines and philosophy for contributing code:
6262
usually indicates insufficient test coverage.
6363
* Keep API compatibility in mind when you change code in core design,
6464
e.g., code in
65-
[common/python](https://github.com/cc-api/cc-trusted-api/tree/main/common/python).
65+
[common/python](https://github.com/cc-api/evidence-api/tree/main/common/python).
6666

6767
Project team members will be assigned to review your pull requests. Once the
6868
pull requests are approved and pass continuous integration checks,
6969
your pull request will be merged automatically on GitHub.
7070

7171
Before sending your pull request for
72-
[review](https://github.com/cc-api/cc-trusted-api/pulls),
72+
[review](https://github.com/cc-api/evidence-api/pulls),
7373
make sure your changes are consistent with the guidelines and follow the
7474
coding style.
7575

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[![Python Code Scan](https://github.com/cc-api/cc-trusted-api/actions/workflows/pylint.yaml/badge.svg)](https://github.com/cc-api/cc-trusted-api/actions/workflows/pylint.yaml)
2-
[![Document Scan](https://github.com/cc-api/cc-trusted-api/actions/workflows/doclint.yaml/badge.svg)](https://github.com/cc-api/cc-trusted-api/actions/workflows/doclint.yaml)
3-
[![Python License Check](https://github.com/cc-api/cc-trusted-api/actions/workflows/pylicense.yaml/badge.svg)](https://github.com/cc-api/cc-trusted-api/actions/workflows/pylicense.yaml)
4-
[![VMSDK Python Test](https://github.com/cc-api/cc-trusted-api/actions/workflows/vmsdk-test-python.yaml/badge.svg)](https://github.com/cc-api/cc-trusted-api/actions/workflows/vmsdk-test-python.yaml)
1+
[![Python Code Scan](https://github.com/cc-api/evidence-api/actions/workflows/pylint.yaml/badge.svg)](https://github.com/cc-api/evidence-api/actions/workflows/pylint.yaml)
2+
[![Document Scan](https://github.com/cc-api/evidence-api/actions/workflows/doclint.yaml/badge.svg)](https://github.com/cc-api/evidence-api/actions/workflows/doclint.yaml)
3+
[![Python License Check](https://github.com/cc-api/evidence-api/actions/workflows/pylicense.yaml/badge.svg)](https://github.com/cc-api/evidence-api/actions/workflows/pylicense.yaml)
4+
[![VMSDK Python Test](https://github.com/cc-api/evidence-api/actions/workflows/vmsdk-test-python.yaml/badge.svg)](https://github.com/cc-api/evidence-api/actions/workflows/vmsdk-test-python.yaml)
55

6-
# CC Trusted API
6+
# Evidence API
77

8-
CC Trusted API helps the diverse applications to access and process the trust states
8+
Evidence API helps the diverse applications to access and process the trust states
99
which was represented by integrity measurement, event record, report/quote in the confidential
1010
computing environment.
1111

12-
![](docs/cc-trusted-api-overview.png)
12+
![](docs/evidence-api-overview.png)
1313

1414
## 1. TCB Measurement
1515

@@ -19,14 +19,14 @@ different type application might get the trust states measured in different Trus
1919
Computing Base (TCB), the definition and structure of integrity measurement register and
2020
event log follows the below specifications.
2121

22-
![](docs/cc-trusted-api-usage.png)
22+
![](docs/evidence-api-usage.png)
2323
| TCB | Measured By | Specification |
2424
| --- | -------- | ------------- |
2525
| Initial TEE | Trusted Security Manager (TSM), such as Intel TDX module, SEV secure processor | Vendor Specification such as [Intel TDX Module 1.5 ABI Specification](https://cdrdv2.intel.com/v1/dl/getContent/733579) |
2626
| Firmware | EFI_CC_MEASUREMENT_PROTOCOL </br> CCEL ACPI Table </br> EFI_TCG2_PROTOCOL </br> TCG ACPI Table | [UEFI Specification 2.10](https://uefi.org/specs/UEFI/2.10/38_Confidential_Computing.html#virtual-platform-cc-event-log) </br> [ACPI Specification 6.5](https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#cc-event-log-acpi-table) </br> [TCG EFI Protocol Specification](https://trustedcomputinggroup.org/resource/tcg-efi-protocol-specification/) </br> [TCG ACPI Specification](https://trustedcomputinggroup.org/resource/tcg-acpi-specification/) |
2727
| Boot Loader | EFI_CC_MEASUREMENT_PROTOCOL </br> EFI_TCG2_PROTOCOL | Grub2/Shim |
2828
| OS | Integrity Measurement Architecture (IMA) | [Specification](https://sourceforge.net/p/linux-ima/wiki/Home/) |
29-
| Cloud Native | Confidential Cloud Native Primitives (CCNP) | [Repository](https://github.com/cc-api/confidential-cloud-native-primitives) |
29+
| Cloud Native | Container Integrity Measurement Agent (CIMA) | [Repository](https://github.com/cc-api/container-integrity-measurement-agent) |
3030

3131
## 2. Trusted Foundation
3232

@@ -44,8 +44,8 @@ vendor also provided simplified solution:
4444

4545
## 3. APIs
4646

47-
CC Trusted APIs aims to collect confidential primitives (i.e., measurement, event log, quote) for zero-trust design, supporting multiple deployment environments (firmware/VM/cloud native cluster).
48-
The [APIs](common/python/cctrusted_base/api.py) are designed to be vendor agnostic and TCG compliant APIs. The APIs will keep evolving on demand.
47+
Evidence APIs aims to collect confidential primitives (i.e., measurement, event log, quote) for zero-trust design, supporting multiple deployment environments (firmware/VM/cloud native cluster).
48+
The [APIs](common/python/evidence_api/api.py) are designed to be vendor agnostic and TCG compliant APIs. The APIs will keep evolving on demand.
4949

5050
| API | Description | Parameters | Response |
5151
| --- | ------------- |----- |----- |
@@ -65,7 +65,7 @@ Choose correct SDK according to your environment. Installation guide can be foun
6565
| --- | --------------- | -- |
6666
| Firmware SDK | Firmware Application | |
6767
| [VM SDK](https://github.com/cc-api/cc-trusted-vmsdk) | Confidential Virtual Machine | [Guide](https://github.com/cc-api/cc-trusted-vmsdk/blob/main/README.md) |
68-
| [Confidential Cloud Native Primitives (CCNP)](https://github.com/cc-api/confidential-cloud-native-primitives) | Confidential Cluster/Container | [Guide](https://github.com/cc-api/confidential-cloud-native-primitives/blob/main/deployment/README.md) |
68+
| [Container Integrity Measurement Agent (CIMA)](https://github.com/cc-api/container-integrity-measurement-agent) | Confidential Cluster/Container | [Guide](https://github.com/cc-api/confidential-cloud-native-primitives/blob/main/deployment/README.md) |
6969

7070
## 5. How to use the APIs
7171

@@ -172,27 +172,27 @@ cctrusted.cvm DEBUG Successful parse TDREPORT.
172172
cctrusted.cvm INFO Using report data directly to generate quote
173173
cctrusted.cvm DEBUG Successful open device node /dev/tdx_guest
174174
cctrusted.cvm DEBUG Successful get Quote from /dev/tdx_guest.
175-
cctrusted_base.tdx.quote INFO ======================================
176-
cctrusted_base.tdx.quote INFO TD Quote
177-
cctrusted_base.tdx.quote INFO ======================================
178-
cctrusted_base.tdx.quote INFO TD Quote Header:
179-
cctrusted_base.binaryblob INFO 00000000 04 00 02 00 81 00 00 00 00 00 00 00 93 9A 72 33 ..............r3
180-
cctrusted_base.binaryblob INFO 00000010 F7 9C 4C A9 94 0A 0D B3 95 7F 06 07 C6 0E 85 25 ..L............%
181-
cctrusted_base.binaryblob INFO 00000020 C8 09 3C 0E A0 64 EF F1 29 6B 85 83 00 00 00 00 ..<..d..)k......
182-
cctrusted_base.tdx.quote INFO TD Quote Body:
183-
cctrusted_base.binaryblob INFO 00000000 04 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
184-
cctrusted_base.binaryblob INFO 00000010 97 90 D8 9A 10 21 0E C6 96 8A 77 3C EE 2C A0 5B .....!....w<.,.[
185-
cctrusted_base.binaryblob INFO 00000020 5A A9 73 09 F3 67 27 A9 68 52 7B E4 60 6F C1 9E Z.s..g'.hR{.`o..
175+
evidence_api.tdx.quote INFO ======================================
176+
evidence_api.tdx.quote INFO TD Quote
177+
evidence_api.tdx.quote INFO ======================================
178+
evidence_api.tdx.quote INFO TD Quote Header:
179+
evidence_api.binaryblob INFO 00000000 04 00 02 00 81 00 00 00 00 00 00 00 93 9A 72 33 ..............r3
180+
evidence_api.binaryblob INFO 00000010 F7 9C 4C A9 94 0A 0D B3 95 7F 06 07 C6 0E 85 25 ..L............%
181+
evidence_api.binaryblob INFO 00000020 C8 09 3C 0E A0 64 EF F1 29 6B 85 83 00 00 00 00 ..<..d..)k......
182+
evidence_api.tdx.quote INFO TD Quote Body:
183+
evidence_api.binaryblob INFO 00000000 04 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
184+
evidence_api.binaryblob INFO 00000010 97 90 D8 9A 10 21 0E C6 96 8A 77 3C EE 2C A0 5B .....!....w<.,.[
185+
evidence_api.binaryblob INFO 00000020 5A A9 73 09 F3 67 27 A9 68 52 7B E4 60 6F C1 9E Z.s..g'.hR{.`o..
186186
...
187-
cctrusted_base.binaryblob INFO 00000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
188-
cctrusted_base.binaryblob INFO 00000240 00 00 00 00 00 00 00 00 ........
189-
cctrusted_base.tdx.quote INFO TD Quote Signature:
190-
cctrusted_base.binaryblob INFO 00000000 16 1F E4 F6 8C 05 D4 8F E2 EB EB C8 32 1A CE 6C ............2..l
191-
cctrusted_base.binaryblob INFO 00000010 90 2A B5 EA 74 F5 4C 4D A2 6A 30 AC 5C A5 13 84 .*..t.LM.j0.\...
192-
cctrusted_base.binaryblob INFO 00000020 3D CB A2 31 20 43 8C 38 63 3D EE D1 7F B4 9F B5 =..1 C.8c=......
187+
evidence_api.binaryblob INFO 00000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
188+
evidence_api.binaryblob INFO 00000240 00 00 00 00 00 00 00 00 ........
189+
evidence_api.tdx.quote INFO TD Quote Signature:
190+
evidence_api.binaryblob INFO 00000000 16 1F E4 F6 8C 05 D4 8F E2 EB EB C8 32 1A CE 6C ............2..l
191+
evidence_api.binaryblob INFO 00000010 90 2A B5 EA 74 F5 4C 4D A2 6A 30 AC 5C A5 13 84 .*..t.LM.j0.\...
192+
evidence_api.binaryblob INFO 00000020 3D CB A2 31 20 43 8C 38 63 3D EE D1 7F B4 9F B5 =..1 C.8c=......
193193
...
194-
cctrusted_base.binaryblob INFO 000010D0 44 20 43 45 52 54 49 46 49 43 41 54 45 2D 2D 2D D CERTIFICATE---
195-
cctrusted_base.binaryblob INFO 000010E0 2D 2D 0A 00 --..
194+
evidence_api.binaryblob INFO 000010D0 44 20 43 45 52 54 49 46 49 43 41 54 45 2D 2D 2D D CERTIFICATE---
195+
evidence_api.binaryblob INFO 000010E0 2D 2D 0A 00 --..
196196
```
197197

198198
### 5.3 Sample of `get_cc_eventlog` API

common/golang/cctrusted_base/tdx/rtmr.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

common/golang/cctrusted_base/api.go renamed to common/golang/evidence_api/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cctrusted_base
1+
package evidence_api
22

33
type CC_Type int32
44

@@ -26,7 +26,7 @@ func (t CC_Type) String() string {
2626
return ""
2727
}
2828

29-
type CCTrustedAPI interface {
29+
type EvidenceAPI interface {
3030
GetDefaultAlgorithm() (TCG_ALG, error)
3131

3232
GetCCReport(nonce, userData string, extraArgs map[string]any) (Report, error)

common/golang/cctrusted_base/blob.go renamed to common/golang/evidence_api/blob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cctrusted_base
1+
package evidence_api
22

33
import (
44
"encoding/binary"

0 commit comments

Comments
 (0)