对许可证文件进行编码以保护隐私

发布于 2024-09-03 09:41:44 字数 252 浏览 8 评论 0原文

我们使用 XML 数字签名来签署和验证我们的许可证密钥。签约工作进展顺利,进展顺利。 XML 许可证文件包含有关许可证的一些(纯文本)详细信息以及二进制签名。

我们希望对这些明文详细信息(许可证期限、用户名等)进行编码(我不是说加密),这样窥探者就不会立即看到它们。人们在这种情况下是否使用一个标准(例如,base 64 或其他标准)?它不需要安全或特别聪明,只要足以隐藏记事本中的信息即可。

编辑:我们正在使用.NET/C#。

谢谢 : )

We're using XML Digital Signatures for signing and verifying our license keys. The signing works fine and has been running smoothly. The XML license file contains a few (plaintext) details about the license, along with a binary signature.

We'd like to encode (I don't say encrypt) those plaintext details (license duration, user name, etc, etc.) so they're not immediately visible to prying eyes. Is there a standard (eg, base 64 or something else) that people use in this situation? It doesn't need to be secure or particularly clever, just enough to conceal the information in Notepad.

EDIT: We're using .NET/C#.

Thanks : )

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一曲琵琶半遮面シ 2024-09-10 09:41:45

作为许可证密钥的用户,我建议不要进行这种混淆。在审核许可证以确定您所引用的详细信息时,它通常非常有用。如果我可以从 xml 描述中获取它们,则可以节省大量时间。它还有助于发现错误部署的许可证。如果我发现密钥是颁发给 example.com 而不是我工作的组织,我就知道我们需要解决该问题。如果它被发布到ZXhhbXBsZS5jb20K(base64的example.com),我会不会三思而后行。我还必须确保许可证按时更新。我什么时候可以更新过期的许可证
MjAxMC0wNi0wMQo=?

As a user of license keys, I would recommend against this obfuscation. It is often very useful when auditing the license to determine the details you are referring to. If I can get them from the xml description, it can save as substantial amount of time. It also helps discover incorrectly deployed licenses. If I find a key issued to example.com instead of the organization I work for, I know we need to address the issue. If it is issued to ZXhhbXBsZS5jb20K (example.com in base64), do I will not think twice about it. I also have to deal with ensuring licences are renewed on time. When do I renew a license with an expiry of
MjAxMC0wNi0wMQo=?

野味少女 2024-09-10 09:41:44

只需使用异或即可。 XOR 是个好东西(如果使用得当),甚至可以用在 RC4 等加密算法中。通过使用 XOR,我的意思是采用一些在应用程序中保持不变的文本字符串,然后将文件的第一个字节与该字符串的第一个字节进行异或,然后将文件的第二个字节与该字符串的第二个字节进行异或,依此类推。然后从字符串的开头开始。这就是流密码的工作方式。在代码中找到的字符串(与某个常数相反)将使黑客的工作变得更加复杂。

Just use XOR. XOR is a good thing (when used right), used even in cryptographic algorithms such as RC4. By using XOR I mean taking some text string that will remain constant in your application, then XOR 1st byte of your file with 1st byte of that string, then xor 2nd byte of your file with 2nd byte of that string and so on. Then start from the beginning of the string. This is the way stream ciphers work. The string found in your code (in opposite to just some constant number) will make hacker's work a tiny bit more complicated.

人│生佛魔见 2024-09-10 09:41:44

一个简单的十六进制编码就可以实现这一点。它也很容易解码。如果您提到您正在使用哪种语言或平台编写代码,那么有人可以提出更具体的建议。

A simple hex encoding would accomplish that. It is also easy to decode. If you mention which language or platform you are writing the code in, someone could make a more specific recommendation.

无边思念无边月 2024-09-10 09:41:44

如果您只是想混淆细节,那么我认为 Base64 或等效的编码机制就可以了。

我不熟悉任何关于你想要做的事情的标准,因为大多数人会认为你想要做的事情并没有真正实现任何目标(因为它属于“通过安全来实现安全”的领域)朦胧”)。

If you're simply looking to obfuscate the details, then I would think a Base64 or equivalent encoding mechanism would be fine.

I'm not familiar with any sort of standard around exactly what you're trying to do, since most people would argue that what you're trying to do doesn't really achieve anything (since it falls within the realm of "security through obscurity").

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文