

Product keys are yielded by purchasing Blizzard games. There are three types of keys varying in length and character masks.
Length | Character Mask | Description |
---|---|---|
13 | 0123456789 | These keys contain only numbers, of which the thirteenth is a checksum to validate the other twelve, used by older Starcraft releases. These keys are no longer sold by Blizzard and can be easily generated with a high yield of success. |
16 | 246789BCDEFGHJKMNPRTVWXZ | These keys are used by older copies of Warcraft II, Diablo II, and Lord of Destruction. These keys are no longer sold by Blizzard. |
26 | 246789BCDEFGHJKMNPRTVWXYZ | These are the more modern keys; currently this is the scheme used and sold by Blizzard, including for newer games. These keys use the same mask as 16-length keys but with the inclusion of the Y character. |
Note that none of these keys' masks contain dashes/hyphens, dots, spaces, or any sort of punctuation. Any character outside of these masks with these specific lengths should be trimmed.
Each key is the result of an algorithm to encode three values, commonly referred to as the Product, Public, and Private key values. The Product and Public 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. This is done in the SID_CDKEY2
and SID_AUTH_CHECK
messages. For the SID_CDKEY
message, the key is passed as typed and is vulnerable to packet sniffing.
The Product value is used to identify the key's client, and relate as follows:
Product value | Key length | Product title | Notes |
---|---|---|---|
0x01 | 13 | Starcraft | |
0x02 | 13 | Starcraft | Opened later due to the success and continuing sales of Starcraft |
0x04 | 16 | Warcraft II | |
0x05 | 16 | Diablo II Beta | Defunct |
0x05 | 26 | Starcraft II Beta | Defunct |
0x05 | 26 | WoW: Wrath of the Lich King Alpha | Defunct |
0x06 | 16 | Diablo II | |
0x07 | 16 | Diablo II | |
0x09 | 16 | Diablo II Stress Test | Defunct |
0x0A | 16 | D2: Lord of Destruction | |
0x0B | 16 | D2: Lord of Destruction Beta | Defunct |
0x0C | 16 | D2: Lord of Destruction | |
0x0D | 26 | Warcraft III Beta | Defunct |
0x0E | 26 | Warcraft III | |
0x0F | 26 | Warcraft III | |
0x11 | 26 | WC3: Frozen Throne Beta | Defunct |
0x12 | 26 | WC3: Frozen Throne | |
0x13 | 26 | WC3: Frozen Throne | Product appears disabled and may have something to do with Chinese region |
0x15 | 26 | WoW: Burning Crusade | |
0x16 | 26 | WoW: 14-day Trial | |
0x17 | 26 | Starcraft | Upgrade when Starcraft was released as a digital download and the game CD was removed from requirements to run the application |
0x18 | 26 | Diablo II | Released at the same time as the 26-length Starcraft keys for same reason |
0x19 | 26 | D2: Lord of Destruction | See 0x17 and 0x18 |
0x1A | 26 | WoW: Wrath of the Lich King | |
0x1C | 26 | Starcraft II | |
0x1E | 26 | Diablo III | |
0x24 | 26 | Heroes of the Storm |
For each key, the public and private value lengths differ, with the lengths usually being 32-bit unsigned integers, but with an 80-bit unsigned integer private value for 26-length keys.
Example code for encoding and decoding these keys is around, and RealityRipple 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.
Davnit has provided python implementations of decoding for each type of key: Python CD Key encoding