NVIDIA nvTrust
repository·main·Indexed 43 days ago
https://github.com/nvidia/nvtrustA collection of software for NVIDIA Trusted Computing Solutions, providing SDKs and tools to implement and verify attestation in confidential computing environments. It includes the nv-attestation-sdk (v2.7.3) for local and remote GPU and NVSwitch attestation, the Protected PCIE (PPCIE) Verifier for multi-GPU setups, and host tools for configuring GPU Confidential Computing modes and orchestrating Confidential Virtual Machines (CVMs).
What's inside nvTrust
- The NVIDIA Reference Integrity Manifest (RIM) Service is a file-hosting service designed to facilitate the secure transfer of requested RIM bundles. These bundles are used by Attestation platforms during the GPU Attestation process to verify integrity measurements.
Overview of nvTrust tools and components
mainnvTrust provides resources for implementing and validating Trusted Computing Solutions on NVIDIA hardware, specifically focusing on attestation for confidential computing environments. The repository is organized into Guest Tools (for use within the confidential environment) and Host Tools (for configuring the environment from the host).
Guest Tools
- Attestation SDK (Python): A Python SDK for implementing GPU and NVSwitch attestation in applications. Supports local and remote attestation workflows.
- Local GPU Verifier: A standalone tool for local GPU attestation verification. Note: This tool is now integrated into the Attestation SDK; use the SDK instead.
- PPCIE Verifier: A verifier for multi-GPU confidential computing setups where GPUs are in PPCIE mode (enabling plain-text NVLink traffic while preserving VM security).
Host Tools
- Host Tools: Utilities for configuring GPU Confidential Computing modes and sample KVM scripts for launching Confidential VMs.
Overview of the NVIDIA Attestation SDK
mainThe NVIDIA Attestation SDK provides Python APIs for integrating attestation capabilities into applications. It is used to ensure the authenticity, integrity, and trustworthiness of a system through:
- Local and Remote GPU Attestation
- Local and Remote NVSwitch Attestation
Overview of nvTrust Host Tools
mainThe
host_toolsdirectory contains utilities designed to run on the host machine to manage NVIDIA GPU Confidential Computing (CC) configurations and orchestrate Confidential Virtual Machines (CVMs).Key capabilities include:
- GPU CC Mode Configuration: Scripts to set the operating modes for NVIDIA GPUs to support Confidential Computing.
- CVM Orchestration: KVM sample scripts used to launch and manage Confidential VMs from the host environment.
- Deployment Staging: Folders containing assets and configurations required for following the official Deployment Guides located in the
docs/directory.
Linux Source for NVIDIA Confidential Compute
mainThe Linux kernel source used for NVIDIA Confidential Compute is forked from the AMDSEV repository. Specifically, it is based on the following branch:
https://github.com/AMDESE/linux/tree/sev-snp-iommu-avic_5.19-rc6_v4What is the Protected PCIE Verifier (Version 2.x)?
mainThe Protected PCIE (PPCIE) Verifier is used in multi-GPU Confidential Computing (CC) setups to minimize performance impact.
In standard CC mode, all data flowing over NVLink/NVSwitches must be encrypted/decrypted by the GPU Copy Engine (CE), which can add latency. PPCIE mode adjusts the security model to trust NVLink data, allowing plain-text traffic without CEs while still preserving a Confidential Virtual Machine.
Supported GPU Configurations:
- CC Mode: All GPUs are in CC mode. Each GPU can be assigned to one Confidential VM. Use the CC verifier for this.
- PPCIE Mode: All GPUs are in PPCIE mode. All GPUs must be assigned to a single Confidential VM. Use the PPCIE verifier for this.
Understand the PPCIE mode security model
mainIn multi-GPU Confidential Computing (CC) setups, NVLink and NVSwitches are typically outside the trust boundary. Standard CC mode requires all data flowing over NVLink to be encrypted/decrypted by the GPU Copy Engine (CE), which can introduce latency and performance drops.
PPCIE mode adjusts the security model to trust NVLink data. This enables plain-text traffic without requiring CEs, minimizing performance impact while still preserving a Confidential Virtual Machine.
GPU Usage Configurations:
- CC Mode: Use the CC verifier when all GPUs are in CC mode (each GPU can be assigned to one Confidential VM).
- PPCIE Mode: Use the PPCIE verifier when all GPUs are in PPCIE mode (all GPUs must be assigned to one single Confidential VM).
Getting started with NVIDIA Attestation
mainTo begin working with NVIDIA Attestation, use the following resources:
- General Documentation: NVIDIA Attestation docs
- Quick Start: Quick Start Guide for rapid setup.
- Production Deployment: Deployment Guide for moving from POC to production.
- Python SDK Docs: Attestation SDK (Python) Documentation.
- PPCIE Verifier Docs: PPCIE Verifier Documentation.
Sign off on your commits using DCO
mainNVTrust requires all contributors to "sign-off" on their commits to certify the Developer Certificate of Origin (DCO). Any contribution containing commits that are not Signed-Off will not be accepted.
To sign off on a commit, use the
--signoffor-sflag during the commit process. This appends aSigned-off-by: Your Name <your@email.com>line to your commit message.git commit -s -m "Add cool feature."Apply Linux patches for IOMMU fixes
mainThe following patches are provided to address issues related to IOMMU (specifically addressing AMDSEV issue #109) within the Linux kernel source:
iommu_pagefault.patchiommu_pagesize.patch
Access RIM Service documentation and guides
mainFor detailed technical information, use the following resources:
- Comprehensive Documentation: Visit the RIM Service Documentation for in-depth details on RIM architecture, API specifications, and deployment procedures.
- Usage Examples: Refer to the RIM Guide for practical examples, including how to request RIM bundles using
curland how to work with sample RIM files.
Install Protected PCIE Verifier (Version 1.x)
mainTo install the deprecated version 1.x of the PPCIE Verifier, you must have root privileges to set the GPU ready state. It is recommended to use a Python virtual environment.
Prerequisites:
- HGX system with 8 GPUs and 4 switches assigned to the single tenant
python >= 3.9gitinstalled- Nvidia GPU driver installed
- Nvidia Switch driver installed
- Nvidia Fabric Manager installed
Note: Version 1.x only supports the Python SDK. For the latest version 2.x with enhanced features, use the
PPCIE Verifier SDK CPPinstead.# Elevate to root to set GPU ready state sudo -i # Create and activate virtual environment python3 -m venv venv source venv/bin/activate # Install version 1.x from PyPi pip3 install "nv-ppcie-verifier>=1.0,<2.0"