remix logo

Hacker Remix

Show HN: I created a web app to encrypt/decrypt messages using Web Crypto API

34 points by thiagosf 3 days ago | 7 comments

yfw 1 day ago

I did this a while ago as well for rsa vs aes implementations. https://yifeiwu.github.io/subtlecrypto-demo/

thiagosf 1 day ago

That's cool, thanks for sharing it.

Rhapso 1 day ago

How are the public and private keys generated and stored?

hesus_ruiz 1 day ago

Generation, signature, verification, and some more crypto operations are performed with the standard browser Crypto APIs (https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypt...).

Storage of the private key is another thing. For a web app it is difficult to acces a hardware-based storage system. So typically it is stored in Localstorage or IndexdedDB, encrypted using a user-provided password. It is possible (but very involved and I have not seen web apps using it) to use WebAuthn for that.

thiagosf 1 day ago

I couldn't explain better, thank you !

random_kris 3 days ago

Very cool wanted to build something similar myself

thiagosf 1 day ago

Nice! You can check my source code and create your implementation!

https://github.com/thiagosf/webcrypto-private-messages

brody_slade_ai 2 days ago

[flagged]