2

我正在测试 Yubico Yubikeys 5 NFC,一般来说,我们使用 KeePassXC 来保存敏感信息。KeePassXC 接受 yubikeys 但只有一个...有人知道是否可以在 kdbx 文件中添加多个?

4

2 回答 2

2

在与 KeePassXC 的团队交谈后,他们通知我这是不可能的。只需将相同的种子添加到其他 Yubikey 即可保留第二个密钥。

在文档部分,我们可以阅读以下内容

What happens if I break my YubiKey? Can I create backup keys?
    You should always make a copy of the HMAC secret that is stored on the YubiKey and keep it in a secure location. This can be an analog paper copy, but since the YubiKey personalization tool allows you to program a custom secret into the key, you may as well program a second key with the same secret

 
Can I register multiple YubiKeys with my KeePassXC database?
    You can only use a single secret for encrypting the database. So you can use multiple YubiKeys, but they all have to be programmed with the same secret (see question above).

以及如何在两个 yubikey 的插槽 2 中设置相同 id 的说明如下:https: //support.yubico.com/hc/en-us/articles/360013779759-Using-Your-YubiKey-with-KeePass

请记住,在第二个键中,您必须复制并粘贴相同的种子

完整的讨论在这里:https ://github.com/keepassxreboot/keepassxc/discussions/6344

于 2021-03-29T14:40:54.047 回答
0

建议在 YubiKeys 上使用强主密码并定期保存数据库以生成新的挑战/响应对。远非完美,但比密码更好。以下方法(使用 HMAC-SHA1 的挑战响应)适用于使用 KeePassXC v2.6.2 和 2x YubiKey 5 NFC 固件 v5.4.3 的 Ubuntu:

  1. 安装ykman(yubikey-manager 的一部分)
$ sudo apt-get install yubikey-manager        
  1. 检查 key#1 和 key#2 中的 slot#2 是否为空。您将覆盖两个键上的 slot#2。
$ ykman otp info 
Slot 1: programmed
Slot 2: empty
  1. 生成一个 base32 编码的秘密种子(例如:“SECRETSEED”),它将被编程到两个密钥中。RFC2104 建议您的种子与底层哈希函数一样长(SHA1 为 20 个字节)
$ base32
SECRETSEED<Enter>
CTRL+D
BASE32SECRETSEED
$

请注意,上述方法为种子添加了 CR。将 SECRETSEED 存储在安全的地方(最好不要以数字方式),以防您丢失两个密钥

  1. 将生成的“BASE32SECRETSEED”编程到 key#1 和 key#2
$ ykman otp chalresp -t 2
Enter a secret key: BASE32SECRETSEED
Program a challenge-response credential in slot 2? [y/N]: y
  1. 验证相同的质询使用两个键给您相同的响应
$ ykman otp calculate 2 
Enter a challenge (hex): deadbeef
Touch your YubiKey...
aabbccdd11223344556677889900aabbccdd1122
  1. 将您的一个密钥添加到您的 KeePassXC 数据库

数据库 > 数据库安全 > 添加额外保护 > 添加 YubiKey Challenge-Response

  1. 两个键现在应该可以解锁/保存您的数据库

参考:

于 2021-09-19T06:07:59.997 回答