请,请,请停止使用密码密钥来加密用户数据。
Don't use passkeys for encrypting user data

原始链接: https://blog.timcappalli.me/p/passkeys-prf-warning/

## Passkey 与数据丢失:日益增长的风险 Passkey 的普及是积极的,但一个危险的趋势正在出现:将它们——以及相关的 PRF 技术——用于*既*身份验证**又**数据加密(如备份、消息和加密钱包)。这为用户造成了永久数据丢失的重大风险。 问题在于用户缺乏意识。Passkey 设置并未明确传达此双重功能,并且用户往往会随着时间的推移忘记这种关联。删除一个 Passkey,看似简单的清理任务,然后可能不可逆转地将他们锁定在加密数据之外,包括不可替代的回忆。 虽然 PRF 在 WebAuthn 中有合法的用途(例如使用多种恢复选项保护凭据管理器),但将其扩展到通用数据加密会大大增加丢失 Passkey 的“爆炸半径”。 作者敦促身份行业**停止**将 Passkey 用于加密,凭据管理器在删除启用 PRF 的 Passkey 之前**警告**用户,并要求利用此实践的服务向用户提供清晰的**信息**和预先警告。目标是保留 Passkey 作为抗网络钓鱼身份验证工具的优势,同时避免危及用户数据。

一个黑客新闻的讨论围绕着一篇建议不要使用密码密钥来加密用户数据的帖子。核心论点并非针对密码密钥,而是对用户无论通过何种方式都不可避免地会丢失访问任何加密密钥的一般性警告。 用户指出这个问题也存在于传统密码中——人们会忘记密码并请求重置,甚至对于本地加密的文件也是如此。一位评论员表示,由于感知到的复杂性和对密码密钥影响缺乏了解,而不愿采用密码密钥。 最后,有人提出了一点关于原文示例中代词使用的风格问题,认为这妨碍了清晰度。总体情绪倾向于承认加密密钥丢失的风险,无论选择何种方法。
相关文章

原文

Why am I writing this today? Because I am deeply concerned about users losing their most sacred data.

Over the past year or two, I’ve seen many organizations, large and small, implement passkeys (which is great, thank you!) and use the PRF (Pseudo-Random Function) extension to derive keys to protect user data, typically to support end-to-end encryption (including backups). I’ve also seen a number of influential folks and organizations promote the use of PRF for encrypting data.

The primary use cases I’ve seen implemented or promoted so far include:

  • encrypting message backups (including images and videos)
  • end-to-end encryption
  • encrypting documents and other files
  • encrypting and unlocking crypto wallets
  • credential manager unlocking
  • local account sign in

Why is this a problem?

When you overload a credential used for authentication by also using it for encryption, the “blast radius” for losing that credential becomes immeasurably larger.

Imagine a user named Erika. They are asked to set up encrypted backups in their favorite messaging app because they don’t want to lose their messages and photos, especially those of loved ones who are no longer here. Erika is prompted to use their passkey to enable these backups.

There is nothing in the UI that emphasizes that these backups are now tightly coupled to their passkey. Even if there were explanatory text, Erika, like most users, doesn’t typically read through every dialog box, and they certainly can’t be expected to remember this technical detail a year from now.

A few months pass, and Erika decides to clean up their credential manager. They don’t remember why they had a specific passkey for a messaging app and deletes it.

Fast forward a year: they get a new phone and set up the messaging app. They aren’t prompted to use a passkey because one no longer exists in their credential manager. Instead, they use phone number verification to recover their account. They are then guided through the “restore backup” flow and prompted for their passkey.

Since they no longer have it, they are informed that they cannot access their backed up data. Goodbye, memories.

Here’s a few examples of what a user sees when they delete a passkey:

Apple Passwords delete passkey
Example: deleting a passkey in Apple Passwords

Google Password Manager delete passkey
Example: deleting a passkey in Google Password Manager

Bitwarden delete passkey
Example: deleting a passkey in Bitwarden

How is a user supposed to understand that they are potentially blowing away photos of deceased relatives, an encrypted property deed, or their digital currency?

We cannot, and should not, expect users to know this.

At this point, you may be asking why PRF is part of WebAuthn in the first place. There are some very legitimate and more durable uses of PRF in WebAuthn, specifically supporting credential managers and operating systems.

A passkey with PRF can make unlocking your credential manager (where all of your other passkeys and credentials are stored) much faster and more secure. Credential managers have robust mechanisms to protect your vault data with multiple methods, such as master passwords, per-device keys, recovery keys, and social recovery keys. Losing access to a passkey used to unlock your credential manager rarely leads to complete loss of your vault data.

PRF is already implemented in WebAuthn Clients and Credential Managers, so the cat is out of the bag. My asks:

  • To the wider identity industry: please stop promoting and using passkeys to encrypt user data. I’m begging you. Let them be great, phishing-resistant authentication credentials.

  • To credential managers: please prioritize adding warnings for users when they delete a passkey with PRF (and displaying the RP’s info page when available)

  • To sites and services using passkeys: if you still need to use PRF knowing these concerns, please:

    1. add an informational page to your support site explaining how you’re using passkeys for more than authentication
    2. list that page URL in the Well-Known URL for Relying Party Passkey Endpoints (prfUsageDetails)
    3. provide as much warning as possible up front to users when enabling it

Thanks for reading! 🙏🏻

(and thanks to Matthew Miller for reviewing and providing feedback on this post)

联系我们 contact @ memedata.com