messages.proto 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. /*
  2. * Copyright (C) 2011-2018 Intel Corporation. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in
  12. * the documentation and/or other materials provided with the
  13. * distribution.
  14. * * Neither the name of Intel Corporation nor the names of its
  15. * contributors may be used to endorse or promote products derived
  16. * from this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. *
  30. */
  31. package aesm.message;
  32. message Request{
  33. message InitQuoteRequest{
  34. optional uint32 timeout = 9;
  35. }
  36. message GetQuoteRequest{
  37. required bytes report = 1;
  38. required uint32 quote_type = 2;
  39. required bytes spid = 3;
  40. optional bytes nonce = 4;
  41. optional bytes sig_rl = 5;
  42. required uint32 buf_size = 6;
  43. optional bool qe_report = 7;
  44. optional uint32 timeout = 9;
  45. }
  46. message GetLaunchTokenRequest{
  47. required bytes mr_enclave = 1;
  48. required bytes mr_signer = 2;
  49. required bytes se_attributes = 3;
  50. optional uint32 timeout = 9;
  51. }
  52. message ReportAttestationErrorRequest{
  53. required bytes platform_info = 1;
  54. required uint32 attestation_error_code = 2;
  55. required uint32 update_info_size = 3;
  56. optional uint32 timeout = 9;
  57. }
  58. //private API
  59. message CreateSessionRequest{
  60. required uint32 dh_msg1_size = 1;
  61. optional uint32 timeout = 9;
  62. }
  63. message InvokeServiceRequest{
  64. required bytes pse_message = 1;
  65. required uint32 pse_resp_size = 2;
  66. optional uint32 timeout = 9;
  67. }
  68. message ExchangeReportRequest{
  69. required uint32 session_id = 1;
  70. required bytes se_dh_msg2 = 2;
  71. required uint32 se_dh_msg3_size = 3;
  72. optional uint32 timeout = 9;
  73. }
  74. message CloseSessionRequest{
  75. required uint32 session_id = 1;
  76. optional uint32 timeout = 9;
  77. }
  78. message GetPsCapRequest{
  79. optional uint32 timeout = 9;
  80. }
  81. message GetWhiteListSizeRequest{
  82. optional uint32 timeout = 9;
  83. }
  84. message GetWhiteListRequest{
  85. optional uint32 white_list_size = 1;
  86. optional uint32 timeout = 9;
  87. }
  88. message SGXGetExtendedEpidGroupIdRequest{
  89. optional uint32 timeout = 9;
  90. }
  91. message SGXSwitchExtendedEpidGroupRequest{
  92. optional uint32 x_group_id = 1;
  93. optional uint32 timeout = 9;
  94. }
  95. message SGXRegisterRequest{
  96. required bytes buf = 1;
  97. required uint32 data_type = 2;
  98. optional uint32 timeout = 9;
  99. }
  100. optional InitQuoteRequest initQuoteReq = 1;
  101. optional GetQuoteRequest getQuoteReq = 2;
  102. optional GetLaunchTokenRequest getLicTokenReq = 3;
  103. optional ReportAttestationErrorRequest reportErrReq = 4;
  104. optional CreateSessionRequest createSessionReq = 5;
  105. optional InvokeServiceRequest invokeServiceReq = 6;
  106. optional ExchangeReportRequest exchangeReportReq = 7;
  107. optional CloseSessionRequest closeSessionReq = 8;
  108. optional GetPsCapRequest getPsCapReq = 9;
  109. optional GetWhiteListSizeRequest getWhiteListSizeReq = 10;
  110. optional GetWhiteListRequest getWhiteListReq = 11;
  111. optional SGXGetExtendedEpidGroupIdRequest sgxGetExtendedEpidGroupIdReq = 12;
  112. optional SGXSwitchExtendedEpidGroupRequest sgxSwitchExtendedEpidGroupReq = 13;
  113. optional SGXRegisterRequest sgxRegisterReq = 14;
  114. }
  115. message Response{
  116. message InitQuoteResponse{
  117. required uint32 errorCode = 1 [default = 1];
  118. optional bytes targetInfo = 2;
  119. optional bytes gid = 3;
  120. }
  121. message GetQuoteResponse{
  122. required uint32 errorCode = 1 [default = 1];
  123. optional bytes quote = 2;
  124. optional bytes qe_report = 3;
  125. }
  126. message GetLaunchTokenResponse{
  127. required uint32 errorCode = 1 [default = 1];
  128. optional bytes token = 2;
  129. }
  130. message ReportAttestationErrorResponse{
  131. required uint32 errorCode = 1 [default = 1];
  132. optional bytes platform_update_info = 2;
  133. }
  134. //private API
  135. message CreateSessionResponse{
  136. required uint32 errorCode = 1 [default = 1];
  137. optional uint32 session_id = 2;
  138. optional bytes se_dh_msg1 = 3;
  139. }
  140. message InvokeServiceResponse{
  141. required uint32 errorCode = 1 [default = 1];
  142. optional bytes pse_message = 2;
  143. }
  144. message ExchangeReportResponse{
  145. required uint32 errorCode = 1 [default = 1];
  146. optional bytes se_dh_msg3 = 2;
  147. }
  148. message CloseSessionResponse{
  149. required uint32 errorCode = 1 [default = 1];
  150. }
  151. message GetPsCapResponse{
  152. required uint32 errorCode = 1 [default = 1];
  153. optional uint64 ps_cap = 2;
  154. }
  155. message GetWhiteListSizeResponse{
  156. required uint32 errorCode = 1 [default = 1];
  157. optional uint32 white_list_size = 2;
  158. }
  159. message GetWhiteListResponse{
  160. required uint32 errorCode = 1 [default = 1];
  161. optional bytes white_list = 2;
  162. }
  163. message SGXGetExtendedEpidGroupIdResponse{
  164. required uint32 errorCode = 1 [default = 1];
  165. optional uint32 x_group_id = 2;
  166. }
  167. message SGXSwitchExtendedEpidGroupResponse{
  168. required uint32 errorCode = 1 [ default = 1];
  169. }
  170. message SGXRegisterResponse{
  171. required uint32 errorCode = 1 [ default = 1];
  172. }
  173. optional InitQuoteResponse initQuoteRes = 1;
  174. optional GetQuoteResponse getQuoteRes = 2;
  175. optional GetLaunchTokenResponse getLicTokenRes = 3;
  176. optional ReportAttestationErrorResponse reportErrRes = 4;
  177. optional CreateSessionResponse createSessionRes = 5;
  178. optional InvokeServiceResponse invokeServiceRes = 6;
  179. optional ExchangeReportResponse exchangeReportRes = 7;
  180. optional CloseSessionResponse closeSessionRes = 8;
  181. optional GetPsCapResponse getPsCapRes = 9;
  182. optional GetWhiteListSizeResponse getWhiteListSizeRes = 10;
  183. optional GetWhiteListResponse getWhiteListRes = 11;
  184. optional SGXGetExtendedEpidGroupIdResponse sgxGetExtendedEpidGroupIdRes = 12;
  185. optional SGXSwitchExtendedEpidGroupResponse sgxSwitchExtendedEpidGroupRes = 13;
  186. optional SGXRegisterResponse sgxRegisterRes = 14;
  187. }