Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Dro on April 12, 2005, 01:24 PM

Title: Solved.
Post by: Dro on April 12, 2005, 01:24 PM
Solved.

http://forum.valhallalegends.com/phpbbs/index.php?topic=11267.0
Title: Re: 0x56
Post by: UserLoser. on April 12, 2005, 02:13 PM
BYTE[20] - M1
BYTE[32] - S
BYTE[32] - V

See this page (http://srp.stanford.edu) for more info
Title: Re: 0x56
Post by: Dro on April 12, 2005, 02:17 PM
Solved.
Title: Re: 0x56
Post by: MyndFyre on April 12, 2005, 02:49 PM
Quote from: Dro on April 12, 2005, 02:17 PM
Quote from: UserLoser on April 12, 2005, 02:13 PM
BYTE[20] - M1
BYTE[32] - S
BYTE[32] - V

See this page (http://srp.stanford.edu) for more info

What is M1, S, V?
What variables are those and how do they relate to the account password and such?

UserLoser pointed you to that page for a reason.  Battle.net uses the SRP (Secure Remote Password) exchange for user authentication, which includes account creation and password change.

M1 is a calculated hash of several components.  It's the client password proof, calculated via the following formula:
M1 = SHA1(SHA1(g) xor SHA1(N), SHA1(Username), s, A, B, K)
Note that SHA1 is that standard SHA-1 hashing function, not the "broken" implementation found in other Blizzard clients.
S is the "secret" value.  Essentially, both sides calculate it independently, with different values, and are supposed to come up with the same result.  This is how they know they have a valid exchange mechanism.  It is calculated for the client with the formula:
S = ((N + B - v) % N)(a + u * x) % N
V is the password verifier, calculated with:
v = gx % N

All of this information can be found on BnetDocs (http://bnetdocs.valhallalegends.com/content.php?Section=d&id=18).  If you're using BNLS, it supports calculating the values for these messages.  See the BNLS Protocol Specification (http://www.valhallalegends.com/yoni/bnlsprotocolspec.txt) for more information.

Additionally, iago[vL] has documented the SRP key exchange (http://www.javaop.com/~iago/SRP.html) used with Battle.net, and it should prove to be an invaluable reference.

Next time, please read information on the "see also" or "see for more information" pages that we link to instead of just asking for information found on those pages.  It will make us that much more inclined to help you.
Title: Re: 0x56
Post by: iago on April 12, 2005, 02:56 PM
Quote from: MyndFyre on April 12, 2005, 02:49 PM
Additionally, iago[vL] has documented the SRP key exchange (http://www.javaop.com/~iago/SRP.html) used with Battle.net, and it should prove to be an invaluable reference.

That'll give you everything you need to know including packet structures, formulas, and code samples (in Java, but easily ported to .net or C).
Title: Re: 0x56
Post by: Dro on April 13, 2005, 12:34 AM
Solved.
Title: Re: 0x56
Post by: iago on April 13, 2005, 03:26 AM
Quote from: Dro on April 13, 2005, 12:34 AM
SID_AUTH_ACCOUNTCHANGE = BNCS packet 0x55 ?
SID_AUTH_ACCOUNTCHANGEPROOF = BNCS packet 0x56 ?

[C>0x55] SID_AUTH_ACCOUNTCHANGE
[S>0x55] SID_AUTH_ACCOUNTCHANGE
[C>0x56] SID_AUTH_ACCOUNTCHANGEPROOF
[S>0x56] SID_AUTH_ACCOUNTCHANGEPROOF

Yep.  Sorry, I forgot that Arta hasn't added that to BNetDocs yet.