• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto2";
16
17package securegcm;
18
19option optimize_for = LITE_RUNTIME;
20option java_package = "com.google.security.cryptauth.lib.securegcm";
21option java_outer_classname = "SecureGcmProto";
22option objc_class_prefix = "SGCM";
23
24enum Type {
25  ENROLLMENT = 0;
26  TICKLE = 1;
27  TX_REQUEST = 2;
28  TX_REPLY = 3;
29  TX_SYNC_REQUEST = 4;
30  TX_SYNC_RESPONSE = 5;
31  TX_PING = 6;
32  DEVICE_INFO_UPDATE = 7;
33  TX_CANCEL_REQUEST = 8;
34
35  // DEPRECATED (can be re-used after Aug 2015)
36  PROXIMITYAUTH_PAIRING = 10;
37
38  // The kind of identity assertion generated by a "GCM V1" device (i.e.,
39  // an Android phone that has registered with us a public and a symmetric
40  // key)
41  GCMV1_IDENTITY_ASSERTION = 11;
42
43  // Device-to-device communications are protected by an unauthenticated
44  // Diffie-Hellman exchange. The InitiatorHello message is simply the
45  // initiator's public DH key, and is not encoded as a SecureMessage, so
46  // it doesn't have a tag.
47  // The ResponderHello message (which is sent by the responder
48  // to the initiator), on the other hand, carries a payload that is protected
49  // by the derived shared key. It also contains the responder's
50  // public DH key. ResponderHelloAndPayload messages have the
51  // DEVICE_TO_DEVICE_RESPONDER_HELLO tag.
52  DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD = 12;
53
54  // Device-to-device communications are protected by an unauthenticated
55  // Diffie-Hellman exchange. Once the initiator and responder
56  // agree on a shared key (through Diffie-Hellman), they will use messages
57  // tagged with DEVICE_TO_DEVICE_MESSAGE to exchange data.
58  DEVICE_TO_DEVICE_MESSAGE = 13;
59
60  // Notification to let a device know it should contact a nearby device.
61  DEVICE_PROXIMITY_CALLBACK = 14;
62
63  // Device-to-device communications are protected by an unauthenticated
64  // Diffie-Hellman exchange. During device-to-device authentication, the first
65  // message from initiator (the challenge) is signed and put into the payload
66  // of the message sent back to the initiator.
67  UNLOCK_KEY_SIGNED_CHALLENGE = 15;
68
69  // Specialty (corp only) features
70  LOGIN_NOTIFICATION = 101;
71}
72
73message GcmMetadata {
74  required Type type = 1;
75  optional int32 version = 2 [default = 0];
76}
77