File: get_probabilistic_reveal_token.proto

package info (click to toggle)
chromium 138.0.7204.157-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,071,864 kB
  • sloc: cpp: 34,936,859; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,967; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (70 lines) | stat: -rw-r--r-- 2,183 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";

package ip_protection;

option optimize_for = LITE_RUNTIME;

message GetProbabilisticRevealTokenRequest {
  enum ServiceType {
    SERVICE_TYPE_UNSPECIFIED = 0;
    CHROME = 1;
  }
  optional ServiceType service_type = 1;
}

message Timestamp {
  // Represents seconds of UTC time since Unix epoch
  // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
  // 9999-12-31T23:59:59Z inclusive.
  int64 seconds = 1;

  // Non-negative fractions of a second at nanosecond resolution. Negative
  // second values with fractions must still have non-negative nanos values
  // that count forward in time. Must be from 0 to 999,999,999
  // inclusive.
  int32 nanos = 2;
}

// Response to get probabilistic reveal tokens.
message GetProbabilisticRevealTokenResponse {
  // A single probabilistic reveal token
  message ProbabilisticRevealToken {
    // Version 1 indicates curve secp224r1.
    // Chrome verifies version is 1 and complains if not.
    optional int32 version = 1;
    // Elliptic curve point stored in compressed form, for version 1 size must
    // be 29.
    optional bytes u = 2;
    // Elliptic curve point stored in compressed form, for version 1 size must
    // be 29.
    optional bytes e = 3;
  }

  // Stores a public key for curve secp224r1.
  message PublicKey {
    // Elliptic curve point stored in compressed form, for version 1 size must
    // be 29.
    optional bytes y = 1;
  }

  repeated ProbabilisticRevealToken tokens = 1;

  optional PublicKey public_key = 2;

  // Time since unix epoch, tokens are invalid past this expiration time.
  optional Timestamp expiration_time = 3;

  // Time since unix epoch. After this, chrome can ask for tokens with a later
  // expiration time.
  optional Timestamp next_epoch_start_time = 4;

  // The number of tokens with the signal.
  optional int32 num_tokens_with_signal = 5;

  // The id of the epoch in which the tokens were issued, used to identify the
  // corresponding key used to decrypt the tokens.
  optional bytes epoch_id = 6;
}