-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DCAP quote support #112
Conversation
0e8f1a4
to
623f605
Compare
d19adcd
to
2ed12b7
Compare
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
7e2eea0
to
e8e9329
Compare
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Also, add `enclave_debug` field to `QueryAvailableEnclaveKeysRequest` Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
…e and debug info of the enclave Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
…stead of `eary_update` Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
…tation command Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR adds support for DCAP Remote Attestation using zkDCAP for on-chain gas cost reduction, along with additional CI improvements and dependency updates. Key changes include:
- Integration of zkDCAP within the enclave command flow and updates to attestation reporting.
- Introduction of new commands and options for DCAP, ZKDCAP, and simulation modes in the attestation commands.
- Updates to Cargo.toml files and CI workflows to support the new SGX installation script and dependencies.
Reviewed Changes
File | Description |
---|---|
app/src/commands/enclave.rs | Updated command options to include target QE type and adjusted key generation accordingly. |
modules/attestation-report/src/dcap.rs | Added new types and methods for handling DCAP and ZKDCAP quotes. |
modules/attestation-report/Cargo.toml | Updated dependencies with new flags and added conditional features for DCAP quote parsing. |
app/Cargo.toml | Added dependencies for attestation-report (with dcap-quote-parser) and zkdcap-risc0. |
.github/workflows/test.yml | Replaced legacy SGX SDK installation with a new install script. |
app/src/commands/attestation.rs | Introduced new subcommands for DCAP and ZKDCAP based attestation along with simulation modes. |
modules/attestation-report/src/report.rs | Redesigned report data types and added new enums for QEType and RAQuote with updated logic. |
modules/attestation-report/src/errors.rs | Adjusted error definitions relating to QE type and RA type. |
modules/enclave-api/src/api/command.rs | Updated generate_enclave_key API to include target QE type parameter. |
Other files | Minor changes across several modules to support the new remote attestation schemes. |
Copilot reviewed 60 out of 60 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
modules/attestation-report/src/report.rs:232
- The documented layout for ReportData sums to 63 bytes (1 + 20 + 20 + 22) while the underlying array is defined as 64 bytes. Please verify whether the layout documentation or the ReportData size should be adjusted.
/// | version: 1 byte | enclave key: 20 bytes | operator: 20 bytes | nonce: 22 bytes |
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
Summary
This PR enables DCAP Remote Attestation support for the LCP (Light Client Proxy) middleware by integrating zkDCAP, which addresses the expensive gas cost associated with DCAP verification on Ethereum and other EVM chains.
Motivation
Direct verification of DCAP (Data Center Attestation Primitives) quotes on-chain is highly costly to Ethereum or EVM compatible chains, limiting scalability and practical usecase. zkDCAP, DCAP quote verifier running on RISC Zero zkVM, solves these challenges by moving expensive computations off-chain, thus maintaining LCP's core value proposition of low-cost attestation verification.
Changes
install_sgx_sdk.sh
for streamlined setup of Intel SGX and DCAP dependencies.test.yml
) to utilize the new SGX installation script.Cargo.lock
for enhanced compatibility and security.References
Benefits