1+ /// Request for getting the enclave information.
12#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
23#[ allow( clippy:: derive_partial_eq_without_eq) ]
34#[ derive( Clone , PartialEq , :: prost:: Message ) ]
45pub struct QueryEnclaveInfoRequest { }
6+ /// Response for getting the enclave information.
57#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
68#[ allow( clippy:: derive_partial_eq_without_eq) ]
79#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -11,24 +13,37 @@ pub struct QueryEnclaveInfoResponse {
1113 #[ prost( bool , tag = "2" ) ]
1214 pub enclave_debug : bool ,
1315}
16+ /// Request for getting the attested enclave keys corresponding to the specified MRENCLAVE.
1417#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
1518#[ allow( clippy:: derive_partial_eq_without_eq) ]
1619#[ derive( Clone , PartialEq , :: prost:: Message ) ]
1720pub struct QueryAvailableEnclaveKeysRequest {
21+ /// MRENCLAVE of the enclave that generates the EK.
1822 #[ prost( bytes = "vec" , tag = "1" ) ]
1923 pub mrenclave : :: prost:: alloc:: vec:: Vec < u8 > ,
24+ /// Debug flag of the enclave that generates the EK.
2025 #[ prost( bool , tag = "2" ) ]
2126 pub enclave_debug : bool ,
27+ /// Remote attestation type.
28+ ///
29+ /// | Type | Value |
30+ /// |-----------------|-------|
31+ /// | IAS | 1 |
32+ /// | DCAP | 2 |
33+ /// | ZKDCAPRisc0 | 3 |
34+ /// | MockZKDCAPRisc0 | 4 |
2235 #[ prost( uint32, tag = "3" ) ]
2336 pub ra_type : u32 ,
2437}
38+ /// Response for getting the attested enclave keys.
2539#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
2640#[ allow( clippy:: derive_partial_eq_without_eq) ]
2741#[ derive( Clone , PartialEq , :: prost:: Message ) ]
2842pub struct QueryAvailableEnclaveKeysResponse {
2943 #[ prost( message, repeated, tag = "1" ) ]
3044 pub keys : :: prost:: alloc:: vec:: Vec < EnclaveKeyInfo > ,
3145}
46+ /// Enclave key information contains the RA type specific information.
3247#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
3348#[ allow( clippy:: derive_partial_eq_without_eq) ]
3449#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -50,6 +65,7 @@ pub mod enclave_key_info {
5065 Zkdcap ( super :: ZkdcapEnclaveKeyInfo ) ,
5166 }
5267}
68+ /// Enclave key information with IAS report.
5369#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
5470#[ allow( clippy:: derive_partial_eq_without_eq) ]
5571#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -65,6 +81,7 @@ pub struct IasEnclaveKeyInfo {
6581 #[ prost( bytes = "vec" , tag = "5" ) ]
6682 pub signing_cert : :: prost:: alloc:: vec:: Vec < u8 > ,
6783}
84+ /// Enclave key information with DCAP quote and supplemental data.
6885#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
6986#[ allow( clippy:: derive_partial_eq_without_eq) ]
7087#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -84,6 +101,7 @@ pub struct DcapEnclaveKeyInfo {
84101 #[ prost( message, optional, tag = "7" ) ]
85102 pub collateral : :: core:: option:: Option < QvCollateral > ,
86103}
104+ /// Validity Period
87105#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
88106#[ allow( clippy:: derive_partial_eq_without_eq) ]
89107#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -93,6 +111,7 @@ pub struct Validity {
93111 #[ prost( uint64, tag = "2" ) ]
94112 pub not_after : u64 ,
95113}
114+ /// Enclave key information with zkDCAP proof and DCAP attestation info.
96115#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
97116#[ allow( clippy:: derive_partial_eq_without_eq) ]
98117#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -102,6 +121,7 @@ pub struct ZkdcapEnclaveKeyInfo {
102121 #[ prost( message, optional, tag = "2" ) ]
103122 pub zkp : :: core:: option:: Option < ZkvmProof > ,
104123}
124+ /// ZKVM proof
105125#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
106126#[ allow( clippy:: derive_partial_eq_without_eq) ]
107127#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -119,6 +139,7 @@ pub mod zkvm_proof {
119139 Risc0 ( super :: Risc0ZkvmProof ) ,
120140 }
121141}
142+ /// RISC Zero zkVM proof for zkDCAP
122143#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
123144#[ allow( clippy:: derive_partial_eq_without_eq) ]
124145#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -132,6 +153,7 @@ pub struct Risc0ZkvmProof {
132153 #[ prost( bytes = "vec" , tag = "4" ) ]
133154 pub output : :: prost:: alloc:: vec:: Vec < u8 > ,
134155}
156+ /// Collateral information for the DCAP quote verification.
135157#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
136158#[ allow( clippy:: derive_partial_eq_without_eq) ]
137159#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -149,13 +171,15 @@ pub struct QvCollateral {
149171 #[ prost( bytes = "vec" , tag = "6" ) ]
150172 pub sgx_pck_crl_der : :: prost:: alloc:: vec:: Vec < u8 > ,
151173}
174+ /// Request for getting the enclave key information.
152175#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
153176#[ allow( clippy:: derive_partial_eq_without_eq) ]
154177#[ derive( Clone , PartialEq , :: prost:: Message ) ]
155178pub struct QueryEnclaveKeyRequest {
156179 #[ prost( bytes = "vec" , tag = "1" ) ]
157180 pub enclave_key_address : :: prost:: alloc:: vec:: Vec < u8 > ,
158181}
182+ /// Response for getting the enclave key information.
159183#[ derive( :: serde:: Serialize , :: serde:: Deserialize ) ]
160184#[ allow( clippy:: derive_partial_eq_without_eq) ]
161185#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -233,6 +257,7 @@ pub mod query_client {
233257 self . inner = self . inner . accept_compressed ( encoding) ;
234258 self
235259 }
260+ /// Get the enclave information loaded in the service.
236261 pub async fn enclave_info (
237262 & mut self ,
238263 request : impl tonic:: IntoRequest < super :: QueryEnclaveInfoRequest > ,
@@ -252,6 +277,8 @@ pub mod query_client {
252277 ) ;
253278 self . inner . unary ( request. into_request ( ) , path, codec) . await
254279 }
280+ /// Get the available enclave keys for matching the
281+ /// specified MRENCLAVE and debug flag and RA type.
255282 pub async fn available_enclave_keys (
256283 & mut self ,
257284 request : impl tonic:: IntoRequest < super :: QueryAvailableEnclaveKeysRequest > ,
@@ -274,6 +301,7 @@ pub mod query_client {
274301 ) ;
275302 self . inner . unary ( request. into_request ( ) , path, codec) . await
276303 }
304+ /// Get the enclave key information for the specified enclave key address.
277305 pub async fn enclave_key (
278306 & mut self ,
279307 request : impl tonic:: IntoRequest < super :: QueryEnclaveKeyRequest > ,
@@ -303,17 +331,21 @@ pub mod query_server {
303331 /// Generated trait containing gRPC methods that should be implemented for use with QueryServer.
304332 #[ async_trait]
305333 pub trait Query : Send + Sync + ' static {
334+ /// Get the enclave information loaded in the service.
306335 async fn enclave_info (
307336 & self ,
308337 request : tonic:: Request < super :: QueryEnclaveInfoRequest > ,
309338 ) -> Result < tonic:: Response < super :: QueryEnclaveInfoResponse > , tonic:: Status > ;
339+ /// Get the available enclave keys for matching the
340+ /// specified MRENCLAVE and debug flag and RA type.
310341 async fn available_enclave_keys (
311342 & self ,
312343 request : tonic:: Request < super :: QueryAvailableEnclaveKeysRequest > ,
313344 ) -> Result <
314345 tonic:: Response < super :: QueryAvailableEnclaveKeysResponse > ,
315346 tonic:: Status ,
316347 > ;
348+ /// Get the enclave key information for the specified enclave key address.
317349 async fn enclave_key (
318350 & self ,
319351 request : tonic:: Request < super :: QueryEnclaveKeyRequest > ,
0 commit comments