0

I want to a web application that concerns Homomorphic Encryption. I am using Microsoft SEAL. I wanted to know if there is any way I could use this library in javascript function so that whenever a button is clicked the javascript function is executed on the user's browser and the encryption is carried out using Microsoft SEAL. I tried emscripten but the C++ code importing the library SEAL is not generating a wasm file. I have spent alot of time trying to find a solution but no luck. All the solutions available result in the code executed on the server. If anyone knows a way I can achieve this please guide me. The help would be really highly appreciated. Thanks

2
  • I'd silently close all my browsers forever, if executing an arbitarary C++ code loaded from an arbitrary web page would be possible in browsers. Commented Jan 7, 2020 at 8:38
  • If you want to compile C++ code to run in the browser then Emscripten is the right tool. I suggest you ask a question about compiling this SEAL library to WASM and using it. Commented Jan 7, 2020 at 9:07

1 Answer 1

1

Yes!

There is an open source library, node-seal, which is a nearly complete port of Microsoft SEAL to WebAssembly (WASM) and should be able to accommodate the majority of use-cases. It works with NodeJS and in modern browsers.

There is also a github sandbox where you may test and experiment with it inside your browser. You may even generate working code using node-seal.

Full disclosure, I’m the author of node-seal and the web demo.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks alot for sharing this. Would you have a tutorial for using this implementation? If yes, could you please share it? It would be a huge help. Thanks
A tutorial maybe a little lengthy for this forum. I've written a small section here about the basics, but ultimately you will need to learn from trial and error. The best documentation can be found from Microsoft SEAL's C++ examples. Figuring out where to start can be challenging. There's a YouTube video that can explain in more detail. If I've answered your initial question I would be grateful for a positive vote.
I am sorry I am unable to up vote your answer but yeah this was exactly what I had asked for. Thanks for the response.
Marking as the accepted answer is what I meant. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.