<oembed><type>rich</type><version>1.0</version><author_name>Geek (npub1m2…r3wgu)</author_name><author_url>https://nostr.ae/npub1m2jphmdkskgnvwl5gplksl9e0zwv2sldqf9mwlpz6tyymz84g9fsqr3wgu</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>Just opened a PR hardening how Primal&#39;s web app encrypts keys at rest which is a bit meatier than the one I submitted this morning.&#xD;&#xA;&#xD;&#xA;Previously the PIN encrypted an nsec with a single unsalted SHA-256 hash of the PIN and unauthenticated AES-CBC. The PR upgrades this to PBKDF2 (600k iterations, random salt) and AES-256-GCM, which makes brute-forcing a stored blob drastically more expensive and makes wrong PINs fail cleanly. Existing users are migrated automatically on their next unlock, so nobody has to re-enter anything.&#xD;&#xA;&#xD;&#xA;It also encrypts the NIP-46 client transport key, which was previously plaintext in localStorage, using a non-extractable WebCrypto key.&#xD;&#xA;&#xD;&#xA;https://github.com/PrimalHQ/primal-web-app/pull/211</html></oembed>