![](/img/trans.png)
[英]WebauthN and Yubikey to generate keys for symmetric encryption in a browser. Is this hack secure?
[英]How to retrieve a symmetric key using Webauthn/CTAP HMAC-Secret extension in a web browser?
我正在嘗試利用 CTAP hmac-secret 擴展在 web 瀏覽器中檢索對稱加密的密鑰。 我有實現這個擴展的 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 中找到一個可以在 web 瀏覽器中利用此功能的工作示例。
此擴展目前僅為平台保留。 WebAuthn 無權訪問它。 將來可能會改變。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.