BNETDocs Redux
Navigation |
Product Keys and Hashing
There are three types of CD-Keys, which are used by Battle.net to uniquely identify a game owner as a legitimate client. There are thirteen (13) digit keys, containing only numbers, of which the thirteenth is a checksum to validate the other twelve, used by the original Starcraft product releases. More common are the sixteen (16) digit keys, used by Diablo II, Lord of Destruction, and Warcraft II, consisting of the alphanumeric characters 2, 4 , 6, 7, 8 ,9, B, C, D, E, F, G, H, J, K, M, N, P, R, T, V, W, X, and Z. Finally, there are the twenty-six (26) digit keys currently used by newer releases of Starcraft, Diablo II, and Lord of Destruction, as well as Warcraft III, The Frozen Throne, and Starcraft II. These keys use all the same characters as the sixteen digit ones, with the inclusion of the letter Y. Each product key is actually the result of an algorithm to encode three values, commonly referred to as the Product, Public, and Private key values. The first two of these values are sent raw to the server as part of the connection, as well as a hash of all three, allowing the server to verify the key as a legitimate match without the opportunity of theft, as is possible in the SID_CDKEY packet where the key is passed as typed. The Product value is used to identify the key's client, and relate as follows:
For each key type, the public and private value lengths differ, with the lengths usually being one DWORD, but with a 10-byte private value for 26-digit keys. Example code for encoding and decoding these keys is around, and the author of this document would like to thank Yegg for his work in creating more efficient Key coding in the linked examples: VB.NET|Battle.net CD-Key Encoding/Decoding. Jailout2000 has also provided an example to REALbasic programmers for encoding and decoding 13-digit keys: REALbasic 13-digit Key Encoder/Decoder. |
Battle.net v1
Battle.net v2
emNet
PvPGN
RBNETD
|
Site scripts and design copyrights reserved to Don Cullen.
Contents copyrighted to Blizzard and their parent corporation, Vivendi.
Main credits for contents goes to Arta. View the rest of credits.
Demented Minds copyrights reserved to Don Cullen 2003-present.
Copyright infringements will be prosecuted to the fullest extent allowable by law.
Please view our legal disclaimer and terms of service.
User Comments
For detailed questions and discussion, visit the Battle.net Research Forum
Aug 17, 2010
09:48 AM
Nice reference. I give props to the VB.NET examples. Although I must add, where is the StarCraft II Wings of Liberty Demo Product Key? I only see the Beta and what looks like Retail versions.
Aug 31, 2010
03:22 AM
I don't have a copy of the game, but so far as I know, the SC2 guest pass keys use the same product value as the actual game, using the Public value to identify it as a guest pass (the two I examined started with 0x1EBA--).
Aug 31, 2010
06:07 AM
I'm surprised you don't have SC2, Andy. I have it, and so far, I'm definitely not disappointed. :)
Sep 05, 2010
12:46 AM
Retrieved the following from the game installers:
0x05: 16-digit Diablo II Beta Key
0x06: 16-digit Diablo II Retail Key
0x07: 16-digit Diablo II Retail Key
0x09: 16-digit Diablo II Stress Test Key
0x0A: 16-digit Diablo II: Lord of Destruction Retail Key
0x0C: 16-digit Diablo II: Lord of Destruction Retail Key
0x0D: 26-digit Warcraft III: Reign Of Chaos Beta key
0x0E: 26-digit Warcraft III: Reign Of Chaos Retail Key
0x0F: 26-digit Warcraft III: Reign Of Chaos Retail Key
0x11: 26-digit Warcraft III: The Frozen Throne Beta key
0x12: 26-digit Warcraft III: The Frozen Throne Retail key
0x13: 26-digit Warcraft III: The Frozen Throne Retail key (NOTE: This product seems disabled? Has something to do with Chinese region)
Any conflicts are intentional. Product IDs that havn't been seen before are reserved by the appropriate installer.
Starcraft II and the other digital keys might also have reservations, but I havn't been able to really grab it from the installer.
Sep 05, 2010
01:34 AM
Added Heinermann's notes. Just need SC/BW Beta.
Should we include WoW Keys as well, since we're keeping track of SC2 Keys?
Sep 05, 2010
10:31 PM
I think you should if the product, pubic, and private values are associated with it. AFAIK it is for any Blizzard key
Confirmation: The Starcraft Anthology digital installer uses product value 0x17, there are no reservations.
Confirmation: The Diablo II digital installer uses product value 0x18, there are no reservations.
Sep 19, 2010
03:08 AM
With that in mind then.. We need the following:
* SC Beta
* BW Beta
* WoW Alpha/Beta/Retail/Guest
* WoW TBC Alpha/Beta/Guest
* WoW WotLK Alpha/Beta/Guest
* WoW Cata Alpha/Beta/Retail/Guest
Sep 13, 2010
08:44 PM
Um... pretty sure the WoW guest passes are 0x1B, but I'm not sure which copy of WoW.
Sep 18, 2010
12:24 PM
WoW TBC Retail: 0x15
WoW WotLK Retail: 0x1A
Sep 19, 2010
03:07 AM
Added.
Mar 05, 2011
05:53 AM
WoW (14-day Trial): 0x16
Mar 14, 2011
02:20 AM
Added.
Jun 16, 2011
05:21 AM
Added a couple functions for encoding/decoding 13-digit keys in REALbasic. May be helpful, or maybe not...
May 16, 2012
06:12 AM
Diablo III: 0x1E
May 18, 2012
06:27 AM
Added.