3

我是网络安全的新手,正在尝试制作一个个人密码管理器。绝对现在我将不得不使用加密和散列算法。

我遇到了Keyczar,它提供了加密和解密算法。在那里我看到了以下两行将生成密钥的行。

KeyczarTool create --location=/path/to/keyset --purpose=sign
KeyczarTool create --location=/path/to/keyset --purpose=crypt --name=Test
KeyczarTool create --location=/path/to/keyset --purpose=sign --asymmetric=dsa

现在的问题是我不确定在哪里执行它们,我正在使用 Netbeans。

4

1 回答 1

1

使用这些命令,您刚刚创建了密钥。现在您需要编写实际使用这些键的代码。在 Java 中,它会是这样的:

Crypter crypter = new Crypter("/path/to/your/keys");
String ciphertext = crypter.encrypt("Secret message");

您可以在https://github.com/google/keyczar/wiki找到更多文档以及 C++ 和 Python 示例。

更新:虽然它不是完全最新的,但我发现这个文档非常有用,比你可以在那里找到的其他链接更深入:https ://github.com/google/keyczar/blob/wiki/keyczar05b.pdf

于 2016-02-01T14:20:54.750 回答