Skip to main content

SDK for CC Trusted API in Confidential VM

In confidential VM, the trusted primitives (measurement, eventlog, quote) normally can be accessed via device node like /dev/tpm0, sysfs etc, and different vendor may provides the different definitions.

This VMSDK following the CC Trusted API design shields the difference introduced by the platform and provides user with unified usage in the confidential virtual machine environments.

NOTE: VMSDK currently supports Python, and it will provide support on Rust and Golang later.

How to use VMSDK

VMSDK is supposed to provide trusted primitives (measurement, eventlog, quote) of CVM. All below steps are supposed to run in a CVM, such as Intel® TD.

Installation

VMSDK package is already available in PyPI. You can install the SDK simply by:

$ pip install cctrusted-vm

If you would like to run from source code. Try:

$ git clone https://github.com/cc-api/cc-trusted-vmsdk.git
$ cd cc-trusted-vmsdk
$ source setupenv.sh

Run CLI tool

It provides 3 CLI tools for quick usage of Python VMSDK.

How to run the CLI tool:

$ git clone https://github.com/cc-api/cc-trusted-vmsdk.git
$ cd cc-trusted-vmsdk
$ sudo su
$ source setupenv.sh
$ python3 ./src/python/cc_imr_cli.py

NOTE: The CLI tool needs to run via root user.

Below is example output of cc_imr_cli.py.

Run Tests

It provides test cases for Python VMSDK. Run tests with below commands.

$ git clone https://github.com/cc-api/cc-trusted-vmsdk.git
$ cd cc-trusted-vmsdk
$ sudo su
$ source setupenv.sh
$ python3 -m pip install pytest
$ python3 -m pytest -v ./src/python/tests/test_sdk.py

NOTE: The tests need to run via root user.

Metadata

Release files for cctrusted-vm 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cctrusted-vm 0.5.0
File Size Uploaded
cctrusted_vm-0.5.0.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cctrusted-vm 0.5.0
File Interpreter ABI Platform
cctrusted_vm-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / cctrusted_vm-0.5.0.tar.gz

Download URL cctrusted_vm-0.5.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c6bf03d926fdadb6baf091bb1d1bb9551742e9c1dbf22a025eda3f6a3d6ba953
BLAKE2b-256 checksum
How to use checksums
6a41c4d5b569efef78613a0212d401c2ed747c4e2cd0ddc2c04268865e56f03f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / cctrusted_vm-0.5.0-py3-none-any.whl

Download URL cctrusted_vm-0.5.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
217904313726e5a188badb2a3ad45851617f16fd047165baf3f2b007a513c61a
BLAKE2b-256 checksum
How to use checksums
ec072561535c8b5b54a7c60365c73c3f503a871fc0f025dac03dfcdef8707a2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page