版本说明以英文撰写。
Real encryption in the browser, and the fix that made it usable
The browser can now actually encrypt and decrypt data on your own machine. crypto.subtle gained real AES (the symmetric cipher the whole web runs on) in both the CTR and CBC modes, for 128, 192 and 256-bit keys, with key generation and import - all hand-written and checked byte-for-byte against the official NIST test vectors, the same way the hashing was. That is the path client-side encryption, sealed local storage and end-to-end features take, and it now works without a server. While wiring it up we found and fixed a real gap that had been quietly breaking it: reading the bytes back out of a crypto result with Array.from, the spread operator, or a for-of loop returned nothing, because those never actually walked a typed array. That is the single most common way to read binary data in JavaScript, so fixing it does far more than help encryption. Deliberately NOT included: AES-GCM, whose authentication tag is a separate primitive a vector test would not fully catch, so it is left absent (a page detects that and falls back) rather than shipped unverified. The Web API figure moves one point for the real capability added.
改动内容
3 项改动- 渲染Added real AES symmetric encryption to crypto.subtle: encrypt and decrypt in AES-CTR and AES-CBC modes (128/192/256-bit keys), plus generateKey, importKey and exportKey. The cipher is hand-written and verified byte-for-byte against the FIPS-197 and NIST SP 800-38A known-answer vectors. This is the standard path for client-side / on-device encryption, and it now runs with no server involved.
- JavaScript 与 JITFixed a real gap: Array.from(view), the spread operator [...view], and for-of over a typed array (Uint8Array, Float64Array, and the rest) all returned EMPTY, because materialising an iterable never walked a typed array. This is the canonical way to read bytes out of a crypto digest or cipher result, so it had been quietly breaking binary-data code across the board. Now every form reads the real elements.
- 隐私与 ShieldsOn-device encryption, by design: AES runs entirely on your machine with no network round-trip, so client-side-encrypted storage and end-to-end features do not have to trust a server with your keys or your plaintext. AES-GCM is deliberately left absent (its authentication tag is unverified here) so a page feature-detects and falls back rather than getting a silently-wrong result.





