2016-11-21 02:48:17 +00:00
|
|
|
syntax = "proto2";
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message ClientHello {
|
2015-07-01 23:27:19 +00:00
|
|
|
required BuildInfo build_info = 0xa;
|
|
|
|
repeated Fingerprint fingerprints_supported = 0x14;
|
|
|
|
repeated Cryptosuite cryptosuites_supported = 0x1e;
|
|
|
|
repeated Powscheme powschemes_supported = 0x28;
|
|
|
|
required LoginCryptoHelloUnion login_crypto_hello = 0x32;
|
|
|
|
required bytes client_nonce = 0x3c;
|
|
|
|
optional bytes padding = 0x46;
|
|
|
|
optional FeatureSet feature_set = 0x50;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message BuildInfo {
|
2015-07-01 23:27:19 +00:00
|
|
|
required Product product = 0xa;
|
|
|
|
repeated ProductFlags product_flags = 0x14;
|
|
|
|
required Platform platform = 0x1e;
|
|
|
|
required uint64 version = 0x28;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum Product {
|
|
|
|
PRODUCT_CLIENT = 0x0;
|
|
|
|
PRODUCT_LIBSPOTIFY= 0x1;
|
|
|
|
PRODUCT_MOBILE = 0x2;
|
|
|
|
PRODUCT_PARTNER = 0x3;
|
|
|
|
PRODUCT_LIBSPOTIFY_EMBEDDED = 0x5;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ProductFlags {
|
|
|
|
PRODUCT_FLAG_NONE = 0x0;
|
|
|
|
PRODUCT_FLAG_DEV_BUILD = 0x1;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Platform {
|
|
|
|
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 Fingerprint {
|
|
|
|
FINGERPRINT_GRAIN = 0x0;
|
|
|
|
FINGERPRINT_HMAC_RIPEMD = 0x1;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Cryptosuite {
|
|
|
|
CRYPTO_SUITE_SHANNON = 0x0;
|
|
|
|
CRYPTO_SUITE_RC4_SHA1_HMAC = 0x1;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Powscheme {
|
|
|
|
POW_HASH_CASH = 0x0;
|
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message LoginCryptoHelloUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional LoginCryptoDiffieHellmanHello diffie_hellman = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message LoginCryptoDiffieHellmanHello {
|
2015-07-01 23:27:19 +00:00
|
|
|
required bytes gc = 0xa;
|
|
|
|
required uint32 server_keys_known = 0x14;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message FeatureSet {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional bool autoupdate2 = 0x1;
|
|
|
|
optional bool current_location = 0x2;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message APResponseMessage {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional APChallenge challenge = 0xa;
|
|
|
|
optional UpgradeRequiredMessage upgrade = 0x14;
|
|
|
|
optional APLoginFailed login_failed = 0x1e;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message APChallenge {
|
2015-07-01 23:27:19 +00:00
|
|
|
required LoginCryptoChallengeUnion login_crypto_challenge = 0xa;
|
|
|
|
required FingerprintChallengeUnion fingerprint_challenge = 0x14;
|
|
|
|
required PoWChallengeUnion pow_challenge = 0x1e;
|
|
|
|
required CryptoChallengeUnion crypto_challenge = 0x28;
|
|
|
|
required bytes server_nonce = 0x32;
|
|
|
|
optional bytes padding = 0x3c;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message LoginCryptoChallengeUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional LoginCryptoDiffieHellmanChallenge diffie_hellman = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message LoginCryptoDiffieHellmanChallenge {
|
2015-07-01 23:27:19 +00:00
|
|
|
required bytes gs = 0xa;
|
|
|
|
required int32 server_signature_key = 0x14;
|
|
|
|
required bytes gs_signature = 0x1e;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message FingerprintChallengeUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional FingerprintGrainChallenge grain = 0xa;
|
|
|
|
optional FingerprintHmacRipemdChallenge hmac_ripemd = 0x14;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message FingerprintGrainChallenge {
|
2015-07-01 23:27:19 +00:00
|
|
|
required bytes kek = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message FingerprintHmacRipemdChallenge {
|
2015-07-01 23:27:19 +00:00
|
|
|
required bytes challenge = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message PoWChallengeUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional PoWHashCashChallenge hash_cash = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message PoWHashCashChallenge {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional bytes prefix = 0xa;
|
|
|
|
optional int32 length = 0x14;
|
|
|
|
optional int32 target = 0x1e;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message CryptoChallengeUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional CryptoShannonChallenge shannon = 0xa;
|
|
|
|
optional CryptoRc4Sha1HmacChallenge rc4_sha1_hmac = 0x14;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message CryptoShannonChallenge {
|
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message CryptoRc4Sha1HmacChallenge {
|
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message UpgradeRequiredMessage {
|
2015-07-01 23:27:19 +00:00
|
|
|
required bytes upgrade_signed_part = 0xa;
|
|
|
|
required bytes signature = 0x14;
|
|
|
|
optional string http_suffix = 0x1e;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message APLoginFailed {
|
2015-07-01 23:27:19 +00:00
|
|
|
required ErrorCode error_code = 0xa;
|
|
|
|
optional int32 retry_delay = 0x14;
|
|
|
|
optional int32 expiry = 0x1e;
|
|
|
|
optional string error_description = 0x28;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum ErrorCode {
|
|
|
|
ProtocolError = 0x0;
|
|
|
|
TryAnotherAP = 0x2;
|
|
|
|
BadConnectionId = 0x5;
|
|
|
|
TravelRestriction = 0x9;
|
|
|
|
PremiumAccountRequired = 0xb;
|
|
|
|
BadCredentials = 0xc;
|
|
|
|
CouldNotValidateCredentials = 0xd;
|
|
|
|
AccountExists = 0xe;
|
|
|
|
ExtraVerificationRequired = 0xf;
|
|
|
|
InvalidAppKey = 0x10;
|
|
|
|
ApplicationBanned = 0x11;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ClientResponsePlaintext {
|
2015-07-01 23:27:19 +00:00
|
|
|
required LoginCryptoResponseUnion login_crypto_response = 0xa;
|
|
|
|
required PoWResponseUnion pow_response = 0x14;
|
|
|
|
required CryptoResponseUnion crypto_response = 0x1e;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message LoginCryptoResponseUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional LoginCryptoDiffieHellmanResponse diffie_hellman = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message LoginCryptoDiffieHellmanResponse {
|
2015-07-01 23:27:19 +00:00
|
|
|
required bytes hmac = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message PoWResponseUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional PoWHashCashResponse hash_cash = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message PoWHashCashResponse {
|
2015-07-01 23:27:19 +00:00
|
|
|
required bytes hash_suffix = 0xa;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message CryptoResponseUnion {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional CryptoShannonResponse shannon = 0xa;
|
|
|
|
optional CryptoRc4Sha1HmacResponse rc4_sha1_hmac = 0x14;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message CryptoShannonResponse {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional int32 dummy = 0x1;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 23:27:19 +00:00
|
|
|
|
2015-05-09 10:07:24 +00:00
|
|
|
message CryptoRc4Sha1HmacResponse {
|
2015-07-01 23:27:19 +00:00
|
|
|
optional int32 dummy = 0x1;
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|