从配置源加载和存储加密密钥

发布于 2024-08-26 18:03:29 字数 378 浏览 4 评论 0原文

我正在编写一个具有真实性机制的应用程序,使用 HMAC-sha1,加上 CBC-blowfish 传递数据以进行良好的测量。这需要 2 个钥匙和 1 个 ivec。

我看过 Crypto++,但文档非常差(例如 HMAC 文档)。所以我要走老路并使用 Openssl。使用库函数和工具生成和加载这些密钥的最佳方法是什么?我不需要安全套接字,因此 x.509 证书可能没有意义,除非我遗漏了一些东西。

那么,我是否需要编写自己的配置文件,或者 openssl 中有任何基础设施吗?如果是这样,您能否指导我查看一些相关文档或示例。

I am writing an application which has an authenticity mechanism, using HMAC-sha1, plus a CBC-blowfish pass over the data for good measure. This requires 2 keys and one ivec.

I have looked at Crypto++ but the documentation is very poor (for example the HMAC documentation). So I am going oldschool and use Openssl. Whats the best way to generate and load these keys using library functions and tools ? I don't require a secure-socket therefore a x.509 certificate probably does not make sense, unless, of-course, I am missing something.

So, do I need to write my own config file, or is there any infrastructure in openssl for this ? If so, could you direct me to some documentation or examples for this.

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

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

发布评论

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

评论(2

剩一世无双 2024-09-02 18:03:29

尽管它没有直接回答您的问题,但如果您将其视为程序复制保护的一种方法,那么以下相关问题可能会引起有趣的阅读。

Although it doesn't answer your question directly, if you are looking at this as a method of copy protection for your program, the following related questions may make for interesting reading.

轻拂→两袖风尘 2024-09-02 18:03:29

这就是我为 atm 准备的解决方案。当然,除非有人提出更好的方案,或者解决我的具体问题的方案。

我将把三个文件放在 /etc/acme/auth/file1 file2 和 file3 中,这是随机生成 2 个密钥和 ivec 数字的二进制文件,并在 Windows 中但在 下执行相同的操作c:\etc\acme\auth

This is the solution I am going for atm. Unless of course someone comes up with a better one, or one that solves my specific problem.

I will put three files in /etc/acme/auth/file1 file2 and file3, binary files with randomly generates numbers for the 2 keys and the ivec, and do the same in windows but under c:\etc\acme\auth.

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