安全
加密
- 在你的设备上:文件被分成若干块,每块都用 AES-256-GCM 加密。对于标准链接,密钥由一个新的 256 位秘密通过 HKDF-SHA-512 派生。其他分享方式用各自所需的秘密派生密钥。任何一块被篡改都会被发现。
- 口令在你的设备上用 scrypt 加强(每次猜测 128 MB)。
- 大小:小文件会被填充,因此看不出确切大小。
- 服务器会检查上传内容看起来是否是加密的 Locker,但无法检查里面是什么:它没有密钥。
保护层
Locker 用多层相互独立的保护来守护你的文件,从你设备上生成的随机密钥一直到连接本身。下面逐层展示;绿色层保护你的文件,蓝色层保护服务器上少量的记录,橙色层保护传输和连接。
Text version of this figure
- Security layers: every place Locker uses encryption, keyed hashing or randomness.
- Your files. Link key: 256 random bits from the browser's secure generator, carried only after # in the link and never sent to the server.
- Your files. File encryption: HKDF-SHA-512 derives a key for each chunk and AES-256-GCM seals every chunk, so tampering is detected.
- Your files. Hidden size and name: the file name and type are encrypted inside, and the stored size is padded so it does not reveal the content length.
- Your files. Passphrase: an optional second secret, stretched on the device with memory-hard scrypt (128 MB).
- The server's records. Identifiers: random 128-bit locators in day namespaces, keyed with HMAC-SHA-256; no permanent history.
- The server's records. Access: Access Words or Emojis are checked on the server against encrypted check data; access never opens files.
- The server's records. Shop replay records are sealed with AES-256-GCM and expire after 60 days; rate counters are keyed and kept in memory.
- Transfers and transport. Nearby (beta): pairing by camera codes; each direction has its own AES-256-GCM key over WebRTC, with no signaling server.
- Transfers and transport. Camera Codes: encrypted frames from screen to camera; enhanced mode adds a separate 256-bit key QR.
- Transfers and transport. HTTPS with the hybrid X25519MLKEM768 key exchange where the server's OpenSSL supports it; a Tor onion address is optional.
访问不等于文件访问
三者始终分开:
| 部分 | 能做 | 永远不能 |
|---|---|---|
| WordPress 插件 | 创建邀请;查看、更改套餐或终止它创建的访问 | 上传、打开、列出或删除 Locker,查看链接或密钥,或查看其他访问 |
| Locker 服务器 | 允许上传、执行额度、保存加密数据 | 接收、生成或持有文件密钥,或把访问与文件关联 |
| 你的浏览器 | 生成密钥、加密和解密 | 把访问权限或邀请当作密钥使用 |
按照设计,任何人凭 Locker 的地址都能下载其加密数据。打开它需要其分享方式所要求的秘密:链接中的密钥、单独发送的密钥或口令。测试会用被盗的开通令牌、访问词语、邀请、撤销代码以及其他 Locker 的密钥去尝试打开一个 Locker:都打不开。
抗量子性
详情见抗量子性。Locker 只使用对称密码学(AES-256、HKDF、scrypt、SHA-2),从不通过公钥交换发送密钥,因此加密的 Locker 设计上能抵御未来量子计算机“现在收集、以后解密”的攻击。
任何网页应用都无法保证的事
- 下发的代码。运营 Locker 服务器的人控制着它提供的 JavaScript,可能修改它以在你以后访问时截取你输入的内容。源代码公开,便于检查;浏览器扩展运行它自带的代码。
- 收件人可能保留收到的内容或链接。
- 你的设备:恶意软件或被入侵的浏览器能看到你看到的一切。
报告问题
请用公布的 GPG 密钥,私下向 security@privacysafe.net 报告安全问题。