I have a browser based project where I want to use an encrypted database. SQLite already has a WASM build that can use Origin Private File System for storage, and I managed to get sqlcipher building for WASM as well. I used a WASM build of OpenSSL for encryption, but had to comment out the use of mlock due to limitations in the WASM memory model.
It’s in a very hacky state right now, but I was wondering if it would be worth cleaning up and contributing. I’m also not sure how the removal of mlock affects security.
If Zetetic is interested, let me know and I’ll sign the CLA see if I can get a PR together.
Hello @mch - thanks so much for getting in touch about this. We’d definitely be interested in taking a look at what you’ve put together. I’m pretty sure we can work around the mlock issue via macro. Please reach out to us at support@zetetic.net and we’ll get the CLA over to you as a next step. Thanks!
My changes are in the most recent two commits on this branch: GitHub - mch/sqlcipher at wasm, but because it’s no where near production ready there are a lot of manual steps to get it going, as documented in the blog post.
Hi, I haven’t been working on this, or even keeping my repo up to date with zetetic’s. I don’t have any plans to do anything with this in the immediate future.