3 ms·
WebCrypto + localStorage means the site has access to the private key if it wants to. That means that any script injection exploit can compromise everyone's key
by icebraining 11y ago
WebCrypto + localStorage means the site has access to the private key if it wants to. That means that any script injection exploit can compromise everyone's keys.
- geofft 11y agoI thought WebCrypto let you make non-extractable keys. But in any case, I'm not sure I understand the threat model of that. The <keygen> service will already sign any public key that gets to it past authentication, so if you're worried about client attacks, that's already a problem. There's no distinction between compromising an existing private key and getting a new, unauthorized private key signed. You're already requiring that the site be secure against these attacks. Obviously you don't store this in storage accessible to every relying website; you just store it in the origin of the authentication service itself, and have it generate signed messages (either client-side or server-side) that get passed to the relying websites.