Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC Encrypt/Decrypt expense title on client side #41

Conversation

ChristopherJohnston
Copy link
Contributor

@ChristopherJohnston ChristopherJohnston commented Jan 13, 2024

Proof of concept outlining SHA-256 encrypt/decrypt of expense title on the client using libp2p/keychain and libp2p/cms, storing the private key in IndexedDb using datastore-idb

NB the encrypt/decrypt calls are quite slow so probably not a practical solution!

Copy link

vercel bot commented Jan 13, 2024

@ChristopherJohnston is attempting to deploy a commit to the Sebastien Castiel Team on Vercel.

A member of the Team first needs to authorize it.

@scastiel scastiel force-pushed the main branch 3 times, most recently from d067d96 to 6b6d58e Compare January 16, 2024 18:55
@ankitbahl
Copy link
Contributor

This looks like RSA (Public key crypto) - For basic encryption, a symmetric key encryption methodology should be used. For example AES. This will likely speed up those calls (Symmetric key cryptography is generally much faster)

Doesn't JS already have build in crypto functionality? Not sure how performant it is comparatively.

@ChristopherJohnston
Copy link
Contributor Author

It's using CMS, which utilises an RSA private key for encryption. This particular proof of concept makes use of libp2p/cryptography which stores the keys in an IndexedDB within the browser's local storage.

The slowness I'm now attributing to the time it's taking for the UI graph to rebuild rather than the individual encrypt/decrypt calls.

That said, I have no real preference to which encryption method is used - this really was an exercise to see if it could be done without significant changes.

@ChristopherJohnston
Copy link
Contributor Author

closing this for now as it's more of a proof of concept - will revisit at a later date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants