API Endpoints
POST /attestations/verify
Upload and verify an SGX or TDX attestation quote. Supported Input Formats:- File Upload (multipart/form-data) - Recommended for most use cases
- Hex String JSON (application/json) - For programmatic integration
- Hex String Form Data (application/x-www-form-urlencoded) - For simple form submissions
- Valid Intel SGX DCAP or TDX quote (2-8KB typical size)
- Complete certificate chains included
- ECDSA-P256 signature format
- Generated from genuine Intel SGX/TDX platform
Parameter | Type | Format | Description |
---|---|---|---|
file | binary | multipart/form-data | Quote file upload (recommended) |
hex | string | JSON or form data | Hex-encoded quote data |
- Optional
0x
prefix supported - Case insensitive
- Whitespace automatically trimmed
Field | Type | Description |
---|---|---|
success | boolean | Whether verification process completed successfully |
quote | Quote | Parsed quote object with header, body, and verification status |
checksum | string | SHA256 hash serving as unique identifier for this quote |
can_download | boolean | Whether the raw binary quote data can be downloaded |
uploaded_at | string | ISO 8601 timestamp when quote was first uploaded to Phala Cloud |
quote_collateral | QuoteCollateralV3 | Cryptographic verification data from Intel PCS |
Status | Cause | Common Issues |
---|---|---|
400 | Input validation | Missing data, both file and hex provided, invalid hex format |
422 | Invalid quote | Wrong file type, corrupted data, missing certificates |
400 | Verification failed | Non-genuine platform, revoked certificates, outdated TCB |
500 | Server error | Service unavailable, Intel PCS issues |
GET /attestations/view/
Retrieve complete quote details including header, body, and verification status. Path Parameters:checksum
(string): Quote’s unique SHA256 identifier
- 404 Not Found: Quote with specified checksum doesn’t exist
GET /attestations/collateral/
Get cryptographic collateral (certificates, CRLs, TCB info) used for verification. Response Headers:Cache-Control: public, max-age=86400
(24 hour cache)ETag: "{checksum}"
(for conditional requests)
Cache-Control: public, max-age=86400
CDN-Cache-Control: public, max-age=86400
Vary: Accept-Encoding
ETag: "9540fda5e6416c9d02bae726b146be58bee3caccfe7f874dbc68c808a13b1139"
- 404 Not Found: Quote with specified checksum doesn’t exist
- 400 Bad Request: Unable to retrieve collateral data
GET /attestations/raw/
Download original binary quote data. Response:Content-Type: application/octet-stream
Content-Disposition: attachment; filename={checksum}.bin
Content-Length: {size}
(typically 2-8KB)
HEAD /attestations/raw/
Check quote existence and size without downloading.GET /attestations/recent
List recently uploaded quotes with pagination. Query Parameters:skip
(integer): Records to skip (default: 0)limit
(integer): Maximum records to return (default: 20)
Field | Type | Description |
---|---|---|
checksum | string | SHA256 hash (unique identifier) |
verified | integer | 1 = verified, 0 = failed |
created_at | string | Upload timestamp (ISO 8601) |
Data Models
Quote
QuoteHeader
Field | Type | Description |
---|---|---|
version | integer | Quote format version (typically 4) |
ak_type | string | Attestation key type (“ECDSA_P256”) |
tee_type | string | ”TEE_SGX” or “TEE_TDX” |
qe_vendor | string | Quoting Enclave vendor ID (hex) |
user_data | string | User-defined data (hex, 20 bytes) |
QuoteBody
Core attestation measurements and platform data.Complete Sample Data
Complete Sample Data
Field | Type | Description | Size |
---|---|---|---|
tee_tcb_svn | string | TCB Security Version Number (platform firmware version) | 16 bytes |
mrseam | string | Measurement of SEAM module (Intel TDX hypervisor component) | SHA384 |
mrsignerseam | string | SEAM signer measurement (hash of entity that signed SEAM) | SHA384 |
seamattributes | string | SEAM module attributes and capabilities | 8 bytes |
tdattributes | string | Trust Domain attributes and configuration flags | 8 bytes |
xfam | string | Extended Features Available Mask (CPU features accessible to TD) | 8 bytes |
mrtd | string | Measurement Root of Trust Domain (TD fingerprint/initial state) | SHA384 |
mrconfig | string | Configuration measurement | SHA384 |
mrowner | string | TD owner measurement | SHA384 |
mrownerconfig | string | Owner configuration measurement | SHA384 |
rtmr0 | string | Runtime Measurement Register 0 (virtual hardware environment) | SHA384 |
rtmr1 | string | Runtime Measurement Register 1 (Linux kernel) | SHA384 |
rtmr2 | string | Runtime Measurement Register 2 (kernel cmdline and initrd) | SHA384 |
rtmr3 | string | Runtime Measurement Register 3 (application-specific measurements) | SHA384 |
reportdata | string | User-defined data (nonces, challenges, application state) | 64 bytes |
mrtd
: Trust domain fingerprint - must match expected valuertmr0-3
: Software measurements - verify boot chain and application integrityreportdata
: Challenge-response data - must contain expected nonce/responsetee_tcb_svn
: Platform security level - check against known vulnerabilities
QuoteCollateralV3
Cryptographic verification data from Intel PCS.Sample Data
Sample Data
Field | Type | Description |
---|---|---|
pck_crl_issuer_chain | string | PEM certificate chain for PCK Certificate Revocation List verification |
root_ca_crl | string | Root CA Certificate Revocation List (hex-encoded, optional) |
pck_crl | string | Platform Certification Key Certificate Revocation List (hex-encoded) |
tcb_info_issuer_chain | string | PEM certificate chain for TCB info signature verification |
tcb_info | string | JSON string containing Trusted Computing Base information and security levels |
tcb_info_signature | string | ECDSA signature over the TCB info data (hex-encoded) |
qe_identity_issuer_chain | string | PEM certificate chain for Quoting Enclave identity verification |
qe_identity | string | JSON string containing QE identity, version, and TCB levels |
qe_identity_signature | string | ECDSA signature over the QE identity data (hex-encoded) |
- Certificate Chains: Used to validate signatures back to Intel root certificates
- CRL Data: Check for revoked certificates and compromised platforms
- TCB Info: Contains platform security version info and vulnerability advisories
- QE Identity: Validates the Quoting Enclave that signed the quote
- Signatures: All signatures use ECDSA-P256 and must be validated against certificate chains
Verification Process
- Parse - Extract header, body, and certificates from binary quote
- Platform Check - Verify quote from genuine Intel SGX/TDX platform
- TCB Validation - Check platform firmware is current and not revoked
- Signature Verification - Validate using Intel-provided certificates
- Storage - Cache results and collateral for future access
Integration Patterns
Basic Verification Workflow
Binary File Upload:Error Handling Best Practices
Input Format Issues:- 422 Unprocessable Entity: Wrong file format, corrupted data, or invalid hex
- 400 Bad Request: Missing input, invalid hex characters, or format conflicts
- 400 Verification Failed: Platform may be development/non-genuine
- 404 Not Found: Invalid checksum or quote not uploaded
- 500 Server Error: Retry after delay, Intel PCS may be unavailable
Cache Policy
- Quote collateral is cached for 24 hours to improve performance
- Raw quote data and verification results are stored permanently
- ETags are provided for efficient client-side caching
Security Notes
- All quotes are publicly accessible by checksum
- Always validate
reportdata
contains expected nonces/challenges - Check
verified: true
before trusting quote contents - Verification depends on Intel’s Provisioning Certification Service
Need help getting started? Check out our quick start guide for a 5-minute walkthrough.