25 个字符的产品密钥如何工作?
Microsoft 产品和其他产品通常具有 5 组 5 个字符的产品密钥,如下所示:
ABCDE-12345-ABCDE-12345-VWXYZ
产品如何知道密钥是否有效?某种密码学?如果我想在我的代码中使用这种产品密钥,是否有库?
Microsoft products and other products often have a product key that is 5 groups of 5 characters, like this:
ABCDE-12345-ABCDE-12345-VWXYZ
How does the product know if the key is valid? Some sort of cryptography? Is there a library if I want to use this kind of product key in my code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能想看看这个文章介绍如何实现序列号验证功能。它还涉及一些高级技术,例如如何掌握密钥生成、泄露的密钥等。
简而言之,此类密钥中通常包含三个底层字段:
通过在代码中仅实现部分验证数据检查,您可以执行诸如“真正验证”之类的操作(在这种情况下其余的验证发生在您的服务器上)或通过检查新版本中验证数据的不同子集来触发注册机。
You might want to have a look at this article on how to implement a serial number validation function. It also goes into some advanced techniques such as how to keep on top of keygens, leaked keys, etc.
In short, there are typically three underlying fields in such a key:
By only implementing part of the verification data checking in your code, you can do things like "genuine validation" (in which case the rest of the verification happens on your server) or trip up keygens by checking different subsets of the validation data in new releases.
特别是对于 Microsoft 产品,有一些可用的知识。
Windows XP 上的产品密钥使用自定义字母表进行 base24 编码。它由序列号(消息来源称其为“原始产品密钥”)和数字签名组成。 来源
Windows 8 及更高版本的产品密钥在软件中包含一些文档专利申请WO 2012067888 A1。它仍然是 Base24 编码的(第 57 步等,这实际上意味着“N”的位置用作要解码的第一个字符)。其要点是,Windows 8 及更高版本的产品密钥包含以下部分:
For Microsoft products in particular, is some knowledge available.
Product keys on Windows XP are base24-encoded using a custom alphabet. It consists of a serial number (the source calls it "Raw Product Key") and a digital signature over it. source
Product keys on Windows 8 and above have some documentation in the software patent application WO 2012067888 A1. It is still base24 encoded (act 57 et seq., which in practice means that the position of the 'N' is used as the very first character to decode). The gist of it is that there are these parts to a Windows 8 and above product key:
有四种方法可以确认密钥。
根据您从 Microsoft 获得的产品,他们使用上述前 3 种机制之一。例如,他们的操作系统通常会打电话回家;但他们的开发工具要么内置密钥,要么进行算法比较。他们的一些旧操作系统用于执行该算法。
有一个修改后的选项 3,但这只是让应用程序经常打电话回家,通常是基于某些事件。对于操作系统,MS 会验证输入的产品密钥以进行某些 Windows 更新和其他产品下载。此外,根据许可证密钥本身,它可能每月左右打电话回家一次。顺便说一句,中国拥有第一大 IE6 安装基数是有原因的。
第四个选项也可以被绕过。通常破解者只会修补您的产品以绕过执行硬件检查的代码部分。
There are four ways to confirm a key.
Depending on the product you have from microsoft, they use one of the first 3 mechanisms above. For example, their OS's usually phone home; but their dev tools either have the key baked in or do an algorithmic compare. Some of their older OS's used to do the algorithm.
There is a modified option 3, but that is simply having the app phone home every so often, typically based on some event. In the case of OS's, MS has it validate the entered product key for certain windows updates and other product downloads. Also, depending on the license key itself it might phone home once a month or so. As a side note, there is a reason why China has the #1 installed base of IE6.
The 4th option can also be circumvented. Usually the cracker will just patch your product to bypass the part of the code which does the hardware check.