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