
This repo serves as a code base for the Intel Data Center Attestation Primitive (DCAP) Web3-based Quote Verification program for both EVM and Solana.
Currently on the EVM, users can verify DCAP quotes with either full on-chain execution or using SNARK proofs by executing DCAP zkVM Programs on zkVMs, such as RiscZero or Succinct SP1. We plan to add support for more zkVMs in the future.
The Solana program currently supports only SNARK proof verification.
These identifiers are required parameters for SNARK proof verifications, to show that the proofs are generated by the intended zkVM Program.
The ImageID currently for the DCAP RiscZero Guest Program is 0xd6c3b4b08fa163dd44f89125f97223f6f7163e3f0f62e360d707adab8f6b7799.
The VKEY currently for the DCAP SP1 Program is 0x0036efd519bb371b29a40322e40031833716e9441c6907f8aefc5e52ceebc9a6.
ℹ️ UPDATE (March 2025): The EVM contracts for both Automata On Chain PCCS and Automata DCAP Attestation have been fully audited by Trails of Bit.
Click here to view the audit report.
It consists of three smart contracts:
-
PCCS Router: A central contract to read collaterals from
automata-on-chain-pccs
-
Automata DCAP Attestation: This is the entrypoint contract for users to submit a quote to be verified. This contract parses the Quote header to identify the version, which then forwards the quote to the respective QuoteVerifier contract.
-
Quote Verifier(s): This contract provides the full implementation to verify a given quote specific to its version. This contract is intended to be called only from the Automata DCAP Attestation contract.
Automata DCAP Attestation contract implements two attestation methods available to users. Here is a quick comparison:
On-Chain | Groth16 Proof Verification with RiscZero v1.2.1 | Groth16 Proof Verification with SP1 v4.1 | Plonk Proof Verification with SP1 v4.1 | |
---|---|---|---|---|
Quote Verification Time | Instant | Proving takes <1 minute, instant verification | Proving takes <30s, instant verification | Proving takes ~2 minutes, instant verification |
Gas Cost | ~4M gas (with RIP-7212 precompile); ~5M gas (without precompile) | 450k gas | 425k gas | 510k gas |
Execution | Runs fully on-chain | Execution proven by remote prover Bonsai | Execution proven by the SP1 Network | Execution proven by the SP1 Network |
Caution
The Solana programs are not audited for production use.
The following diagram illustrates an overview of the execution flow of the DCAP Solana Program.
- Invokes the
CreateDcapOutputAccount
instruction on the DCAP Program. - Reads the current count from DCAP Counter, which is used as seed to derive the address of the
VerifiedOutput
PDA. - Writes data to the
VerifiedOutput
PDA. - Increments the current count in DCAP Counter, which completes the
CreateDcapOutputAccount
instruction. - Invokes the
VerifyDcapProof
instruction on the DCAP Program. - Reads the output from the provided
VerifiedOutput
PDA address. - The output is pre-processed and converted into a Groth16 public input, then submitted along with the proofs to be verified with the corresponding zkVM verifier program.
- Updates the data in
VerifiedOutput
PDA to indicate the status showing successful verification. - Downstream programs consume the data directly from the
VerifiedOutput
PDA.
Depending on which zkVM programs that the user has chosen, the Automata DCAP Solana Program sends the processed VerifiedOutput
along with proofs to one of the following programs:
-
RiscZero Groth16 Verifier, this is a general-purpose Groth16 Verifier built by RiscZero that can be called by any Solana programs to perform Groth16 Verifications.
-
DCAP SP1 Solana Program, this is a wrapper verifier program to be called only by the Automata DCAP Solana Program because it hardcodes the vkey. This program imports the SP1 Solana Library.
The DCAP Solana Program and Counter account have both been deployed to devnet
at:
- DCAP Program:
DcapE9GZZ2KSu6udeW1pVdmqBAHP9NMBLBrxUUYdw1Qk
- DCAP Counter:
DcapH8Bt1y6MQHE1hR2Rp1WEBeWfog2Kh9UxtG8UMaNu