Revision 608ecfe891c3c193e3db89c4b9fb36e2874782de authored by Michael Schierl on 19 May 2023, 22:30:10 UTC, committed by Michael Schierl on 19 May 2023, 22:30:10 UTC
To work around GitHub's file size limit, split it into multiple parts.
1 parent a5eaa72
keyExportFormat.proto
syntax = "proto2";
option java_package = "keyexportformat";
message TemporaryExposureKeyExport {
// Time window of keys in this batch based on arrival to server, in UTC seconds
optional fixed64 start_timestamp = 1;
optional fixed64 end_timestamp = 2;
// Region for which these keys came from (e.g., country)
optional string region = 3;
// E.g., File 2 in batch size of 10. Ordinal, 1-based numbering.
optional int32 batch_num = 4;
optional int32 batch_size = 5;
// Information about associated signatures
repeated SignatureInfo signature_infos = 6;
// The TemporaryExposureKeys themselves
repeated TemporaryExposureKey keys = 7;
}
message SignatureInfo {
// Apple App Store Application Bundle ID
optional string app_bundle_id = 1;
// Android App package name
optional string android_package = 2;
// Key version for rollovers
optional string verification_key_version = 3;
// Additional identifying information
// E.g., backend might serve app in different countries with different keys
optional string verification_key_id = 4;
// E.g. ECDSA using a p-256 curve and SHA-256 as a hash function
optional string signature_algorithm = 5;
}
message SubmissionPayload {
repeated TemporaryExposureKey keys = 1;
}
message TemporaryExposureKey {
// Key of infected user
optional bytes key_data = 1;
// Varying risk associated with a key depending on diagnosis method
optional int32 transmission_risk_level = 2;
// The interval number since epoch for which a key starts
optional int32 rolling_start_interval_number = 3;
// Increments of 10 minutes describing how long a key is valid
optional int32 rolling_period = 4 [default = 144]; // defaults to 24 hours
// Data type representing why this key was published.
enum ReportType {
UNKNOWN = 0; // Never returned by the client API.
CONFIRMED_TEST = 1;
CONFIRMED_CLINICAL_DIAGNOSIS = 2;
SELF_REPORT = 3;
RECURSIVE = 4; // Reserved for future use.
REVOKED = 5; // Used to revoke a key, never returned by client API.
}
// Type of diagnosis associated with a key.
optional ReportType report_type = 5;
// Number of days elapsed between symptom onset and the TEK being used.
// E.g. 2 means TEK is 2 days after onset of symptoms.
optional sint32 days_since_onset_of_symptoms = 6;
}
message TEKSignatureList {
repeated TEKSignature signatures = 1;
}
message TEKSignature {
// Info about the signing key, version, algorithm, etc
optional SignatureInfo signature_info = 1;
// E.g., File 2 in batch size of 10. Ordinal, 1-based numbering.
// E.g., Batch 2 of 10
optional int32 batch_num = 2;
optional int32 batch_size = 3;
// Signature in X9.62 format (ASN.1 SEQUENCE of two INTEGER fields)
optional bytes signature = 4;
}
Computing file changes ...