message LoginCryptoDiffieHellmanChallenge {
    required bytes gs = 0xa; 
}

message LoginCryptoChallengeUnion {
    optional LoginCryptoDiffieHellmanChallenge diffie_hellman = 0xa; 
}

enum Product {
    PRODUCT_CLIENT = 0x0;
    PRODUCT_LIBSPOTIFY= 0x1;
    PRODUCT_MOBILE = 0x2;
    PRODUCT_PARTNER = 0x3;
    PRODUCT_LIBSPOTIFY_EMBEDDED = 0x5;
}

message LoginCryptoDiffieHellmanHello {
    required bytes gc = 0xa;
    required uint32 server_keys_known = 0x14;
}

message LoginCryptoHelloUnion {
    optional LoginCryptoDiffieHellmanHello diffie_hellman = 0xa; 
}


enum Platform2 {
    PLATFORM_WIN32_X86 = 0x0;
    PLATFORM_OSX_X86 = 0x1;
    PLATFORM_LINUX_X86 = 0x2;
    PLATFORM_IPHONE_ARM = 0x3;
    PLATFORM_S60_ARM = 0x4;
    PLATFORM_OSX_PPC = 0x5;
    PLATFORM_ANDROID_ARM = 0x6;
    PLATFORM_WINDOWS_CE_ARM = 0x7;
    PLATFORM_LINUX_X86_64 = 0x8;
    PLATFORM_OSX_X86_64 = 0x9;
    PLATFORM_PALM_ARM = 0xa;
    PLATFORM_LINUX_SH = 0xb;
    PLATFORM_FREEBSD_X86 = 0xc;
    PLATFORM_FREEBSD_X86_64 = 0xd;
    PLATFORM_BLACKBERRY_ARM = 0xe;
    PLATFORM_SONOS = 0xf;
    PLATFORM_LINUX_MIPS = 0x10;
    PLATFORM_LINUX_ARM = 0x11;
    PLATFORM_LOGITECH_ARM = 0x12;
    PLATFORM_LINUX_BLACKFIN = 0x13;
    PLATFORM_WP7_ARM = 0x14;
    PLATFORM_ONKYO_ARM = 0x15;
    PLATFORM_QNXNTO_ARM = 0x16;
    PLATFORM_BCO_ARM = 0x17;
}

enum Cryptosuite {
    CRYPTO_SUITE_SHANNON = 0x0;
    CRYPTO_SUITE_RC4_SHA1_HMAC = 0x1;
}

message BuildInfo {
    required Product product = 0xa; 
    required Platform2 platform = 0x1e; 
    required uint64 version = 0x28; 
}

message FeatureSet {
    optional bool autoupdate2 = 0x1; 
}

message APChallenge {
    required LoginCryptoChallengeUnion login_crypto_challenge = 0xa; 
}

message APResponseMessage {
    optional APChallenge challenge = 0xa; 
}

message LoginCryptoDiffieHellmanResponse {
    required bytes hmac = 0xa; 
}

message LoginCryptoResponseUnion {
    optional LoginCryptoDiffieHellmanResponse diffie_hellman = 0xa; 
}
message CryptoResponseUnion {
}
message PoWResponseUnion {
}

message ClientResponsePlaintext {
    required LoginCryptoResponseUnion login_crypto_response = 0xa;
    required PoWResponseUnion pow_response = 0x14; 
    required CryptoResponseUnion crypto_response = 0x1e;
}

message ClientHello {
    required BuildInfo build_info = 0xa; 
    required LoginCryptoHelloUnion login_crypto_hello = 0x32; 
    repeated Cryptosuite cryptosuites_supported = 0x1e; 
    required bytes client_nonce = 0x3c; 
    optional bytes padding = 0x46; 
    optional FeatureSet feature_set = 0x50; 
}
