{"id":21755014,"url":"https://github.com/automata-network/tdx-attestation-sdk","last_synced_at":"2025-04-13T09:08:47.818Z","repository":{"id":263557595,"uuid":"883622895","full_name":"automata-network/tdx-attestation-sdk","owner":"automata-network","description":"The Automata TDX Attestation SDK is a software development kit designed to help users generate the Intel TDX Quote using Rust across different cloud service providers, and generate Risc0 and SP1 ZK Proofs which can be verified on-chain. Powered by Automata","archived":false,"fork":false,"pushed_at":"2025-03-20T22:32:31.000Z","size":1384,"stargazers_count":21,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T09:08:42.439Z","etag":null,"topics":["intel-tdx","rust","tdx","tdx-sdk"],"latest_commit_sha":null,"homepage":"https://ata.network","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/automata-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-05T09:42:44.000Z","updated_at":"2025-04-01T07:33:02.000Z","dependencies_parsed_at":"2025-02-04T07:27:50.058Z","dependency_job_id":"5e7b5974-c759-4580-b0e5-68ebb2c03ffc","html_url":"https://github.com/automata-network/tdx-attestation-sdk","commit_stats":null,"previous_names":["automata-network/tdx-attestation-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata-network%2Ftdx-attestation-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata-network%2Ftdx-attestation-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata-network%2Ftdx-attestation-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata-network%2Ftdx-attestation-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/automata-network","download_url":"https://codeload.github.com/automata-network/tdx-attestation-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688565,"owners_count":21145766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intel-tdx","rust","tdx","tdx-sdk"],"created_at":"2024-11-26T09:16:17.544Z","updated_at":"2025-04-13T09:08:47.812Z","avatar_url":"https://github.com/automata-network.png","language":"Rust","funding_links":[],"categories":["Repositories","🌟 Active Builder Projects"],"sub_categories":["SDKs","🚀 Infrastructure \u0026 SDKs"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/automata-network/automata-brand-kit/main/PNG/ATA_White%20Text%20with%20Color%20Logo.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/automata-network/automata-brand-kit/main/PNG/ATA_Black%20Text%20with%20Color%20Logo.png\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/automata-network/automata-brand-kit/main/PNG/ATA_White%20Text%20with%20Color%20Logo.png\" width=\"50%\"\u003e\n  \u003c/picture\u003e\n\u003c/div\u003e\n\n# Automata TDX Attestation SDK\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\n## Overview\n\nAutomata TDX Attestation SDK is the most-feature complete SDK for Intel TDX development, it consists of two parts:\n\n* TDX package: it helps developers to generate the Intel TDX Quote in different cloud service providers (CSP).\n* Risc0 and Succinct ZK host and guest programs.\n\n### Environment Preparation\nRefer to [TDX package](tdx/README.md) to setup the Intel TDX CVM in different cloud service providers (CSP).\n\n## Intel TDX Quote Generation\nUse [TDX package](tdx/README.md) to generate the Intel TDX Quote, you can find an example in [tdx_attestation](tdx/examples/attestation.rs).\n\n## Intel TDX Quote Verification\n### Verify Attestation on-chain\nIn [Automata DCAP Attestation](https://github.com/automata-network/automata-dcap-attestation), We provide two ways to verify the Intel TDX quote on-chain:\n\n```solidity\nfunction verifyAndAttestOnChain(bytes calldata rawQuote)\n```\nIt accepts the raw quote hex string to perform the on-chain verification, all collaterals will be fetched from the [Automata on-chain PCCS](https://github.com/automata-network/automata-on-chain-pccs).\n\n```solidity\nfunction verifyAndAttestWithZKProof(bytes calldata output, ZkCoProcessorType zkCoprocessor, bytes calldata proofBytes)\n```\nThe first parameter represents the output of the zkVM, the second one is the zkVM type, and the third one is its corresponding proof. It supports two kinds of ZK technologies to perform the on-chain verification:\n\n* [Risc0](https://github.com/risc0/risc0)\n  - output: the journal of the Risc0 zkVM output\n  - zkCoprocessor: 1\n  - proofBytes: the seal of the Risc0 zkVM output\n\n* [SP1](https://github.com/succinctlabs/sp1)\n  - output: the execution result of the SP1 Prover output\n  - zkCoprocessor: 2\n  - proofBytes: the proof of the SP1 Prover output\n\nThe on-chain verification contract has been deployed to Automata Testnet at [0x95175096a9B74165BE0ac84260cc14Fc1c0EF5FF](https://explorer-testnet.ata.network/address/0x95175096a9B74165BE0ac84260cc14Fc1c0EF5FF).\n\nThe [ImageID](https://dev.risczero.com/terminology#image-id) currently used for the DCAP RiscZero Guest Program is `d6c3b4b08fa163dd44f89125f97223f6f7163e3f0f62e360d707adab8f6b7799`.\n\nThe [VKEY](https://docs.succinct.xyz/verification/onchain/solidity-sdk.html?#finding-your-program-vkey) currently used for the DCAP SP1 Program is\n`0036efd519bb371b29a40322e40031833716e9441c6907f8aefc5e52ceebc9a6`.\n\nAn useful DCAP zkVM clis can be found at [Automata DCAP zkVM CLI](https://github.com/automata-network/automata-dcap-zkvm-cli).\n\n### Verify Attestation off-chain\nPlease follow the Intel official DCAP repo [SGXDataCenterAttestationPrimitives](https://github.com/intel/SGXDataCenterAttestationPrimitives) to perform the off-chain verification.\n\n## ZK Optimization\n### Risc0\nTo get started, you need to have the following installed:\n\n* [Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html)\n* [Foundry](https://getfoundry.sh/)\n* [RISC Zero](https://dev.risczero.com/api/zkvm/install)\n\n#### Configuring Bonsai\n\n***Note:*** *To request an API key [complete the form here](https://bonsai.xyz/apply).*\n\nWith the Bonsai proving service, you can produce a [Groth16 SNARK proof] that is verifiable on-chain.\nYou can get started by setting the following environment variables with your API key and associated URL.\n\n```bash\nexport BONSAI_API_KEY=\"YOUR_API_KEY\" # see form linked above\nexport BONSAI_API_URL=\"BONSAI_URL\" # provided with your api key\n```\n\n### Succinct\nTo get started, you need to have the following installed:\n\n* [Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html)\n* [SP1](https://docs.succinct.xyz/getting-started/install.html)\n* [Docker](https://docs.docker.com/get-started/get-docker/)\n\n***Note:*** *To request an whitelisted address, [complete the form here](https://docs.google.com/forms/d/e/1FAIpQLSd-X9uH7G0bvXH_kjptnQtNil8L4dumrVPpFE4t8Ci1XT1GaQ/viewform).*\n\nWith the SP1 Proving Network, you can produce a [Groth16 SNARK proof] or [Plonk SNARK proof] that is verifiable on-chain.\nYou can get started by setting the following environment variables with your whitelisted address and associated Proving Network.\n\n```bash\nexport SP1_PROVER=network\nexport SP1_PRIVATE_KEY=\"\"\n```\n\n## Acknowledgements\nWe would like to acknowledge the projects below whose previous work has been instrumental in making this project a reality.\n\n* [Risc0](https://github.com/risc0/risc0): The Risc0 ZK Optimization to reduce the gas cost to verify the Intel TDX Quote on-chain.\n* [SP1](https://github.com/succinctlabs/sp1): The Succinct ZK Optimization to reduce the gas cost to verify the Intel TDX Quote on-chain. It supports Groth16 and Plonk proofs.\n\n## Disclaimer\nThis project is under development. All source code and features are not production ready.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomata-network%2Ftdx-attestation-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomata-network%2Ftdx-attestation-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomata-network%2Ftdx-attestation-sdk/lists"}