Migration guide#
Python Attestation SDK is deprecated and is no longer recommended for new projects. While existing integrations may continue to function temporarily, we strongly advise planning a migration to the replacement SDK.
We are consolidating on the C++ SDK to provide better performance, a unified codebase, and tighter platform integration. Going forward all new attestation features and platform support will be delivered exclusively through the C++ SDK.
Status and key dates for Python SDK#
Deprecation date: 2026-03-15 (no new features; discouraged for new projects)
End of support: 2026-09-15 (no fixes, security patches, or official help after this date)
During the deprecation period (March 15 – September 15, 2026), we will continue to issue critical security patches but no new features. After the end-of-support date, this SDK may become incompatible with our service at any time and will not receive further updates.
C++ Replacement SDK#
Please use our supported SDK instead:
Replacement SDK: NVIDIA Attestation SDK (NVAT)
Language / platform: C++
Repository: github.com/NVIDIA/attestation-sdk
Documentation: C++ SDK documentation
All new integrations should use the replacement SDK, and existing users should migrate before the end-of-support date.
Getting help#
Contact us at: attestation-support@nvidia.com
API mapping#
The table below maps common Python SDK operations to their C++ SDK (C API) equivalents.
Operation |
Python SDK |
C++ SDK (C API) |
|---|---|---|
Import / include |
|
|
Initialize SDK |
|
|
Set service key |
|
|
Set nonce |
|
|
Select GPU + local verifier |
|
|
Select GPU + remote verifier |
|
|
Select NVSwitch device |
|
|
Collect evidence + attest |
|
|
Get attestation token |
|
|
Validate token with policy |
|
|
Inspect claims |
|
|
Cleanup |
N/A (garbage collected) |
|
Key differences#
The C++ SDK combines evidence collection and attestation into a single
nvat_attest_device()call.All resources must be explicitly freed. Follow the pattern: create → use → free.
The C++ SDK uses return codes (
nvat_rc_t) instead of exceptions. Always check return values.
Example: local GPU attestation#
Before (Python)#
from nv_attestation_sdk import attestation
client = attestation.Attestation()
client.set_name("myNode")
client.add_verifier(attestation.Devices.GPU,
attestation.Environment.LOCAL, "", "")
evidence = client.get_evidence()
result = client.attest(evidence)
token = client.get_token()
print("Attestation passed:", result)
After (C)#
#include <nvat.h>
nvat_sdk_opts_t opts = NULL;
nvat_attestation_ctx_t ctx = NULL;
nvat_str_t eat = NULL;
nvat_claims_collection_t claims = NULL;
nvat_sdk_opts_create(&opts);
nvat_sdk_init(opts);
nvat_attestation_ctx_create(&ctx);
nvat_rc_t rc = nvat_attest_device(ctx, NULL, &eat, &claims);
printf("Attestation %s\n", rc == NVAT_RC_OK ? "passed" : "failed");
// Cleanup
nvat_str_free(&eat);
nvat_claims_collection_free(&claims);
nvat_attestation_ctx_free(&ctx);
nvat_sdk_opts_free(&opts);
nvat_sdk_shutdown();
Example: remote GPU attestation#
Before (Python)#
from nv_attestation_sdk import attestation
import os
NRAS_URL = "https://nras.attestation.nvidia.com/v4/attest/gpu"
client = attestation.Attestation()
client.set_name("myNode")
client.set_service_key(os.getenv("NVIDIA_ATTESTATION_SERVICE_KEY"))
client.add_verifier(attestation.Devices.GPU,
attestation.Environment.REMOTE, NRAS_URL, "")
evidence = client.get_evidence()
result = client.attest(evidence)
token = client.get_token()
After (C)#
#include <nvat.h>
#include <stdlib.h>
// ... SDK init (see above) ...
nvat_attestation_ctx_create(&ctx);
nvat_attestation_ctx_set_verifier_type(ctx, NVAT_VERIFY_REMOTE);
const char* key = getenv("NVIDIA_ATTESTATION_SERVICE_KEY");
if (key) nvat_attestation_ctx_set_service_key(ctx, key);
nvat_rc_t rc = nvat_attest_device(ctx, NULL, &eat, &claims);
// ... check rc, use eat/claims, then free resources ...
Example: policy validation#
Before (Python)#
# ... after attestation (see above) ...
import json
with open("policy.json") as f:
policy = json.dumps(json.load(f))
is_valid = client.validate_token(policy)
print("Policy match:", is_valid)
After (C)#
const char* rego_policy =
"package policy\n"
"import future.keywords.every\n"
"default nv_match := false\n"
"nv_match {\n"
" every result in input {\n"
" result.secboot\n"
" result.dbgstat == \"disabled\"\n"
" }\n"
"}\n";
nvat_relying_party_policy_t rp;
nvat_relying_party_policy_create_rego_from_str(&rp, rego_policy);
nvat_attestation_ctx_set_relying_party_policy(ctx, rp);
nvat_relying_party_policy_free(&rp);
// Policy is evaluated during nvat_attest_device().
// NVAT_RC_OK = pass, NVAT_RC_RP_POLICY_MISMATCH = fail.
nvat_rc_t rc = nvat_attest_device(ctx, NULL, &eat, &claims);
Note: The Python SDK uses JSON-based authorization rules for policy validation after attestation. The C++ SDK uses Rego (Open Policy Agent) policies that are evaluated during attestation. See the policy examples for details.