syntax = "proto3";
package secret.registration.remote_attestation.v1beta1;

import "gogoproto/gogo.proto";

option go_package = "github.com/enigmampc/SecretNetwork/x/registration/remote_attestation";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;

message QuoteReport {
  string id = 1 [(gogoproto.customname) = "ID"];
  string timestamp = 2;
  uint64 version = 3;
  string isv_enclave_quote_status = 4 [(gogoproto.jsontag) = "isvEnclaveQuoteStatus"];
  string platform_info_blob = 5 [(gogoproto.jsontag) = "platformInfoBlob"];
  string isv_enclave_quote_body = 6 [(gogoproto.jsontag) = "isvEnclaveQuoteBody"];
  repeated string advisory_ids = 7 [(gogoproto.customname) = "AdvisoryIDs", (gogoproto.jsontag) = "advisoryIDs"];
}

message QuoteReportBody {
  string mr_enclave = 1;
  string mr_signer = 2;
  string report_data = 3;
}

message QuoteReportData {
  uint64 version = 1;
  uint64 sign_type = 2;
  QuoteReportBody report_body = 3;
}

message EndorsedAttestationReport {
  bytes report = 1;
  bytes signature = 2;
  bytes signing_cert = 3;
}

message SGXEC256Signature {
  string gx = 1;
  string gy = 2;
}

message PlatformInfoBlob {
  uint32 sgx_epid_group_flags = 1;
  uint32 sgx_tcb_evaluation_flags = 2;
  uint32 pse_evaluation_flags = 3;
  string latest_equivalent_tcb_psvn = 4;
  string latest_pse_isvsvn = 5;
  string latest_psda_svn = 6;
  uint32 xeid = 7;
  uint32 gid = 8;
  SGXEC256Signature sgx_ec256_signature_t = 9;
}
