messages.proto 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /*
  2. * Copyright (C) 2011-2017 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. optional InitQuoteRequest initQuoteReq = 1;
  96. optional GetQuoteRequest getQuoteReq = 2;
  97. optional GetLaunchTokenRequest getLicTokenReq = 3;
  98. optional ReportAttestationErrorRequest reportErrReq = 4;
  99. optional CreateSessionRequest createSessionReq = 5;
  100. optional InvokeServiceRequest invokeServiceReq = 6;
  101. optional ExchangeReportRequest exchangeReportReq = 7;
  102. optional CloseSessionRequest closeSessionReq = 8;
  103. optional GetPsCapRequest getPsCapReq = 9;
  104. optional GetWhiteListSizeRequest getWhiteListSizeReq = 10;
  105. optional GetWhiteListRequest getWhiteListReq = 11;
  106. optional SGXGetExtendedEpidGroupIdRequest sgxGetExtendedEpidGroupIdReq = 12;
  107. optional SGXSwitchExtendedEpidGroupRequest sgxSwitchExtendedEpidGroupReq = 13;
  108. }
  109. message Response{
  110. message InitQuoteResponse{
  111. required uint32 errorCode = 1 [default = 1];
  112. optional bytes targetInfo = 2;
  113. optional bytes gid = 3;
  114. }
  115. message GetQuoteResponse{
  116. required uint32 errorCode = 1 [default = 1];
  117. optional bytes quote = 2;
  118. optional bytes qe_report = 3;
  119. }
  120. message GetLaunchTokenResponse{
  121. required uint32 errorCode = 1 [default = 1];
  122. optional bytes token = 2;
  123. }
  124. message ReportAttestationErrorResponse{
  125. required uint32 errorCode = 1 [default = 1];
  126. optional bytes platform_update_info = 2;
  127. }
  128. //private API
  129. message CreateSessionResponse{
  130. required uint32 errorCode = 1 [default = 1];
  131. optional uint32 session_id = 2;
  132. optional bytes se_dh_msg1 = 3;
  133. }
  134. message InvokeServiceResponse{
  135. required uint32 errorCode = 1 [default = 1];
  136. optional bytes pse_message = 2;
  137. }
  138. message ExchangeReportResponse{
  139. required uint32 errorCode = 1 [default = 1];
  140. optional bytes se_dh_msg3 = 2;
  141. }
  142. message CloseSessionResponse{
  143. required uint32 errorCode = 1 [default = 1];
  144. }
  145. message GetPsCapResponse{
  146. required uint32 errorCode = 1 [default = 1];
  147. optional uint64 ps_cap = 2;
  148. }
  149. message GetWhiteListSizeResponse{
  150. required uint32 errorCode = 1 [default = 1];
  151. optional uint32 white_list_size = 2;
  152. }
  153. message GetWhiteListResponse{
  154. required uint32 errorCode = 1 [default = 1];
  155. optional bytes white_list = 2;
  156. }
  157. message SGXGetExtendedEpidGroupIdResponse{
  158. required uint32 errorCode = 1 [default = 1];
  159. optional uint32 x_group_id = 2;
  160. }
  161. message SGXSwitchExtendedEpidGroupResponse{
  162. required uint32 errorCode = 1 [ default = 1];
  163. }
  164. optional InitQuoteResponse initQuoteRes = 1;
  165. optional GetQuoteResponse getQuoteRes = 2;
  166. optional GetLaunchTokenResponse getLicTokenRes = 3;
  167. optional ReportAttestationErrorResponse reportErrRes = 4;
  168. optional CreateSessionResponse createSessionRes = 5;
  169. optional InvokeServiceResponse invokeServiceRes = 6;
  170. optional ExchangeReportResponse exchangeReportRes = 7;
  171. optional CloseSessionResponse closeSessionRes = 8;
  172. optional GetPsCapResponse getPsCapRes = 9;
  173. optional GetWhiteListSizeResponse getWhiteListSizeRes = 10;
  174. optional GetWhiteListResponse getWhiteListRes = 11;
  175. optional SGXGetExtendedEpidGroupIdResponse sgxGetExtendedEpidGroupIdRes = 12;
  176. optional SGXSwitchExtendedEpidGroupResponse sgxSwitchExtendedEpidGroupRes = 13;
  177. }