roughtime.googlesource.com/roughtime.git@v0.0.0-20201210012726-dd529367052d/config.proto (about)

     1  syntax = "proto3";
     2  package roughtime.config;
     3  
     4  // These protobufs are only used with JSON serialisation so we attempt to emit
     5  // as little C++ code as possible.
     6  option optimize_for = CODE_SIZE;
     7  
     8  // ServersJSON represents a JSON format for distributing information about
     9  // Roughtime servers.
    10  message ServersJSON {
    11    // created contains the RFC3339 time when the JSON file was created.
    12    string created = 1;
    13    // expires contains the RFC3339 time when the information in this JSON file
    14    // expires.
    15    string expires = 2;
    16    repeated Server servers = 3;
    17  }
    18  
    19  // Server represents a Roughtime server in a JSON configuration.
    20  message Server {
    21    string name = 1;
    22    // public_key_type specifies the type of the public key contained in
    23    // |PublicKey|. Normally this will be "ed25519" but implementations should
    24    // ignore entries with unknown key types.
    25    string public_key_type = 2;
    26    bytes public_key = 3;
    27    repeated ServerAddress addresses = 4;
    28  }
    29  
    30  // ServerAddress represents the address of a Roughtime server in a JSON
    31  // configuration.
    32  message ServerAddress {
    33    string protocol = 1;
    34    // address contains a protocol specific address. For the protocol "udp", the
    35    // address has the form "host:port" where host is either a DNS name, an IPv4
    36    // literal, or an IPv6 literal in square brackets.
    37    string address = 2;
    38  }
    39  
    40  // Chain represents a history of Roughtime queries where each provably follows
    41  // the previous one.
    42  message Chain {
    43    repeated Link links = 1;
    44  }
    45  
    46  // Link represents an entry in a Chain.
    47  message Link {
    48    // public_key_type specifies the type of public key contained in
    49    // |PublicKey|. See the same field in |Server| for details.
    50    string public_key_type = 1;
    51    bytes server_public_key = 2;
    52    // nonce_or_blind contains either the full nonce (only for the first |Link|
    53    // in a |Chain|) or else contains a blind value that is combined with the
    54    // previous reply to make the next nonce. In either case, the value is 64
    55    // bytes long.
    56    bytes nonce_or_blind = 3;
    57    // reply contains the reply from the server.
    58    bytes reply = 4;
    59  }