BNETDocs: Redux is no longer updated, this subdomain exists for archival purposes only. Visit the main site.

Navigation

Generate Code: All packets
Packets

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:

  • 0x01: 13-digit Starcraft Key
  • 0x02: 13-digit Starcraft Key (opened later due to the success and continuing sales of Starcraft)
  • 0x04: 16-digit Warcraft II Key
  • 0x05: 16-digit Diablo II: Beta Key (defunct)
  • 0x05: 26-digit Starcraft II Beta Key (defunct)
  • 0x06: 16-digit Diablo II Key
  • 0x07: 16-digit Diablo II Key
  • 0x09: 16-digit Diablo II: Stress Test Key (defunct)
  • 0x0A: 16-digit Diablo II: Lord of Destruction Key
  • 0x0C: 16-digit Diablo II: Lord of Destruction Key
  • 0x0D: 26-digit Warcraft III: Reign Of Chaos Beta Key (defunct)
  • 0x0E: 26-digit Warcraft III: Reign Of Chaos Key
  • 0x0F: 26-digit Warcraft III: Reign Of Chaos Key
  • 0x11: 26-digit Warcraft III: The Frozen Throne Beta Key (defunct)
  • 0x12: 26-digit Warcraft III: The Frozen Throne Key
  • 0x13: 26-digit Warcraft III: The Frozen Throne Retail key (NOTE: This product seems disabled? Has something to do with Chinese region)
  • 0x15: 26-digit World of Warcraft: The Burning Crusade
  • 0x16: 26-digit World of Warcraft: 14-day Trial
  • 0x17: 26-digit Starcraft Key (upgrade when Starcraft was released as an online-download and the game CD was removed from requirements to run the application)
  • 0x18: 26-digit Diablo II Key (released at the same time as the 26-digit keys for the same reasons)
  • 0x19: 26-digit Diablo II: Lord of Destruction Key (see 0x17 and 0x18)
  • 0x1A: 26-digit World of Warcraft: Wrath of the Lich King
  • 0x1C: 26-digit Starcraft II: Wings of Liberty Key (only one key examined by this author, others may be in existence, and likely to change for the next two releases)
  • 0x1E: 26-digit Diablo III Key

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.

User Comments


For detailed questions and discussion, visit the Battle.net Research Forum

Jailout2000
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.

RealityRipple
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--).

Kyro
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. :)

Heinermann
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.

Sixen
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?

Heinermann
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.


Sixen
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

RealityRipple
Sep 13, 2010
08:44 PM

Um... pretty sure the WoW guest passes are 0x1B, but I'm not sure which copy of WoW.

RealityRipple
Sep 18, 2010
12:24 PM

WoW TBC Retail: 0x15
WoW WotLK Retail: 0x1A

Sixen
Sep 19, 2010
03:07 AM

Added.

RealityRipple
Mar 05, 2011
05:53 AM

WoW (14-day Trial): 0x16

Jailout2000
Mar 14, 2011
02:20 AM

Added.

Jailout2000
Jun 16, 2011
05:21 AM

Added a couple functions for encoding/decoding 13-digit keys in REALbasic. May be helpful, or maybe not...

RealityRipple
May 16, 2012
06:12 AM

Diablo III: 0x1E

Jailout2000
May 18, 2012
06:27 AM

Added.

ALERT
We recommend you use Firefox to view this site. This site has been optimized for Firefox.

Get Firefox
BNLS Server Status
bnls.bnetdocs.org:
bnls.net:
bnls.mattkv.net:
phix.no-ip.org:
pyro.no-ip.biz:
bnls.war-lords.net:
bnls.anubisdev.net:
knight.mattkv.net:

= Online       = Offline

Battle.net Server Status

Battle.net v1

uswest.battle.net:
exodus.battle.net:
useast.battle.net:
asia.battle.net:
europe.battle.net:
ustest.battle.net:
beta.battle.net:
classicbeta.battle.net:
demo.war3.battle.net:

Battle.net v2

us.logon.battle.net:
eu.logon.battle.net:
kr.logon.battle.net:
cn.logon.battle.net:
us.patch.battle.net:
eu.patch.battle.net:
kr.patch.battle.net:
cn.patch.battle.net:
public-test.logon.battle.net:
public-test.patch.battle.net:

emNet

cali.emwar.com:
dallas.emwar.com:
kc.emwar.com:
ny.emwar.com:

PvPGN

server.eurobattle.net:
rubattle.net:
sc.theabyss.ru:
wc3.theabyss.ru:
bnetd.fishbattle.net:

RBNETD

server.bnetdocs.org:

= Online       = Offline



Copyrights

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.