ankane / lockbox

Modern encryption for Ruby and Rails
MIT License
1.46k stars 68 forks source link

How to: Client-side decryption #98

Closed skelz0r closed 3 years ago

skelz0r commented 3 years ago

I wanna know if it is possible to implement in a secure way a client-side decryption directly in the browser.

I have a customer who wants to provide his own encryption key and keep the decryption key for himself , so I will never be able to decrypt the data stored on my webapp (which it's possible with Hybrid Cryptography if I understand). Operations will be perform mostly through our API, so it won't be a problem for this use case (server to server communication), but for some operations it would be great to perform them on our webapp, so I wonder if it's possible and secure to do it.

Disclaimer: I don't know if this topic it's relevant for Lockbox, feel free to just close the issue if you think it's irrelevant.

ankane commented 3 years ago

Hey @skelz0r, unfortunately, I don't have any experience with browser-based decryption.

skelz0r commented 3 years ago

Thanks for you quick reply.

I'll investigate it, and if I find something relevant I'll comment here.

ankane commented 3 years ago

Sounds good 👍

philipqnguyen commented 2 years ago

@skelz0r did you solve this? I'm trying to decrypt client side as well.

skelz0r commented 2 years ago

@philipqnguyen no I didn't sorry.