encryption - 如何在 Web 浏览器中使用 Webauthn/CTAP HMAC-Secret 扩展检索对称 key ?

标签 encryption webauthn fido yubikey

我正在尝试利用 CTAP hmac-secret 扩展来检索用于在 Web 浏览器中进行对称加密的 key 。我有实现此扩展的 Yubikey5。我通读了 CTAP 规范,但在获得断言数据后,我找不到如何执行此操作的引用。

这是我的简化代码:

var getCredentialDefaultArgs = {
  publicKey: {
    timeout: 60000,
    allowCredentials: myCredentials,
    challenge: myUint8Array,
    extensions: {
      hmacGetSecret: {
        salt1: "01234567890ABCDEF"
      }
    }
  }
}

navigator.credentials.get(getCredentialDefaultArgs)
.then((assertion) => {
  console.log("assertion", assertion.response.authenticatorData);
  // How do I get my symmetric secret from the authenticatorData ?
  // log just shows: ArrayBuffer(37) {byteLength: 37}
})
.catch((err) => {
  console.log("assertion error", err);
});

我无法在 JavaScript 中找到一个可以在网络浏览器中利用此功能的有效示例。

最佳答案

此扩展目前仅供平台使用。 WebAuthn 无权访问它。将来可能会改变。

关于encryption - 如何在 Web 浏览器中使用 Webauthn/CTAP HMAC-Secret 扩展检索对称 key ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70140478/

相关文章:

android - 在 Android 中保存之前处理偏好值?

javascript - WebAuthN 是否可以查看可用的平台验证器?

security - YubiKey + Webauth : userHandle is always null

encryption - WebauthN 和 Yubikey 用于在浏览器中生成对称加密 key 。这个黑客安全吗?

webauthn - 确保使用 FIDO2 认证的安全 key

git - Travis 加密变量未正确解码乱码= [安全]

python - sha1 在 go 中与在 python 和 openssl 中不同

mysql - 使用 VB.NET 通过 SSL 远程访问 MySQL

javascript - 如何确定设备是否可以在 Javascript 中使用 Webauthn 指纹登录?

iOS Fido2 BLE 认证器注册响应问题