File: gcm_encryption_data.proto

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; 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 (58 lines) | stat: -rw-r--r-- 1,885 bytes parent folder | download | duplicates (9)
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
// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package gcm;

// Stores a public/private key-pair.
// Next tag: 5
message KeyPair {
  // The type of key used for key agreement. Currently only the ECDH key
  // agreement scheme is supported, using NIST P-256.
  enum KeyType {
    ECDH_P256 = 0;
  }

  required KeyType type = 1;

  // The private key matching the size requirements of |type|.
  optional bytes private_key = 2;

  reserved 3;  // public_key_x509, now deleted.

  // The public key as an uncompressed EC point according to SEC 2.3.3.
  optional bytes public_key = 4;
}

// Stores a vector of public/private key-pairs associated with an app id and
// optionally the authorized entity of an instance id token.
//
// In the current implementation, each (app_id, authorized_entity) pair will
// have a single encryption key-pair associated with it at most. The message
// allows for multiple key pairs in case we need to force-cycle all keys,
// allowing the old keys to remain valid for a period of time enabling the web
// app to update.
//
// Next tag: 6
message EncryptionData {
  // The app id to whom this encryption data belongs.
  required string app_id = 1;

  // The sender id of the instance id token that this encryption data belongs
  // to. Must not be empty. Must be omitted for non-InstanceID registrations.
  optional string authorized_entity = 4;

  // DEPRECATED: The actual public/private key-pairs.
  repeated KeyPair keys = 2;

  // P-256 private key stored as a PKCS #8 PrivateKeyInfo block.
  optional string private_key = 5;

  // The authentication secret associated with the subscription. Must be a
  // cryptographically secure number of at least 12 bytes.
  optional bytes auth_secret = 3;
}