gmessages/libgm/gmproto/authentication.proto
2024-02-22 22:39:28 +02:00

251 lines
5.6 KiB
Protocol Buffer

syntax = "proto3";
package authentication;
option go_package = "../gmproto";
import "util.proto";
import "pblite.proto";
enum BrowserType {
UNKNOWN_BROWSER_TYPE = 0;
OTHER = 1;
CHROME = 2;
FIREFOX = 3;
SAFARI = 4;
OPERA = 5;
IE = 6;
EDGE = 7;
}
enum DeviceType {
UNKNOWN_DEVICE_TYPE = 0;
WEB = 1;
TABLET = 2;
PWA = 3;
}
message BrowserDetails {
string userAgent = 1;
BrowserType browserType = 2;
string OS = 3;
DeviceType deviceType = 6;
}
message Device {
int64 userID = 1;
string sourceID = 2;
string network = 3;
}
message ConfigVersion {
int32 Year = 3;
int32 Month = 4;
int32 Day = 5;
int32 V1 = 7;
int32 V2 = 9;
}
message SignInGaiaRequest {
message Inner {
message DeviceID {
int32 unknownInt1 = 1; // 3
string deviceID = 2; // messages-web-{uuid without dashes}
}
message Data {
bytes someData = 3; // maybe an encryption key?
}
DeviceID deviceID = 1;
Data someData = 36 [(pblite.pblite_binary) = true];
}
AuthMessage authMessage = 1;
Inner inner = 2;
int32 unknownInt3 = 3;
string network = 4;
}
message SignInGaiaResponse {
message Header {
uint64 unknownInt2 = 2;
int64 unknownTimestamp = 4;
}
message DeviceData {
message DeviceWrapper {
Device device = 1;
}
DeviceWrapper deviceWrapper = 1;
repeated RPCGaiaData.UnknownContainer.Item2.Item1 unknownItems2 = 2;
repeated RPCGaiaData.UnknownContainer.Item4 unknownItems3 = 3;
// index 4 is some unknown field with no real data
}
Header header = 1;
string maybeBrowserUUID = 2 [(pblite.pblite_binary) = true];
DeviceData deviceData = 3;
TokenData tokenData = 4;
}
message GaiaPairingRequestContainer {
string pairingUUID = 1;
BrowserDetails browserDetails = 2;
int64 startTimestamp = 3;
bytes data = 4;
}
message GaiaPairingResponseContainer {
int32 finishErrorType = 1;
int32 finishErrorCode = 2;
int32 unknownInt3 = 3; // For init, 1
string sessionUUID = 4;
bytes data = 5;
}
message RPCGaiaData {
message UnknownContainer {
message Item2 {
message Item1 {
string destOrSourceUUID = 1 [(pblite.pblite_binary) = true];
int32 unknownInt4 = 4; // 1 for destination device, 6 for local device?
string languageCode = 5;
uint64 unknownBigInt7 = 7;
}
repeated Item1 item1 = 1;
}
message Item4 {
message Item8 {
int32 unknownInt1 = 1; // present for destination device?
int32 unknownTimestamp = 2; // present for destination device?
bytes unknownBytes = 3; // present for local device?
}
string destOrSourceUUID = 1 [(pblite.pblite_binary) = true];
int32 unknownInt3 = 3; // 1 for destination device, 6 for local device?
int32 unknownInt4 = 4; // always 6?
int64 unknownTimestampMicroseconds = 7; // maybe device creation ts?
Item8 item8 = 8 [(pblite.pblite_binary) = true];
}
Item2 item2 = 2;
int64 unknownTimestampMicroseconds = 3; // pairing timestamp?
repeated Item4 item4 = 4;
}
int32 command = 1; // 9
UnknownContainer maybeServerData = 108;
}
message AuthenticationContainer {
AuthMessage authMessage = 1;
BrowserDetails browserDetails = 3;
oneof data {
KeyData keyData = 4;
CurrentDeviceData deviceData = 5;
}
}
message AuthMessage {
string requestID = 1;
string network = 3;
bytes tachyonAuthToken = 6;
ConfigVersion configVersion = 7;
}
message RevokeRelayPairingRequest {
AuthMessage authMessage = 1;
Device browser = 2;
}
message RevokeRelayPairingResponse {
// field 1 is an object with an unknown int64 in field 2
}
message RegisterRefreshRequest {
message NestedEmptyArr {
util.EmptyArr emptyArr = 9;
}
AuthMessage messageAuth = 1;
Device currBrowserDevice = 2;
int64 unixTimestamp = 3;
bytes signature = 4;
NestedEmptyArr emptyRefreshArr = 13;
int32 messageType = 16;
}
message RegisterRefreshResponse {
TokenData tokenData = 2;
}
message RegisterPhoneRelayResponse {
CoordinateMessage coordinates = 1;
Device browser = 2;
bytes pairingKey = 3;
int64 validFor = 4;
TokenData authKeyData = 5;
string responseID = 6;
}
message CoordinateMessage {
int64 coord1 = 2;
}
message RefreshPhoneRelayResponse {
CoordinateMessage coordinates = 1;
bytes pairKey = 2;
int64 validFor = 3;
}
message WebEncryptionKeyResponse {
CoordinateMessage coordinates = 1;
bytes key = 2;
}
message ErrorResponse {
int64 type = 1; // 5?
string message = 2;
repeated ErrorClass class = 3;
message ErrorClass {
string class = 1;
// 2: {1: 1}
}
}
message ECDSAKeys {
int64 field1 = 1; // idk?
bytes encryptedKeys = 2;
}
message CurrentDeviceData {
authentication.Device browser = 1;
}
message KeyData {
Device mobile = 1;
ECDSAKeys ecdsaKeys = 6;
WebAuthKey webAuthKeyData = 2;
Device browser = 3;
}
message WebAuthKey {
bytes webAuthKey = 1;
int64 validFor = 2;
}
message URLData {
bytes pairingKey = 1;
bytes AESKey = 2;
bytes HMACKey = 3;
}
message TokenData {
bytes tachyonAuthToken = 1;
int64 TTL = 2;
}
message PairedData {
Device mobile = 1;
TokenData tokenData = 2;
Device browser = 3;
}
message RevokePairData {
Device revokedDevice = 1;
}